You are here

function og_is_group_audience_field in Organic groups 7.2

Return TRUE if field is a group audience type.

Parameters

$field_name: The field name.

11 calls to og_is_group_audience_field()
OgBehaviorHandler::views_data_alter in plugins/entityreference/behavior/OgBehaviorHandler.class.php
Implements EntityReference_BehaviorHandler_Abstract::views_data_alter().
OgMembership::save in includes/og.membership.inc
Override Entity::save().
og_entity_query_alter in ./og.module
Implements hook_entity_query_alter().
og_features_pipe_alter in ./og.module
Implements hook_features_pipe_alter().
og_field_access in ./og.module
Implements hook_field_access().

... See full list

File

./og.module, line 2394
Enable users to create and manage groups with roles and permissions.

Code

function og_is_group_audience_field($field_name) {
  $field = field_info_field($field_name);
  return $field['type'] == 'entityreference' && ($field['settings']['handler'] == 'og' || strpos($field['settings']['handler'], 'og_') === 0);
}