function taxonomy_permission

7.x taxonomy.module taxonomy_permission()

Implements hook_permission().

File

drupal-7.x/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;
}