You are here

flush_page_cache.install in Flush page cache 6

Same filename and directory in other branches
  1. 7 flush_page_cache.install

Install and uninstall functions for the 'Flush page cache' module.

File

flush_page_cache.install
View source
<?php

/**
 * @file
 * Install and uninstall functions for the 'Flush page cache' module.
 */

/**
 * Implementation of hook_install().
 */
function flush_page_cache_install() {

  // Only enable footer flush page cache link if admin menu is not installed.
  if (!module_exists('admin_menu')) {
    variable_set('flush_page_cache_footer_link', '1');
  }

  // Flush page cache hook_init() code needs to execute first.
  db_query("UPDATE {system} SET weight=-1000 WHERE name = 'flush_page_cache'");
}

/**
 * Implementation of hook_uninstall().
 */
function flush_page_cache_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'flush_page_cache_%'");
  cache_clear_all('variables', 'cache');
}

Functions

Namesort descending Description
flush_page_cache_install Implementation of hook_install().
flush_page_cache_uninstall Implementation of hook_uninstall().