Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The hook_menu_alter function looks like:
/**
* Implements hook_menu_alter().
*/
function media_library_menu_alter(&$items) {
// Administrative screens for viewing the media library.
$items['admin/content/file/library'] = array(
'title' => 'Media Library',
'type' => MENU_LOCAL_TASK,
'access arguments' => array('administer files'),
'weight' => 20,
);
$items['admin/content/file/library'] = array(
'title' => 'Media Library',. .
'description' => 'Manage files in the media library.',
'page callback' => 'drupal_get_form',
'page arguments' => array('file_entity_admin_file'),
'access arguments' => array('administer files'),
'type' => MENU_LOCAL_TASK,
'file' => 'file_entity.admin.inc',
'file path' => drupal_get_path('module', 'file_entity'),
'weight' => 20,
);
}
Am I misunderstanding something, or is the first $items['admin/content/file/library'] = array( . . .) overridden by the second.
Comment | File | Size | Author |
---|---|---|---|
#1 | remove-extraneous-code-2498621-1.patch | 703 bytes | Devin Carlson |
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedA patch to remove the extraneous code.
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedTested #1 and committed to Media Library 7.x-1.x.