diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc index d21701221a36..f9fa425df61b 100644 --- a/core/modules/block/block.admin.inc +++ b/core/modules/block/block.admin.inc @@ -312,7 +312,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { ); $theme_default = variable_get('theme_default', 'stark'); - $admin_theme = config('system.site')->get('admin_theme'); + $admin_theme = config('system.theme')->get('admin'); foreach (list_themes() as $key => $theme) { // Only display enabled themes if ($theme->status) { diff --git a/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php b/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php index b8a2ef2e6046..85247b511125 100644 --- a/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/NewDefaultThemeBlocksTest.php @@ -40,7 +40,7 @@ class NewDefaultThemeBlocksTest extends WebTestBase { // Ensure no other theme's blocks are in the block table yet. $themes = array(); $themes['default'] = variable_get('theme_default', 'stark'); - if ($admin_theme = config('system.site')->get('admin_theme')) { + if ($admin_theme = config('system.theme')->get('admin')) { $themes['admin'] = $admin_theme; } $count = db_query_range('SELECT 1 FROM {block} WHERE theme NOT IN (:themes)', 0, 1, array(':themes' => $themes))->fetchField(); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php index 9533a1c15e79..1c1ffb1f1b00 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php @@ -129,7 +129,7 @@ class NodeBlockFunctionalTest extends NodeTestBase { $custom_block['types[article]'] = TRUE; $custom_block['body[value]'] = $this->randomName(32); $custom_block['regions[' . variable_get('theme_default', 'stark') . ']'] = 'content'; - if ($admin_theme = config('system.site')->get('admin_theme')) { + if ($admin_theme = config('system.theme')->get('admin')) { $custom_block['regions[' . $admin_theme . ']'] = 'content'; } $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block')); diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php index ad12639b3664..cd453030b782 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php @@ -64,7 +64,7 @@ class ShortcutLinksTest extends ShortcutTestBase { */ function testShortcutQuickLink() { theme_enable(array('seven')); - config('system.site')->set('admin_theme', 'seven')->save(); + config('system.theme')->set('admin', 'seven')->save(); variable_set('node_admin_theme', TRUE); $this->drupalGet($this->set->links[0]['link_path']); $this->assertRaw(t('Remove from %title shortcuts', array('%title' => $this->set->title)), '"Add to shortcuts" link properly switched to "Remove from shortcuts".'); diff --git a/core/modules/system/config/system.site.yml b/core/modules/system/config/system.site.yml index 1776d40de1e1..b642dc83ecf2 100644 --- a/core/modules/system/config/system.site.yml +++ b/core/modules/system/config/system.site.yml @@ -1,4 +1,3 @@ -admin_theme: '0' name: Drupal mail: '' slogan: '' diff --git a/core/modules/system/config/system.theme.yml b/core/modules/system/config/system.theme.yml index 40fad066540b..cf330e1840da 100644 --- a/core/modules/system/config/system.theme.yml +++ b/core/modules/system/config/system.theme.yml @@ -1,2 +1,3 @@ +admin: '0' enabled: stark: '0' diff --git a/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php b/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php index 9be755123023..97593f23cdb7 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php @@ -37,7 +37,7 @@ class PageTest extends WebTestBase { // is using a different theme than would normally be used by the batch API. variable_set('theme_default', 'bartik'); theme_enable(array('seven')); - config('system.site')->set('admin_theme', 'seven')->save(); + config('system.theme')->set('admin', 'seven')->save(); // Log in as an administrator who can see the administrative theme. $admin_user = $this->drupalCreateUser(array('view the administration theme')); $this->drupalLogin($admin_user); diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php index 82458d33ae3e..179ea9347d8e 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php @@ -38,7 +38,7 @@ class RouterTest extends WebTestBase { // and administrative theme that they expect. theme_enable(array('bartik')); variable_set('theme_default', 'bartik'); - config('system.site')->set('admin_theme', 'seven')->save(); + config('system.theme')->set('admin', 'seven')->save(); theme_disable(array('stark')); // Enable navigation menu block. diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 5d6a70f75c18..a5194f73b516 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -120,7 +120,7 @@ function system_themes_page() { $theme_default = variable_get('theme_default', 'stark'); $theme_groups = array(); - $admin_theme = config('system.site')->get('admin_theme'); + $admin_theme = config('system.theme')->get('admin'); foreach ($themes as &$theme) { if (!empty($theme->info['hidden'])) { @@ -257,7 +257,7 @@ function system_themes_admin_form($form, &$form_state, $theme_options) { '#options' => array(0 => t('Default theme')) + $theme_options, '#title' => t('Administration theme'), '#description' => t('Choose "Default theme" to always use the same theme as the rest of the site.'), - '#default_value' => config('system.site')->get('admin_theme'), + '#default_value' => config('system.theme')->get('admin'), ); $form['admin_theme']['actions'] = array('#type' => 'actions'); $form['admin_theme']['actions']['submit'] = array( @@ -272,7 +272,7 @@ function system_themes_admin_form($form, &$form_state, $theme_options) { */ function system_themes_admin_form_submit($form, &$form_state) { drupal_set_message(t('The configuration options have been saved.')); - config('system.site')->set('admin_theme', $form_state['values']['admin_theme'])->save(); + config('system.theme')->set('admin', $form_state['values']['admin_theme'])->save(); } /** @@ -309,7 +309,7 @@ function system_theme_disable() { // Check if the specified theme is one recognized by the system. if (!empty($themes[$theme])) { // Do not disable the default or admin theme. - if ($theme == variable_get('theme_default', 'stark') || $theme == config('system.site')->get('admin_theme')) { + if ($theme == variable_get('theme_default', 'stark') || $theme == config('system.theme')->get('admin')) { drupal_set_message(t('%theme is the default theme and cannot be disabled.', array('%theme' => $themes[$theme]->info['name'])), 'error'); } else { @@ -353,7 +353,7 @@ function system_theme_default() { // The status message depends on whether an admin theme is currently in use: // a value of 0 means the admin theme is set to be the default theme. - $admin_theme = config('system.site')->get('admin_theme'); + $admin_theme = config('system.theme')->get('admin'); if ($admin_theme != 0 && $admin_theme != $theme) { drupal_set_message(t('Please note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', array( '%admin_theme' => $themes[$admin_theme]->info['name'], diff --git a/core/modules/system/system.install b/core/modules/system/system.install index a1ad5461b6e8..06935d16e509 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -2325,8 +2325,8 @@ function system_update_8040() { * @ingroup config_upgrade */ function system_update_8041() { - update_variables_to_config('system.site', array( - 'admin_theme' => 'admin_theme' + update_variables_to_config('system.theme', array( + 'admin_theme' => 'admin' )); } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index c3df4c1147bf..139fb0f45b81 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -214,7 +214,7 @@ function system_permission() { ), 'view the administration theme' => array( 'title' => t('View the administration theme'), - 'description' => config('system.site')->get('admin_theme') ?: t('This is only used when the site is configured to use a separate administration theme on the Appearance page.', array('@appearance-url' => url('admin/appearance'))), + 'description' => config('system.theme')->get('admin') ?: t('This is only used when the site is configured to use a separate administration theme on the Appearance page.', array('@appearance-url' => url('admin/appearance'))), ), 'access site reports' => array( 'title' => t('View site reports'), @@ -2394,7 +2394,7 @@ function system_custom_theme() { $request = drupal_container()->get('request'); $path = $request->attributes->get('system_path'); if (user_access('view the administration theme') && path_is_admin($path)) { - return config('system.site')->get('admin_theme'); + return config('system.theme')->get('admin'); } } } diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module index f3bd0337e59a..36cef57fa715 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.module +++ b/core/modules/system/tests/modules/menu_test/menu_test.module @@ -462,7 +462,7 @@ function menu_test_theme_page_callback($inherited = FALSE) { function menu_test_theme_callback($argument) { // Test using the variable administrative theme. if ($argument == 'use-admin-theme') { - return config('system.site')->get('admin_theme'); + return config('system.theme')->get('admin'); } // Test using a theme that exists, but may or may not be enabled. elseif ($argument == 'use-stark-theme') { diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php index e555bb6c77a0..8abad54e8406 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php @@ -27,7 +27,7 @@ class ThemeTest extends TaxonomyTestBase { // the duration of these tests. variable_set('theme_default', 'bartik'); theme_enable(array('seven')); - config('system.site')->set('admin_theme', 'seven')->save(); + config('system.theme')->set('admin', 'seven')->save(); // Create and log in as a user who has permission to add and edit taxonomy // terms and view the administrative theme. diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index e2d65f053086..b24946ef2c49 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -437,6 +437,6 @@ function standard_install() { // Enable the admin theme. theme_enable(array('seven')); - config('system.site')->set('admin_theme', 'seven')->save(); + config('system.theme')->set('admin', 'seven')->save(); variable_set('node_admin_theme', '1'); }