1 file.module file_menu_local_tasks_alter(&$data, $router_item, $root_path)

Implements hook_menu_local_tasks_alter().

File

core/modules/file/file.module, line 449
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_menu_local_tasks_alter(&$data, $router_item, $root_path) {
  // Add action link for 'file/add' on 'admin/content/files' page.
  if ($root_path == 'admin/content/files') {
    $item = menu_get_item('file/add');
    if ($item['access']) {
      $data['actions']['output'][] = array(
        '#theme' => 'menu_local_action',
        '#link' => $item,
      );
    }
  }
}