function taxonomy_access_fix_admin_menu_map in Taxonomy access fix 7.2
Implements hook_admin_menu_map().
File
- ./
taxonomy_access_fix.module, line 220 - This file contains all hooks and callbacks for extra/improved Taxonomy permissions.
Code
function taxonomy_access_fix_admin_menu_map() {
if (!user_access('administer taxonomy')) {
$vocabularies = array();
foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
if (taxonomy_access_fix_access('index', $vocabulary)) {
$vocabularies[] = $vocabulary->machine_name;
}
}
if ($vocabularies) {
$map = array(
'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name' => array(
'parent' => 'admin/structure/taxonomy',
'arguments' => array(
array(
'%taxonomy_vocabulary_machine_name' => $vocabularies,
),
),
),
);
return $map;
}
}
}