function shortcut_link_edit_submit
shortcut_link_edit_submit($form, &$form_state)
Submit handler for shortcut_link_edit().
File
- modules/shortcut/shortcut.admin.inc, line 521
- Administrative page callbacks for the shortcut module.
Code
function shortcut_link_edit_submit($form, &$form_state) { // Normalize the path in case it is an alias. $shortcut_path = drupal_get_normal_path($form_state['values']['shortcut_link']['link_path']); if (empty($shortcut_path)) { $shortcut_path = '<front>'; } $form_state['values']['shortcut_link']['link_path'] = $shortcut_path; $shortcut_link = array_merge($form_state['values']['original_shortcut_link'], $form_state['values']['shortcut_link']); menu_link_save($shortcut_link); $form_state['redirect'] = 'admin/config/user-interface/shortcut/' . $shortcut_link['menu_name']; drupal_set_message(t('The shortcut %link has been updated.', array('%link' => $shortcut_link['link_title']))); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!shortcut!shortcut.admin.inc/function/shortcut_link_edit_submit/7.x