function shortcut_set_add_form_submit
Submit handler for shortcut_set_add_form().
File
-
modules/
shortcut/ shortcut.admin.inc, line 238
Code
function shortcut_set_add_form_submit($form, &$form_state) {
// Save a new shortcut set with links copied from the user's default set.
$default_set = shortcut_default_set();
$set = (object) array(
'title' => $form_state['values']['new'],
'links' => menu_links_clone($default_set->links),
);
shortcut_set_save($set);
drupal_set_message(t('The %set_name shortcut set has been created. You can edit it from this page.', array(
'%set_name' => $set->title,
)));
$form_state['redirect'] = 'admin/config/user-interface/shortcut/' . $set->set_name;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.