You are here

function system_theme_settings_submit in Drupal 6

Same name and namespace in other branches
  1. 4 modules/system.module \system_theme_settings_submit()
  2. 5 modules/system/system.module \system_theme_settings_submit()
  3. 7 modules/system/system.admin.inc \system_theme_settings_submit()

Process system_theme_settings form submissions.

1 string reference to 'system_theme_settings_submit'
system_theme_settings in modules/system/system.admin.inc
Form builder; display theme configuration for entire site and individual themes.

File

modules/system/system.admin.inc, line 559
Admin page callbacks for the system module.

Code

function system_theme_settings_submit($form, &$form_state) {
  $values = $form_state['values'];
  $key = $values['var'];
  if ($values['op'] == t('Reset to defaults')) {
    variable_del($key);
    drupal_set_message(t('The configuration options have been reset to their default values.'));
  }
  else {

    // Exclude unnecessary elements before saving.
    unset($values['var'], $values['submit'], $values['reset'], $values['form_id'], $values['op'], $values['form_build_id'], $values['form_token']);
    variable_set($key, $values);
    drupal_set_message(t('The configuration options have been saved.'));
  }
  cache_clear_all();
}