You are here

function content_taxonomy_fields in Content Taxonomy 6

Same name and namespace in other branches
  1. 6.2 content_taxonomy.module \content_taxonomy_fields()

Helper function that returns all content taxonomy fields, nested in their content types

1 call to content_taxonomy_fields()
content_taxonomy_taxonomy in ./content_taxonomy.module
Implementation of hook_taxonomy().

File

./content_taxonomy.module, line 430
Defines a field type for referencing a taxonomy term.

Code

function content_taxonomy_fields() {
  static $ct_fields;
  if (!is_array($ct_fields)) {
    $ct_fields = array();
    foreach (content_types() as $type_name => $type) {
      foreach ($type['fields'] as $field_name => $field) {
        if ($field['type'] == 'content_taxonomy') {
          $ct_fields[$type_name]['fields'][$field_name] = $field;
        }
      }
    }
  }
  return $ct_fields;
}