You are here

function _taxonomy_menu_get_parents in Taxonomy menu 7

Same name and namespace in other branches
  1. 8 taxonomy_menu.database.inc \_taxonomy_menu_get_parents()
  2. 6.3 taxonomy_menu.database.inc \_taxonomy_menu_get_parents()
  3. 6.2 taxonomy_menu.database.inc \_taxonomy_menu_get_parents()
  4. 7.2 taxonomy_menu.database.inc \_taxonomy_menu_get_parents()

Gets the parent tids for a taxonomy term.

Parameters

int $tid: Taxonomy term ID.

Return value

array Array of taxonomy term IDs.

1 call to _taxonomy_menu_get_parents()
_taxonomy_menu_create_item in ./taxonomy_menu.module
Creates the initial $item array.

File

./taxonomy_menu.database.inc, line 118
Database functions

Code

function _taxonomy_menu_get_parents($tid) {
  $output = array();
  $result = taxonomy_get_parents($tid);
  foreach ($result as $key => $item) {
    $output[] = $key;
  }
  return $output;
}