function system_theme_settings_submit

You are here

7 system.admin.inc system_theme_settings_submit($form, &$form_state)
4.7 system.module system_theme_settings_submit($form_id, $values)
5 system.module system_theme_settings_submit($form_id, $form_values)
6 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 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();
}