You are here

function taxonomy_hierarchical_select_lineage in Hierarchical Select 5.2

Same name and namespace in other branches
  1. 5 modules/taxonomy.inc \taxonomy_hierarchical_select_lineage()

Implementation of hook_hierarchical_select_lineage().

1 call to taxonomy_hierarchical_select_lineage()
content_taxonomy_hierarchical_select_lineage in modules/content_taxonomy.inc
Implementation of hook_hierarchical_select_lineage().

File

modules/taxonomy.inc, line 280

Code

function taxonomy_hierarchical_select_lineage($item, $params) {
  $lineage = array();
  $terms = array_reverse(taxonomy_get_parents_all($item));
  foreach ($terms as $term) {
    $lineage[] = $term->tid;
  }
  return $lineage;
}