function shortcut_link_add_submit

Submit handler for shortcut_link_add().

File

modules/shortcut/shortcut.admin.inc, line 539

Code

function shortcut_link_add_submit($form, &$form_state) {
    // Add the shortcut link to the set.
    $shortcut_set = $form_state['values']['shortcut_set'];
    $shortcut_link = $form_state['values']['shortcut_link'];
    $shortcut_link['menu_name'] = $shortcut_set->set_name;
    shortcut_admin_add_link($shortcut_link, $shortcut_set, shortcut_max_slots());
    shortcut_set_save($shortcut_set);
    $form_state['redirect'] = 'admin/config/user-interface/shortcut/' . $shortcut_link['menu_name'];
    drupal_set_message(t('Added a shortcut for %title.', array(
        '%title' => $shortcut_link['link_title'],
    )));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.