Same name and namespace in other branches
  1. 4.6.x modules/taxonomy.module \taxonomy_get_term()
  2. 4.7.x modules/taxonomy.module \taxonomy_get_term()
  3. 6.x modules/taxonomy/taxonomy.module \taxonomy_get_term()

Return the term object matching a term ID.

Parameters

$tid: A term's ID

Return value

Object A term object. Results are statically cached.

7 calls to 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_validate in modules/forum/forum.module
Implementation of hook_validate().
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.

... See full list

File

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

Code

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];
}