You are here

function menu_item_delete_form_submit in Drupal 7

Same name and namespace in other branches
  1. 5 modules/menu/menu.module \menu_item_delete_form_submit()
  2. 6 modules/menu/menu.admin.inc \menu_item_delete_form_submit()

Process menu delete form submissions.

File

modules/menu/menu.admin.inc, line 654
Administrative page callbacks for menu module.

Code

function menu_item_delete_form_submit($form, &$form_state) {
  $item = $form['#item'];
  menu_link_delete($item['mlid']);
  $t_args = array(
    '%title' => $item['link_title'],
  );
  drupal_set_message(t('The menu link %title has been deleted.', $t_args));
  watchdog('menu', 'Deleted menu link %title.', $t_args, WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/structure/menu/manage/' . $item['menu_name'];
}