function system_theme_settings_submit

7.x system.admin.inc system_theme_settings_submit($form, &$form_state)
6.x system.admin.inc system_theme_settings_submit($form, &$form_state)

Process system_theme_settings form submissions.

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

File

drupal-6.x/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();
}