You are here

function content_taxonomy_hierarchical_select_valid_item in Hierarchical Select 5.2

Implementation of hook_hierarchical_select_valid_item().

File

modules/content_taxonomy.inc, line 128

Code

function content_taxonomy_hierarchical_select_valid_item($item, $params) {
  if (!is_numeric($item) || $item < 1) {
    return FALSE;
  }
  $term = taxonomy_get_term($item);
  return $term->vid == $params['vid'] && $term->depth < $params['depth'];
}