You are here

function styleswitcher_block_info in Style Switcher 7.2

Same name and namespace in other branches
  1. 6.2 styleswitcher.module \styleswitcher_block_info()
  2. 7 styleswitcher.module \styleswitcher_block_info()

Implements hook_block_info().

File

./styleswitcher.module, line 16
Module's hooks implementations and helper functions.

Code

function styleswitcher_block_info() {
  $blocks['styleswitcher'] = array(
    'info' => t('Style Switcher'),
    // We cannot cache globally, because we use drupal_get_destination() with
    // links in block, which is different from page to page. And we cannot avoid
    // using destination, because in this case site users with JS-disabled
    // browsers won't go back to the same page they were at, but will go to the
    // front page each time. We also cannot rely on $_SERVER['HTTP_REFERER'],
    // because it can be empty.
    'cache' => DRUPAL_CACHE_PER_PAGE,
  );
  return $blocks;
}