function styleswitcher_style_delete_form_submit in Style Switcher 7.2
Same name and namespace in other branches
- 6.2 styleswitcher.admin.inc \styleswitcher_style_delete_form_submit()
Form submission handler for styleswitcher_style_delete_form().
File
- ./
styleswitcher.admin.inc, line 356 - Styleswitcher configuration functionality.
Code
function styleswitcher_style_delete_form_submit($form, &$form_state) {
$name = $form_state['values']['name'];
$styles = styleswitcher_custom_styles();
if (isset($styles[$name]['path'])) {
unset($styles[$name]);
variable_set('styleswitcher_custom_styles', $styles);
drupal_set_message(t('The style %title has been deleted.', array(
'%title' => $form_state['values']['label'],
)));
}
else {
drupal_set_message(t('The blank style cannot be deleted.'), 'warning');
}
_styleswitcher_configuration_changed($form_state);
}