You are here

function styleswitcher_block_info in Style Switcher 6.2

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

Returns info about provided blocks and their initial configuration settings.

Return value

array An array of block descriptions.

See also

styleswitcher_block()

styleswitcher_block_view()

1 call to styleswitcher_block_info()
styleswitcher_block in ./styleswitcher.module
Implements hook_block().

File

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

Code

function styleswitcher_block_info() {
  $blocks[0] = 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' => BLOCK_CACHE_PER_PAGE,
  );
  return $blocks;
}