You are here

function bean_menu_local_tasks_alter in Bean (for Drupal 7) 7

Implements hook_menu_local_tasks_alter().

File

./bean.module, line 1013
Block Entity

Code

function bean_menu_local_tasks_alter(&$data, $router_item, $root_path) {

  // Add action link to 'block/add' on 'admin/content/blocks' page.
  if ($root_path == 'admin/content/blocks' && bean_get_types()) {
    $item = menu_get_item('block/add');
    if ($item['access']) {
      $data['actions']['output'][] = array(
        '#theme' => 'menu_local_action',
        '#link' => $item,
      );
    }
  }
}