You are here

function get_taxonomy_fields in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.7 globallink_taxonomy/globallink_taxonomy.inc \get_taxonomy_fields()
  2. 7.6 globallink_taxonomy/globallink_taxonomy.inc \get_taxonomy_fields()
1 call to get_taxonomy_fields()
globallink_get_taxonomy_xml_for_I18N_MODE_TRANSLATE in globallink_taxonomy/globallink_taxonomy.inc

File

globallink_taxonomy/globallink_taxonomy.inc, line 1351

Code

function get_taxonomy_fields($taxonomy_type) {
  $fields = array();
  $info = entity_get_info('taxonomy_term');
  foreach ($info['bundles'] as $bundle_name => $bundle_info) {
    if ($bundle_name == $taxonomy_type) {
      foreach (field_info_instances('taxonomy_term', $bundle_name) as $field) {
        $fields[] = $field['field_name'];
      }
    }
  }
  return $fields;
}