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