You are here

function hs_taxonomy_hierarchical_select_item_get_label in Hierarchical Select 5.3

Same name and namespace in other branches
  1. 6.3 modules/hs_taxonomy.module \hs_taxonomy_hierarchical_select_item_get_label()
  2. 7.3 modules/hs_taxonomy.module \hs_taxonomy_hierarchical_select_item_get_label()

Implementation of hook_hierarchical_select_item_get_label().

2 calls to hs_taxonomy_hierarchical_select_item_get_label()
hs_content_taxonomy_hierarchical_select_item_get_label in modules/hs_content_taxonomy.module
Implementation of hook_hierarchical_select_item_get_label().
hs_taxonomy_views_hierarchical_select_item_get_label in modules/hs_taxonomy_views.module
Implementation of hook_hierarchical_select_item_get_label().

File

modules/hs_taxonomy.module, line 298
Implementation of the Hierarchical Select API for the Taxonomy module.

Code

function hs_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];
}