function vppr_menu_alter in Vocabulary Permissions Per Role 6
Same name and namespace in other branches
- 7 vppr.module \vppr_menu_alter()
Implementation of hook_menu_alter().
File
- ./
vppr.module, line 13 - Vocabulary Permissions Per Role
Code
function vppr_menu_alter(&$items) {
// Taxonomy overview page: http://d6.l/admin/content/taxonomy
$items['admin/content/taxonomy']['access callback'] = '_vppr_access_taxonomy';
$items['admin/content/taxonomy']['page callback'] = '_vppr_page_taxonomy_overview';
// Add terms: http://d6.l/admin/content/taxonomy/$vid/add/term
$items['admin/content/taxonomy/%taxonomy_vocabulary/add/term']['access callback'] = '_vppr_access_vocabulary';
$items['admin/content/taxonomy/%taxonomy_vocabulary/add/term']['access arguments'] = array(
3,
);
// Reorder terms: http://d6.l/admin/content/taxonomy/$vid
$items['admin/content/taxonomy/%taxonomy_vocabulary']['access callback'] = '_vppr_access_vocabulary';
$items['admin/content/taxonomy/%taxonomy_vocabulary']['access arguments'] = array(
3,
);
// Edit and delete terms: http://d6.l/admin/content/taxonomy/edit/term/$tid - warning: there's only a tid arg!
$items['admin/content/taxonomy/edit/term']['access callback'] = '_vppr_access_term';
$items['admin/content/taxonomy/edit/term']['access arguments'] = array(
5,
);
}