function shortcut_set_add_form_submit

7.x shortcut.admin.inc shortcut_set_add_form_submit($form, &$form_state)

Submit handler for shortcut_set_add_form().

File

drupal-7.x/modules/shortcut/shortcut.admin.inc, line 238
Administrative page callbacks for the shortcut module.

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;
}