You are here

function block_refresh_menu in Block Refresh 5

Same name and namespace in other branches
  1. 6 block_refresh.module \block_refresh_menu()
  2. 7.2 block_refresh.module \block_refresh_menu()
  3. 7 block_refresh.module \block_refresh_menu()

implements hook_menu

File

./block_refresh.module, line 63

Code

function block_refresh_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/block_refresh',
      'title' => t('Block refresh'),
      'description' => t('Settings for automatic and manual refreshing of configured blocks.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'block_refresh_settings',
      'access' => user_access('administer site configuration'),
    );

    // this will display the contents of a block, if it's enabled
    $items[] = array(
      'path' => 'block_refresh',
      'type' => MENU_CALLBACK,
      'access' => user_access('access block refresh content'),
      'callback' => 'block_refresh_block_content',
      'title' => t('Block refresh block content'),
    );
  }
  return $items;
}