You are here

function taxonomy_hierarchical_select_item_get_label in Hierarchical Select 5.2

Implementation of hook_hierarchical_select_item_get_label().

1 call to taxonomy_hierarchical_select_item_get_label()
content_taxonomy_hierarchical_select_item_get_label in modules/content_taxonomy.inc
Implementation of hook_hierarchical_select_item_get_label().

File

modules/taxonomy.inc, line 304

Code

function taxonomy_hierarchical_select_item_get_label($item, $params) {
  static $labels = array();
  if (!isset($labels[$item])) {
    $term = taxonomy_get_term($item);

    // Use the translated term when available!
    $labels[$item] = t($term->name);
  }
  return $labels[$item];
}