function hs_content_taxonomy_hierarchical_select_valid_item in Hierarchical Select 5.3
Same name and namespace in other branches
- 6.3 modules/hs_content_taxonomy.module \hs_content_taxonomy_hierarchical_select_valid_item()
Implementation of hook_hierarchical_select_valid_item().
1 call to hs_content_taxonomy_hierarchical_select_valid_item()
- hs_content_taxonomy_views_hierarchical_select_valid_item in modules/
hs_content_taxonomy_views.module - Implementation of hook_hierarchical_select_valid_item().
File
- modules/
hs_content_taxonomy.module, line 496 - Implementation of the Hierarchical Select API for the Content Taxonomy module.
Code
function hs_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'] && _hs_content_taxonomy_term_within_allowed_depth($term->tid, $term->vid, $params['tid'], $params['depth']);
}