You are here

function _taxonomy_manager_tree_term_valid in Taxonomy Manager 6

Same name and namespace in other branches
  1. 5 taxonomy_manager.module \_taxonomy_manager_tree_term_valid()
  2. 6.2 taxonomy_manager.module \_taxonomy_manager_tree_term_valid()
  3. 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.admin.inc
callback for updating weights data send through AJAX, $_POST $_POST[$tid] => $weight

File

./taxonomy_manager.module, line 787
Taxonomy Manager

Code

function _taxonomy_manager_tree_term_valid($tid, $vid) {
  $term = taxonomy_get_term($tid);
  if ($term->vid != $vid) {
    return false;
  }
  return true;
}