function media_gallery_menu_alter in Media Gallery 7.2
Same name and namespace in other branches
- 7 media_gallery.module \media_gallery_menu_alter()
Implements hook_menu_alter().
File
- ./
media_gallery.module, line 185
Code
function media_gallery_menu_alter(&$items) {
// Take over taxonomy term list pages by substituting our own callback.
// TODO: Use hook_entity_info_alter() to change the entity uri callback for
// gallery collections only.
$items['taxonomy/term/%taxonomy_term']['page callback'] = 'media_gallery_list_galleries';
$items['taxonomy/term/%taxonomy_term']['file'] = 'media_gallery.pages.inc';
$items['taxonomy/term/%taxonomy_term']['module'] = 'media_gallery';
// If you're viewing a media item in context somewhere (which we do inside
// media gallery nodes), that means it's being used on your site, which means
// you won't be allowed to delete it anyway. Therefore, do not show
// contextual links there.
// @todo Perhaps this should be changed in the media module itself?
$items['media/%file/delete']['context'] = MENU_CONTEXT_PAGE;
}