function vppr_permission in Vocabulary Permissions Per Role 7
Implements hook_permission().
1 call to vppr_permission()
- vppr_access_taxonomy in ./
vppr.module - VPPR's access callback for taxonomy overview page (main entry point).
File
- ./
vppr.module, line 91 - Vocabulary Permissions Per Role
Code
function vppr_permission() {
$perms['administer terms in all vocabularies'] = array(
'title' => t('Administer terms in all vocabularies'),
);
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vocabulary) {
$perms['administer ' . $vocabulary->machine_name . ' vocabulary terms'] = array(
'title' => t('Administer %name vocabulary terms', array(
'%name' => $vocabulary->name,
)),
);
}
return $perms;
}