You are here

block_refresh.install in Block Refresh 7.2

Same filename and directory in other branches
  1. 5 block_refresh.install
  2. 6 block_refresh.install
  3. 7 block_refresh.install

Install, update and uninstall functions for the block_refresh module.

File

block_refresh.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the block_refresh module.
 */

/**
 * Implements hook_install().
 */
function block_refresh_install() {
  block_refresh_reset_jq();
  drupal_set_message(st('Be sure to set appropriate permissions for Block Refresh to function properly!'), 'warning');
}

// Support for block_refresh plugin
function block_refresh_update_1() {
  block_refresh_reset_jq();
}

// Add settings menu item, and change access to /block_refresh
function block_refresh_update_2() {
  menu_rebuild();
}

/**
 *  Register new plugin with jQ
 */
function block_refresh_reset_jq() {
  cache_clear_all('jq_plugins', 'cache');
}

/**
 * Implements hook_uninstall().
 */
function block_refresh_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'block_refresh_%'");
}