function shortcut_set_customize_submit
Submit handler for shortcut_set_customize().
File
-
modules/
shortcut/ shortcut.admin.inc, line 318
Code
function shortcut_set_customize_submit($form, &$form_state) {
foreach ($form_state['values']['shortcuts'] as $group => $links) {
foreach ($links as $mlid => $data) {
$link = menu_link_load($mlid);
$link['hidden'] = $data['status'] == 'enabled' ? 0 : 1;
$link['weight'] = $data['weight'];
menu_link_save($link);
}
}
drupal_set_message(t('The shortcut set has been updated.'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.