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.

▾ 11 functions call taxonomy_get_term()

forum_confirm_delete in modules/forum/forum.admin.inc
Returns a confirmation page for deleting a forum taxonomy term.
forum_get_topics in modules/forum/forum.module
forum_nodeapi in modules/forum/forum.module
Implementation of hook_nodeapi().
taxonomy_admin_term_edit in modules/taxonomy/taxonomy.admin.inc
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_preview_terms in modules/taxonomy/taxonomy.module
Helper function to convert terms after a preview.
taxonomy_select_nodes in modules/taxonomy/taxonomy.module
Finds all nodes that match selected taxonomy conditions.
taxonomy_term_confirm_delete in modules/taxonomy/taxonomy.admin.inc
Form builder for the term delete form.
taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
Menu callback; displays all nodes associated with a term.
theme_taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
Render a taxonomy term page HTML output.

Code

modules/taxonomy/taxonomy.module, line 1007

<?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.