function globallink_get_all_translatable_taxonomy_types_and_names in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink_taxonomy/globallink_taxonomy.inc \globallink_get_all_translatable_taxonomy_types_and_names()
- 7.6 globallink_taxonomy/globallink_taxonomy.inc \globallink_get_all_translatable_taxonomy_types_and_names()
1 call to globallink_get_all_translatable_taxonomy_types_and_names()
- globallink_field in ./
globallink_field_configuration.inc - Renders form for globallink_field.
File
- globallink_taxonomy/
globallink_taxonomy.inc, line 1364
Code
function globallink_get_all_translatable_taxonomy_types_and_names() {
$entity_info = entity_get_info('taxonomy_term');
$arr = array();
if (isset($entity_info) && isset($entity_info['bundles'])) {
$bundles = $entity_info['bundles'];
foreach ($bundles as $key => $bundle) {
$vocab = taxonomy_vocabulary_machine_name_load($key);
if ($vocab->i18n_mode == I18N_MODE_TRANSLATE) {
$arr['tax:' . $key] = $bundle['label'];
}
}
asort($arr);
}
return $arr;
}