taxonomy_permission
function taxonomy_permission
taxonomy_permission()
Implements hook_permission().
File
- modules/taxonomy/taxonomy.module, line 67
- Enables the organization of content into categories.
Code
function taxonomy_permission() { $permissions = array( 'administer taxonomy' => array( 'title' => t('Administer vocabularies and terms'), ), ); foreach (taxonomy_get_vocabularies() as $vocabulary) { $permissions += array( 'edit terms in ' . $vocabulary->vid => array( 'title' => t('Edit terms in %vocabulary', array('%vocabulary' => $vocabulary->name)), ), ); $permissions += array( 'delete terms in ' . $vocabulary->vid => array( 'title' => t('Delete terms from %vocabulary', array('%vocabulary' => $vocabulary->name)), ), ); } return $permissions; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/taxonomy_permission/7.x