function node_gallery_menu_alter in Node Gallery 6
Same name and namespace in other branches
- 6.2 node_gallery.module \node_gallery_menu_alter()
Implementation of hook_menu_alter()
File
- ./
node_gallery.module, line 123 - Node gallery module file.
Code
function node_gallery_menu_alter(&$items) {
// Disable all Node Gallery image types from showing up on node/add
$types = gallery_config_gateway::get_types();
//Only do the foreach if there is a type
if ($types) {
foreach ($types as $type) {
$items['node/add/' . $type->image_type]['access callback'] = FALSE;
$items['node/add/' . str_replace('_', '-', $type->image_type)]['access callback'] = FALSE;
}
}
}