1 system.admin.inc | system_theme_settings_submit($form, &$form_state) |
Process system_theme_settings form submissions.
File
- core/
modules/ system/ system.admin.inc, line 481 - Admin page callbacks for the System module.
Code
function system_theme_settings_submit($form, &$form_state) {
$theme = $form_state['values']['theme'];
// Exclude unnecessary elements before saving.
form_state_values_clean($form_state);
unset($form_state['values']['theme']);
// Save all settings to config.
$config = config($theme . '.settings');
foreach ($form_state['values'] as $key => $value) {
$config->set($key, $value);
}
$config->save();
backdrop_set_message(t('The configuration options have been saved.'));
cache_clear_all();
}