1 menu.module menu_block_view_alter(&$data, $block)

Implements hook_block_view_alter().

File

core/modules/menu/menu.module, line 544
Allows administrators to customize the site's menus.

Code

function menu_block_view_alter(&$data, $block) {
  // Add contextual links for system menu blocks.
  if ($block->module == 'system' && !empty($data['content'])) {
    $system_menus = menu_list_system_menus();
    if (isset($system_menus[$block->delta])) {
      $data['content']['#contextual_links']['menu'] = array('admin/structure/menu/manage', array($block->delta));
    }
  }
}