taxonomy_get_term

Versions
4.6 – 6
taxonomy_get_term($tid)

Return the term object matching a term ID.

Parameters

$tid A term's ID

Return value

Object A term object. Results are statically cached.

▾ 10 functions call taxonomy_get_term()

forum_confirm_delete in modules/forum/forum.module
Returns a confirmation page for deleting a forum taxonomy term.
forum_get_topics in modules/forum/forum.module
forum_menu in modules/forum/forum.module
Implementation of hook_menu().
forum_validate in modules/forum/forum.module
Implementation of hook_validate().
taxonomy_admin_term_edit in modules/taxonomy/taxonomy.module
Page to edit a vocabulary term.
taxonomy_del_term in modules/taxonomy/taxonomy.module
Delete a term.
taxonomy_get_parents_all in modules/taxonomy/taxonomy.module
Find all ancestors of a given term ID.
taxonomy_select_nodes in modules/taxonomy/taxonomy.module
Finds all nodes that match selected taxonomy conditions.
taxonomy_term_confirm_delete in modules/taxonomy/taxonomy.module
taxonomy_term_page in modules/taxonomy/taxonomy.module
Menu callback; displays all nodes associated with a term.

Code

modules/taxonomy/taxonomy.module, line 1169

<?php
function taxonomy_get_term($tid) {
  static $terms = array();

  if (!isset($terms[$tid])) {
    $terms[$tid] = db_fetch_object(db_query('SELECT * FROM {term_data} WHERE tid = %d', $tid));
  }

  return $terms[$tid];
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.