function _field_permissions_perm in Field Permissions 6
Implementation of hook_perm().
1 call to _field_permissions_perm()
- field_permissions_perm in ./
field_permissions.module - Implementation of hook_perm().
File
- includes/
admin.inc, line 76 - Administrative interface for the Field Permissions module.
Code
function _field_permissions_perm() {
$perms = array(
'administer field permissions',
);
foreach (content_fields() as $field_name => $field) {
if (!empty($field['field_permissions'])) {
foreach (array_keys(field_permissions_list()) as $permission_type) {
if (!empty($field['field_permissions'][$permission_type])) {
$perms[] = $permission_type . ' ' . $field_name;
}
}
}
}
return $perms;
}