function url_alias_permissions_permission in URL Alias Permissions 7
Implements of hook_permission().
File
- ./
url_alias_permissions.module, line 23 - This is the main script for the URL Alias Permissions module. It merely contains the implementation of hooks invoked by Drupal core.
Code
function url_alias_permissions_permission() {
$perms = array();
// Generate edit url alias permissions for all content types.
foreach (node_permissions_get_configured_types() as $type) {
$info = node_type_get_type($type);
$perms += array(
"edit {$type} URL alias" => array(
'title' => t('Create and edit %type_name URL alias', array(
'%type_name' => $info->name,
)),
),
);
}
return $perms;
}