You are here

function _taxonomy_menu_rebuild in Taxonomy menu 6.2

Same name and namespace in other branches
  1. 7 taxonomy_menu.module \_taxonomy_menu_rebuild()

rebuilds a menu

Parameters

$vid:

Return value

$message message that is displayed

1 call to _taxonomy_menu_rebuild()
taxonomy_menu_vocab_submit in ./taxonomy_menu.module
Submit handler for the extra settings added to the taxonomy vocab form.

File

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

Code

function _taxonomy_menu_rebuild($vid) {

  // remove all of the menu items for this vocabulary
  _taxonomy_menu_delete_all($vid);

  // only insert the links if a menu is set
  if (variable_get('taxonomy_menu_vocab_menu_' . $vid, FALSE)) {
    _taxonomy_menu_insert_link_items($vid);
    return t('The Taxonomy Menu has been rebuilt.');
  }
  return t('The Taxonomy Menu has been removed.');
}