You are here

function devel_menu_reset_form_submit in Devel 5

Process menu reset form submission.

File

./devel.module, line 859

Code

function devel_menu_reset_form_submit() {
  db_query('DELETE FROM {menu}');
  $mid = module_invoke('menu', 'edit_item_save', array(
    'title' => t('Primary links'),
    'pid' => 0,
    'type' => MENU_CUSTOM_MENU,
  ));
  variable_set('menu_primary_menu', $mid);
  variable_set('menu_secondary_menu', $mid);
  drupal_set_message(t('The menu items have been reset to their default settings.'));
  return 'admin/build/menu';
}