You are here

function taxonomy_manager_term_is_root in Taxonomy Manager 6.2

Same name and namespace in other branches
  1. 7 taxonomy_manager.module \taxonomy_manager_term_is_root()

helper function to check whether a given term is a root term

1 call to taxonomy_manager_term_is_root()
_taxonomy_manager_tree_get_first_path in ./taxonomy_manager.module
calculates a path to a certain term and merges it into the tree

File

./taxonomy_manager.module, line 561
Taxonomy Manager

Code

function taxonomy_manager_term_is_root($tid) {
  if (db_affected_rows(db_query("SELECT tid FROM {term_hierarchy} WHERE tid = %d AND parent = 0", $tid)) == 1) {
    return TRUE;
  }
  return FALSE;
}