diff --git a/core/modules/system/src/Controller/SystemController.php b/core/modules/system/src/Controller/SystemController.php index 41e351faf8..ebe4996298 100644 --- a/core/modules/system/src/Controller/SystemController.php +++ b/core/modules/system/src/Controller/SystemController.php @@ -330,7 +330,9 @@ public function themesPage() { 'attributes' => ['title' => $this->t('Set @theme as default theme', ['@theme' => $theme->info['name']])], ]; } - $admin_theme_options[$theme->getName()] = $theme->info['name'] . ($theme->is_experimental ? ' (' . t('Experimental') . ')' : ''); + if (isset($theme->info['admin theme']) && $theme->info['admin theme'] == TRUE) { + $admin_theme_options[$theme->getName()] = $theme->info['name'] . ($theme->is_experimental ? ' (' . t('Experimental') . ')' : ''); + } } else { $theme->operations[] = [ diff --git a/core/modules/system/src/Form/ThemeAdminForm.php b/core/modules/system/src/Form/ThemeAdminForm.php index 1951f54829..8a82b906e6 100644 --- a/core/modules/system/src/Form/ThemeAdminForm.php +++ b/core/modules/system/src/Form/ThemeAdminForm.php @@ -38,7 +38,7 @@ public function buildForm(array $form, FormStateInterface $form_state, array $th ]; $form['admin_theme']['admin_theme'] = [ '#type' => 'select', - '#options' => ['' => $this->t('Default theme')] + $theme_options, + '#options' => $theme_options, '#title' => $this->t('Administration theme'), '#description' => $this->t('Choose "Default theme" to always use the same theme as the rest of the site.'), '#default_value' => $this->config('system.theme')->get('admin'), diff --git a/core/themes/claro/claro.info.yml b/core/themes/claro/claro.info.yml index 07be922f74..baf0175f88 100644 --- a/core/themes/claro/claro.info.yml +++ b/core/themes/claro/claro.info.yml @@ -18,6 +18,7 @@ alt text: 'Screenshot of Claro, Drupal administration theme.' package: Core version: VERSION experimental: true +admin theme: true libraries: - core/drupal.message - core/normalize diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index f02a6f0a86..1df22aa033 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -18,6 +18,7 @@ description: 'The default administration theme for Drupal 8 was designed with cl alt text: 'Default administration theme for Drupal 8 with simple blocks and clean lines.' package: Core version: VERSION +admin theme: true libraries: - seven/classy.messages - core/normalize