You are here

function taxonomy_menu_path_default in Taxonomy menu 8

Same name and namespace in other branches
  1. 6.3 taxonomy_menu.module \taxonomy_menu_path_default()
  2. 6.2 taxonomy_menu.module \taxonomy_menu_path_default()
  3. 7.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 587
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
    ->id() == 0) {
    return FALSE;
  }
  else {
    $path = 'taxonomy/term/' . $term
      ->id();
  }
  return $path;
}