function _taxonomy_manager_tree_term_valid in Taxonomy Manager 5
Same name and namespace in other branches
- 6.2 taxonomy_manager.module \_taxonomy_manager_tree_term_valid()
- 6 taxonomy_manager.module \_taxonomy_manager_tree_term_valid()
- 7 taxonomy_manager.module \_taxonomy_manager_tree_term_valid()
checks if term id belongs to vocabulary
Parameters
$tid term id:
$vid voc id:
Return value
true, if term belongs to voc, else false
2 calls to _taxonomy_manager_tree_term_valid()
- taxonomy_manager_tree_validate in ./
taxonomy_manager.module - validates submitted form values checks if selected terms really belong to initial voc, if not --> form_set_error
- taxonomy_manager_update_weights in ./
taxonomy_manager.module - callback for updating weights data send through AJAX, $_POST $_POST[$tid] => $weight
File
- ./
taxonomy_manager.module, line 2003 - Taxonomy Manager
Code
function _taxonomy_manager_tree_term_valid($tid, $vid) {
$term = taxonomy_get_term($tid);
if ($term->vid != $vid) {
return false;
}
return true;
}