function menu_edit_item_submit
Process menu and menu item add/edit form submissions.
File
-
modules/
menu/ menu.admin.inc, line 431
Code
function menu_edit_item_submit($form, &$form_state) {
$item =& $form_state['values'];
// The value of "hidden" is the opposite of the value
// supplied by the "enabled" checkbox.
$item['hidden'] = (int) (!$item['enabled']);
unset($item['enabled']);
$item['options']['attributes']['title'] = $item['description'];
list($item['menu_name'], $item['plid']) = explode(':', $item['parent']);
if (!menu_link_save($item)) {
drupal_set_message(t('There was an error saving the menu link.'), 'error');
}
else {
drupal_set_message(t('Your configuration has been saved.'));
}
$form_state['redirect'] = 'admin/structure/menu/manage/' . $item['menu_name'];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.