| 5 taxonomy.module | _taxonomy_term_children($tid) |
| 6 taxonomy.module | _taxonomy_term_children($tid) |
Helper for taxonomy_term_count_nodes().
1 call to _taxonomy_term_children()
File
- modules/
taxonomy.module, line 970 - Enables the organization of content into categories.
Code
function _taxonomy_term_children($tid) {
static $children;
if (!isset($children)) {
$result = db_query('SELECT tid, parent FROM {term_hierarchy}');
while ($term = db_fetch_object($result)) {
$children[$term->parent][] = $term->tid;
}
}
return $children[$tid] ? $children[$tid] : array();
}
Login or register to post comments