You are here

function og_test_field_access in Organic groups 7

Implements hook_field_access().

File

tests/og_test.module, line 24
Test module for Organic groups.

Code

function og_test_field_access($op, $field, $entity_type, $entity, $account) {
  if (!variable_get('og_test_hide_audience', FALSE)) {
    return;
  }
  if ($field['field_name'] != OG_AUDIENCE_FIELD) {
    return;
  }
  if ($op != 'edit') {
    return;
  }
  return FALSE;
}