diff --git a/core/includes/theme.inc b/core/includes/theme.inc index c63f679..fbbf81a 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -124,8 +124,8 @@ function drupal_theme_initialize() { * @param \Drupal\Core\Extension\Extension $theme * The theme extension object. * @param \Drupal\Core\Extension\Extension[] $base_theme - * An optional array of objects that represent the 'base theme' if the - * theme is meant to be derivative of another theme. It requires + * An optional array of objects that represents the list of 'base' themes if + * the theme is meant to be derivative of another theme. It requires * the same information as the $theme object. It should be in * 'oldest first' order, meaning the top level of the chain will * be first. diff --git a/core/lib/Drupal/Core/Extension/InfoParserInterface.php b/core/lib/Drupal/Core/Extension/InfoParserInterface.php index 2c6e2d1..9acb330 100644 --- a/core/lib/Drupal/Core/Extension/InfoParserInterface.php +++ b/core/lib/Drupal/Core/Extension/InfoParserInterface.php @@ -35,7 +35,7 @@ * Information stored in a theme .info.yml file: * - screenshot: Path to screenshot relative to the theme's .info.yml file. * - engine: Theme engine; typically twig. - * - base theme: Name of a base theme, if applicable. + * - base: Name of a base theme, if applicable. * - regions: Listed regions. * - features: Features available. * - stylesheets: Theme stylesheets. diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index b43d3e4..fd349a6 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -222,8 +222,8 @@ public function listInfo() { if (isset($theme->info['engine'])) { $theme->engine = $theme->info['engine']; } - if (isset($theme->info['base theme'])) { - $theme->base_theme = $theme->info['base theme']; + if (isset($theme->info['base'])) { + $theme->base_theme = $theme->info['base']; } // Status is normally retrieved from the database. Add zero values when // read from the installation directory to prevent notices. @@ -293,7 +293,7 @@ public function rebuildThemeData() { $type = 'theme'; $this->moduleHandler->alter('system_info', $theme->info, $theme, $type); - if (!empty($theme->info['base theme'])) { + if (!empty($theme->info['base'])) { $sub_themes[] = $key; } @@ -399,11 +399,11 @@ public function getBaseThemes(array $themes, $theme) { * An array of base themes. */ protected function doGetBaseThemes(array $themes, $theme, $used_themes = array()) { - if (!isset($themes[$theme]->info['base theme'])) { + if (!isset($themes[$theme]->info['base'])) { return array(); } - $base_key = $themes[$theme]->info['base theme']; + $base_key = $themes[$theme]->info['base']; // Does the base theme exist? if (!isset($themes[$base_key])) { return array($base_key => NULL); @@ -412,7 +412,7 @@ protected function doGetBaseThemes(array $themes, $theme, $used_themes = array() $current_base_theme = array($base_key => $themes[$base_key]->info['name']); // Is the base theme itself a child of another theme? - if (isset($themes[$base_key]->info['base theme'])) { + if (isset($themes[$base_key]->info['base'])) { // Do we already know the base themes of this theme? if (isset($themes[$base_key]->base_themes)) { return $themes[$base_key]->base_themes + $current_base_theme; diff --git a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php index 2ba52cd..7feff72 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php @@ -55,7 +55,7 @@ public function disable(array $theme_list); * in the .info.yml file. * - prefix: The base theme engine prefix. * - engine: The machine name of the theme engine. - * - base_theme: If this is a sub-theme, the machine name of the base theme + * - base: If this is a sub-theme, the machine name of the base theme * defined in the .info.yml file. Otherwise, the element is not set. * - base_themes: If this is a sub-theme, an associative array of the * base-theme ancestors of this theme, starting with this theme's base diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/breakpoint_test_theme.info.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/breakpoint_test_theme.info.yml index 0fa9096..8cbe1b6 100644 --- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/breakpoint_test_theme.info.yml +++ b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/breakpoint_test_theme.info.yml @@ -3,5 +3,5 @@ type: theme description: 'Test theme for breakpoint.' version: VERSION core: 8.x -'base theme': bartik +base: bartik hidden: true diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index 7000dbf..b776d30 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -79,8 +79,8 @@ function _ckeditor_theme_css($theme = NULL) { $css[$key] = $theme_path . '/' . $path; } } - if (isset($info['base theme'])) { - $css = array_merge(_ckeditor_theme_css($info['base theme'], $css)); + if (isset($info['base'])) { + $css = array_merge(_ckeditor_theme_css($info['base'], $css)); } } return $css; diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module index 6c8e90f..dd1c249 100644 --- a/core/modules/edit/edit.module +++ b/core/modules/edit/edit.module @@ -80,8 +80,8 @@ function edit_library_alter(array &$library, $name, $theme = NULL) { if ($theme && $theme_path = drupal_get_path('theme', $theme)) { $info = system_get_info('theme', $theme); // Recurse to process base theme(s) first. - if (isset($info['base theme'])) { - edit_library_alter($library, $name, $info['base theme']); + if (isset($info['base'])) { + edit_library_alter($library, $name, $info['base']); } if (isset($info['edit_stylesheets']) && is_array($info['edit_stylesheets'])) { foreach ($info['edit_stylesheets'] as $path) { diff --git a/core/modules/system/lib/Drupal/system/Controller/SystemController.php b/core/modules/system/lib/Drupal/system/Controller/SystemController.php index 421791f..7f51fae 100644 --- a/core/modules/system/lib/Drupal/system/Controller/SystemController.php +++ b/core/modules/system/lib/Drupal/system/Controller/SystemController.php @@ -230,7 +230,7 @@ public function themesPage() { $theme->incompatible_core = !isset($theme->info['core']) || ($theme->info['core'] != \DRUPAL::CORE_COMPATIBILITY) || !isset($theme->info['regions']['content']); $theme->incompatible_php = version_compare(phpversion(), $theme->info['php']) < 0; // Confirmed that the base theme is available. - $theme->incompatible_base = isset($theme->info['base theme']) && !isset($themes[$theme->info['base theme']]); + $theme->incompatible_base = isset($theme->info['base']) && !isset($themes[$theme->info['base']]); // Confirm that the theme engine is available. $theme->incompatible_engine = isset($theme->info['engine']) && !isset($theme->owner); } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 8cc1599..5f8307d 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -472,7 +472,7 @@ function template_preprocess_system_themes_page(&$variables) { $current_theme['incompatible'] = t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $theme->info['php'], '!php_version' => phpversion())); } elseif (!empty($theme->incompatible_base)) { - $current_theme['incompatible'] = t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base theme'])); + $current_theme['incompatible'] = t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base'])); } elseif (!empty($theme->incompatible_engine)) { $current_theme['incompatible'] = t('This theme requires the theme engine @theme_engine to operate correctly.', array('@theme_engine' => $theme->info['engine'])); diff --git a/core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml b/core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml index a8d2bfe..b08f3fd 100644 --- a/core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml +++ b/core/modules/system/tests/themes/test_invalid_basetheme/test_invalid_basetheme.info.yml @@ -3,5 +3,5 @@ type: theme description: 'Test theme which has a non-existent base theme.' version: VERSION core: 8.x -'base theme': not_real_test_basetheme +base: not_real_test_basetheme hidden: true diff --git a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml index 6123684..984398d 100644 --- a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml +++ b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml @@ -3,7 +3,7 @@ type: theme description: 'Test theme which uses test_basetheme as the base theme.' version: VERSION core: 8.x -'base theme': test_basetheme +base: test_basetheme hidden: true stylesheets: all: diff --git a/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml b/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml index d844542..fe349fa 100644 --- a/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml +++ b/core/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info.yml @@ -3,5 +3,5 @@ type: theme description: 'Test theme which uses update_test_basetheme as the base theme.' version: VERSION core: 8.x -'base theme': update_test_basetheme +base: update_test_basetheme hidden: true diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php index 3864923..070c4d1 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php @@ -208,7 +208,7 @@ public function testEnableAndListInfo() { 'example/theme', ), 'engine' => 'twig', - 'base theme' => 'stark', + 'base' => 'stark', ); $list_info = $this->themeHandler->listInfo(); @@ -341,7 +341,7 @@ public function testRebuildThemeDataWithThemeParents() { $this->assertEquals('test_subtheme', $info_subtheme->getName()); // Test the parent/child-theme properties. - $info_subtheme->info['base theme'] = 'test_basetheme'; + $info_subtheme->info['base'] = 'test_basetheme'; $info_basetheme->sub_themes = array('test_subtheme'); $this->assertEquals(DRUPAL_ROOT . '/core/themes/engines/twig/twig.engine', $info_basetheme->owner); @@ -392,7 +392,7 @@ public function providerTestGetBaseThemes() { 'name' => 'test_1', 'info' => array( 'name' => 'test_1', - 'base theme' => 'test_2', + 'base' => 'test_2', ), ); $data[] = array($themes, 'test_1', array('test_2' => NULL)); @@ -403,7 +403,7 @@ public function providerTestGetBaseThemes() { 'name' => 'test_1', 'info' => array( 'name' => 'test_1', - 'base theme' => 'test_2', + 'base' => 'test_2', ), ); $themes['test_2'] = (object) array( @@ -420,14 +420,14 @@ public function providerTestGetBaseThemes() { 'name' => 'test_1', 'info' => array( 'name' => 'test_1', - 'base theme' => 'test_2', + 'base' => 'test_2', ), ); $themes['test_2'] = (object) array( 'name' => 'test_2', 'info' => array( 'name' => 'test_2', - 'base theme' => 'test_3', + 'base' => 'test_3', ), ); $themes['test_3'] = (object) array(