You are here

function _taxonomy_menu_rebuild in Taxonomy menu 7

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

Rebuilds a menu.

Parameters

int $vid: Vocabulary ID.

Return value

string 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 272
Adds links to taxonomy terms into a menu.

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_build_variable('vocab_menu', $vid), FALSE)) {
    _taxonomy_menu_insert_link_items($vid);
    menu_rebuild();
    return t('The Taxonomy Menu has been rebuilt.');
  }
  menu_rebuild();
  return t('The Taxonomy Menu has been removed.');
}