You are here

function og_vocab_is_og_vocab_field in OG Vocabulary 7

Return TRUE if field is associated with OG-vocab.

Parameters

$entity_type: The entity type.

$field_name: The field name.

$bundle_name: The bundle name to be checked.

See also

og_is_group_audience_field()

2 calls to og_vocab_is_og_vocab_field()
og_vocab_field_formatter_view in ./og_vocab.module
Implements hook_field_formatter_view().
og_vocab_get_og_vocab_fields in ./og_vocab.module
Get the name of the group-audience type field.

File

./og_vocab.module, line 384
Give each group its own system controlled vocabularies.

Code

function og_vocab_is_og_vocab_field($entity_type, $field_name, $bundle_name) {
  $field = field_info_field($field_name);
  $instance = field_info_instance($entity_type, $field_name, $bundle_name);
  return $field['type'] == 'entityreference' && $field['settings']['target_type'] == 'taxonomy_term' && $instance['widget']['type'] == 'og_vocab_complex';
}