1 system.admin.inc | system_themes_admin_form_submit($form, &$form_state) |
Process system_themes_admin_form form submissions.
File
- core/
modules/ system/ system.admin.inc, line 270 - Admin page callbacks for the System module.
Code
function system_themes_admin_form_submit($form, &$form_state) {
backdrop_set_message(t('The configuration options have been saved.'));
$themes = list_themes();
$config = config('system.core');
$current_default_theme = $config->get('theme_default');
$current_admin_theme = $config->get('admin_theme');
$new_admin_theme = $form_state['values']['admin_theme'];
if ($current_admin_theme != $new_admin_theme) {
$new_admin_theme_name = $themes[$new_admin_theme]->info['name'];
backdrop_set_message(t('The administration theme has been changed to %admin_theme.', array('%admin_theme' => $new_admin_theme_name)));
}
$config->set('admin_theme', $new_admin_theme);
$config->save();
}