function node_menu_local_tasks_alter in Drupal 7
Implements hook_menu_local_tasks_alter().
File
- modules/
node/ node.module, line 2160 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
function node_menu_local_tasks_alter(&$data, $router_item, $root_path) {
// Add action link to 'node/add' on 'admin/content' page.
if ($root_path == 'admin/content') {
$item = menu_get_item('node/add');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
}
}