function termstatus_menu_alter in Taxonomy Term Status 7
Implements hook_menu_alter().
Inject a menu access callback for taxonomy term pages.
File
- ./
termstatus.module, line 247 - Hook implementations and API for the taxonomy term status module.
Code
function termstatus_menu_alter(&$items) {
$orig_callback = isset($items['taxonomy/term/%taxonomy_term']['access callback']) ? $items['taxonomy/term/%taxonomy_term']['access callback'] : 'user_access';
$orig_arguments = $items['taxonomy/term/%taxonomy_term']['access arguments'];
$items['taxonomy/term/%taxonomy_term']['access callback'] = 'termstatus_menu_access';
$items['taxonomy/term/%taxonomy_term']['access arguments'] = array(
2,
$orig_callback,
$orig_arguments,
);
}