function taxonomy_term_load

Same name in other branches
  1. 8.9.x 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.

13 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.

... See full list

File

modules/taxonomy/taxonomy.module, line 1396

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.