function menu_block_view_alter

Implements hook_block_view_alter().

File

drupal/modules/menu/menu.module, line 498
Allows administrators to customize the site's navigation 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,
        ),
      );
    }
  }
}