You are here

function _taxonomy_menu_insert_link_items in Taxonomy menu 7

Same name and namespace in other branches
  1. 6.2 taxonomy_menu.module \_taxonomy_menu_insert_link_items()

Creates new link items for the vocabulary.

Parameters

$vid: Vocabulary ID.

1 call to _taxonomy_menu_insert_link_items()
_taxonomy_menu_rebuild in ./taxonomy_menu.module
Rebuilds a menu.

File

./taxonomy_menu.module, line 345
Adds links to taxonomy terms into a menu.

Code

function _taxonomy_menu_insert_link_items($vid) {
  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $vid), FALSE);

  // Check to see if we should had a vocab item.
  if (variable_get(_taxonomy_menu_build_variable('voc_item', $vid), FALSE)) {
    $args = array(
      'vid' => $vid,
      'menu_name' => $menu_name,
    );
    taxonomy_menu_handler('insert', $args);
  }

  // Let batch api take care of inserting the menu items.
  _taxonomy_menu_insert_link_items_batch($vid);
}