You are here

function media_library_menu_local_tasks_alter in Media Library 7

Implements hook_menu_local_tasks_alter().

File

./media_library.module, line 62
Restricts the media library to only designated files.

Code

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

  // Add action link to 'file/add' on 'admin/content/file' page.
  if ($root_path == 'admin/content/file/library') {
    $item = menu_get_item('file/add');
    if (!empty($item['access'])) {
      $data['actions']['output'][] = array(
        '#theme' => 'menu_local_action',
        '#link' => $item,
        '#weight' => $item['weight'],
      );
    }
  }
}