You are here

function hs_taxonomy_hierarchical_select_children in Hierarchical Select 5.3

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

Implementation of hook_hierarchical_select_children().

1 call to hs_taxonomy_hierarchical_select_children()
hs_taxonomy_views_hierarchical_select_children in modules/hs_taxonomy_views.module
Implementation of hook_hierarchical_select_children().

File

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

Code

function hs_taxonomy_hierarchical_select_children($parent, $params) {
  if ($params['root_term'] && $parent == 0) {
    return array();
  }
  $terms = taxonomy_get_children($parent, $params['vid']);

  // Unset the term that's being excluded, if it is among the children.
  unset($terms[$params['exclude_tid']]);
  return _hs_taxonomy_hierarchical_select_terms_to_options($terms);
}