function taxonomy_get_parents_all

cis7 taxonomy.module taxonomy_get_parents_all($tid)
cle7 taxonomy.module taxonomy_get_parents_all($tid)
elmsmedia7 taxonomy.module taxonomy_get_parents_all($tid)
icor7 taxonomy.module taxonomy_get_parents_all($tid)
meedjum_blog7 taxonomy.module taxonomy_get_parents_all($tid)
mooc7 taxonomy.module taxonomy_get_parents_all($tid)

Find all ancestors of a given term ID.

7 calls to taxonomy_get_parents_all()
entity_metadata_taxonomy_term_get_properties in sites/all/modules/ulmus/entity/modules/
Callback for getting term properties.
forum_forum_load in modules/forum/forum.module
Returns a tree of all forums for a given taxonomy term ID.
forum_node_view in modules/forum/forum.module
Implements hook_node_view().
taxonomy_field_validate in modules/taxonomy/taxonomy.module
Implements hook_field_validate().
token_taxonomy_term_load_all_parents in sites/all/modules/ulmus/token/token.module

... See full list

1 string reference to 'taxonomy_get_parents_all'
taxonomy_terms_static_reset in modules/taxonomy/taxonomy.module
Clear all static cache variables for terms.


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


function taxonomy_get_parents_all($tid) {
  $cache = &drupal_static(__FUNCTION__, array());

  if (isset($cache[$tid])) {
    return $cache[$tid];

  $parents = array();
  if ($term = taxonomy_term_load($tid)) {
    $parents[] = $term;
    $n = 0;
    while ($parent = taxonomy_get_parents($parents[$n]->tid)) {
      $parents = array_merge($parents, $parent);

  $cache[$tid] = $parents;

  return $parents;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.