function menu_delete_links

Deletes all links for a menu.


$menu_name: The name of the menu whose links will be deleted.

Related topics

3 calls to menu_delete_links()
menu_delete in drupal/modules/menu/menu.module
Delete a custom menu and all contained links.
shortcut_set_delete in drupal/modules/shortcut/shortcut.module
Deletes a shortcut set.
shortcut_uninstall in drupal/modules/shortcut/shortcut.install
Implements hook_uninstall().


drupal/includes/, line 3037
API for the Drupal menu system.


function menu_delete_links($menu_name) {
  $links = menu_load_links($menu_name);
  foreach ($links as $link) {

    // To speed up the deletion process, we reset some link properties that
    // would trigger re-parenting logic in _menu_delete_item() and
    // _menu_update_parental_status().
    $link['has_children'] = FALSE;
    $link['plid'] = 0;