function taxonomy_term_load

taxonomy_term_load($tid)

Return the term object matching a term ID.

Parameters

$tid: A term's ID

Return value

A taxonomy term object, or FALSE if the term was not found. Results are statically cached.

File

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

Code

function taxonomy_term_load($tid) {
  if (!is_numeric($tid)) {
    return FALSE;
  }
  $term = taxonomy_term_load_multiple(array($tid), array());
  return $term ? $term[$tid] : FALSE;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/taxonomy_term_load/7.x