You are here

function menu_block_view_alter in Drupal 7

Implements hook_block_view_alter().

File

modules/menu/menu.module, line 522
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,
        ),
      );
    }
  }
}