You are here

function taxonomy_get_term in Drupal 6

Same name and namespace in other branches
  1. 4 modules/taxonomy.module \taxonomy_get_term()
  2. 5 modules/taxonomy/taxonomy.module \taxonomy_get_term()

Return the term object matching a term ID.

Parameters

$tid: A term's ID

$reset: Whether to reset the internal taxonomy_get_term cache.

Return value

Object A term object. Results are statically cached.

11 calls to 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.

... See full list

File

modules/taxonomy/taxonomy.module, line 1083
Enables the organization of content into categories.

Code

function taxonomy_get_term($tid, $reset = FALSE) {
  static $terms = array();
  if ($reset) {
    $terms = array();
  }
  if (!isset($terms[$tid])) {
    $terms[$tid] = db_fetch_object(db_query('SELECT * FROM {term_data} WHERE tid = %d', $tid));
  }
  return $terms[$tid];
}