You are here

flush_page_cache.install in Flush page cache 7

Same filename and directory in other branches
  1. 6 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.
 */

/**
 * Implements 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_update('system')
    ->fields(array(
    'weight' => -1000,
  ))
    ->condition('name', 'flush_page_cache')
    ->execute();
}

/**
 * Implements hook_uninstall().
 */
function flush_page_cache_uninstall() {
  db_delete('variable')
    ->condition('name', 'flush_page_cache_%', 'LIKE')
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');
}

Functions