function taxonomy_menu_rebuild in Taxonomy menu 7.2
Rebuilds all the menu items.
Parameters
$vid: The vocabulary ID of the taxonomy terms from which to rebuild the menu links.
1 call to taxonomy_menu_rebuild()
- taxonomy_menu_vocab_submit in ./
taxonomy_menu.admin.inc - Form submission handler for taxonomy_form_vocabulary().
File
- ./
taxonomy_menu.module, line 55 - Generates menu links for all selected taxonomy terms.
Code
function taxonomy_menu_rebuild($vid) {
// Get the name of the menu from the administration settings.
$menu_exists = taxonomy_menu_variable_get('vocab_menu', $vid, FALSE);
// Delete the menu links associated to this vocabulary.
taxonomy_menu_menu_links_delete($vid);
// Re-create the menu links if a menu is set.
if ($menu_exists) {
taxonomy_menu_menu_links_insert($vid);
}
}