diff --git a/core/includes/theme.inc b/core/includes/theme.inc index d2fe902..7ae9893 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1383,11 +1383,11 @@ function theme_get_setting($setting_name, $theme = NULL) { } // Get the saved global settings from the database. - $cache[$theme] = array_merge($cache[$theme], variable_get('theme_settings', array())); + $cache[$theme] = array_merge($cache[$theme], config('system.theme')->get('theme_settings') ?: array()); if ($theme) { // Get the saved theme-specific settings from the database. - $cache[$theme] = array_merge($cache[$theme], variable_get('theme_' . $theme . '_settings', array())); + $cache[$theme] = array_merge($cache[$theme], config('system.theme')->get('theme_' . $theme . '_settings') ?: array()); // If the theme does not support a particular feature, override the global // setting and set the value to NULL. diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index c55289c..165e52c 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -732,7 +732,7 @@ function system_theme_settings_submit($form, &$form_state) { } } - variable_set($key, $values); + config('system.theme')->set($key, $values)->save(); drupal_set_message(t('The configuration options have been saved.')); cache_invalidate(array('content' => TRUE)); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 25c7adb..fba9102 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -2214,6 +2214,17 @@ function system_update_8033() { } /** + * Converts theme_settings variable to config. + * + * @ingroup config_upgrade + */ +function system_update_8034() { + update_variables_to_config('system.theme', array( + 'theme_settings' => 'theme_settings' + )); +} + +/** * @} End of "defgroup updates-7.x-to-8.x". * The next series of updates should start at 9000. */