function system_block_info

Implements hook_block_info().

File

drupal/core/modules/system/system.module, line 2474
Configuration system that lets administrators modify the workings of the site.

Code

function system_block_info() {
  $blocks['main'] = array(
    'info' => t('Main page content'),
    // Cached elsewhere.
    'cache' => DRUPAL_NO_CACHE,
    // Auto-enable in 'content' region by default, which always exists.
    // @see system_themes_page(), drupal_render_page()
    'region' => 'content',
    'status' => 1,
  );
  $blocks['powered-by'] = array(
    'info' => t('Powered by Drupal'),
    'weight' => '10',
    'cache' => DRUPAL_NO_CACHE,
  );
  $blocks['help'] = array(
    'info' => t('System help'),
    'weight' => '5',
    'cache' => DRUPAL_NO_CACHE,
    // Auto-enable in 'help' region by default, if the theme defines one.
    'region' => 'help',
    'status' => 1,
  );

  // System-defined menu blocks.
  // The block deltas need to be prefixed with 'menu-', since the 'main' menu
  // would otherwise clash with the 'main' page content block defined above.
  foreach (menu_list_system_menus() as $menu_name => $title) {
    $blocks['menu-' . $menu_name]['info'] = t($title);

    // Menu blocks can't be cached because each menu item can have
    // a custom access callback. menu.inc manages its own caching.
    $blocks['menu-' . $menu_name]['cache'] = DRUPAL_NO_CACHE;
  }
  return $blocks;
}