You are here

function _webform_shs_get_label in Webform Simple Hierarchical Select 7

1 call to _webform_shs_get_label()
_webform_shs_get_labels_for_output in components/shs.inc

File

components/shs.inc, line 195
Webform simple hierarchical select component.

Code

function _webform_shs_get_label($tid) {
  $label_parts = array();
  $term = taxonomy_term_load($tid);
  foreach (taxonomy_get_parents_all($tid) as $parent) {
    $label_parts[] = entity_label('taxonomy_term', $parent);
  }
  $label_parts = array_reverse($label_parts);
  return implode(' » ', $label_parts);
}