You are here

function ds_extras_ds_field_access in Display Suite 7.2

Same name and namespace in other branches
  1. 8.4 modules/ds_extras/ds_extras.module \ds_extras_ds_field_access()
  2. 8.2 modules/ds_extras/ds_extras.module \ds_extras_ds_field_access()
  3. 8.3 modules/ds_extras/ds_extras.module \ds_extras_ds_field_access()

DS fields access.

Parameters

$field: The machine name of the field

$entity_type: The name of the entity type.

1 call to ds_extras_ds_field_access()
ds_field_attach_view_alter in ./ds.module
Implements hook_field_attach_view_alter().
1 string reference to 'ds_extras_ds_field_access'
ds_field_attach_view_alter in ./ds.module
Implements hook_field_attach_view_alter().

File

modules/ds_extras/ds_extras.module, line 168
Display Suite extras main functions.

Code

function ds_extras_ds_field_access($field, $entity_type) {
  if (user_access('view ' . $field . ' on ' . $entity_type)) {
    return TRUE;
  }
  return FALSE;
}