function taxonomy_term_load
7.x taxonomy.module | 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.
11 calls to taxonomy_term_load()
- EntityCrudHookTestCase::testTaxonomyTermHooks in drupal-7.x/
modules/ simpletest/ tests/ entity_crud_hook_test.test - Tests hook invocations for CRUD operations on taxonomy terms.
- forum_confirm_delete in drupal-7.x/
modules/ forum/ forum.admin.inc - Form constructor for confirming deletion of a forum taxonomy term.
- forum_forum_load in drupal-7.x/
modules/ forum/ forum.module - Returns a tree of all forums for a given taxonomy term ID.
- forum_node_validate in drupal-7.x/
modules/ forum/ forum.module - Implements hook_node_validate().
- TaxonomyHooksTestCase::testTaxonomyTermHooks in drupal-7.x/
modules/ taxonomy/ taxonomy.test - Test that hooks are run correctly on creating, editing, viewing, and deleting a term.
File
- drupal-7.x/
modules/ taxonomy/ taxonomy.module, line 1383 - 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;
}