You are here

function taxonomy_menu_path_default in Taxonomy menu 7.2

Same name and namespace in other branches
  1. 8 taxonomy_menu.module \taxonomy_menu_path_default()
  2. 6.3 taxonomy_menu.module \taxonomy_menu_path_default()
  3. 6.2 taxonomy_menu.module \taxonomy_menu_path_default()
  4. 7 taxonomy_menu.module \taxonomy_menu_path_default()

Callback for hook_taxonomy_menu_path.

1 string reference to 'taxonomy_menu_path_default'
taxonomy_menu_path_get in ./taxonomy_menu.module
Creates the path for the vid/tid combination.

File

./taxonomy_menu.module, line 589
Generates menu links for all selected taxonomy terms.

Code

function taxonomy_menu_path_default($term) {

  // When tid equals 0, we are dealing with a vocabulary item. We cannot use
  // default path with vocabulary items.
  if ($term->tid == 0) {
    return FALSE;
  }
  else {
    $uri = entity_uri('taxonomy_term', $term);
    $path = !empty($uri['path']) ? $uri['path'] : 'taxonomy/term/' . $term->tid;
  }
  return $path;
}