diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index f42f1bd..4e8cda8 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -400,8 +400,8 @@ public function addTheme(Extension $theme) { 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['parent'])) { + $theme->base_theme = $theme->info['parent']; } $this->list[$theme->getName()] = $theme; } @@ -484,10 +484,10 @@ public function rebuildThemeData() { $type = 'theme'; $this->moduleHandler->alter('system_info', $theme->info, $theme, $type); - if (!empty($theme->info['base theme'])) { + if (!empty($theme->info['parent'])) { $sub_themes[] = $key; - // Add the base theme as a proper dependency. - $themes[$key]->info['dependencies'][] = $themes[$key]->info['base theme']; + // Add the parent theme as a proper dependency. + $themes[$key]->info['dependencies'][] = $themes[$key]->info['parent']; } // Defaults to 'twig' (see $defaults above). @@ -602,11 +602,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['parent'])) { return array(); } - $base_key = $themes[$theme]->info['base theme']; + $base_key = $themes[$theme]->info['parent']; // Does the base theme exist? if (!isset($themes[$base_key])) { return array($base_key => NULL); @@ -614,8 +614,8 @@ 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'])) { + // Is the parent theme itself a child of another theme? + if (isset($themes[$base_key]->info['parent'])) { // 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/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.info.yml b/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.info.yml index 779f997..76803a1 100644 --- a/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.info.yml +++ b/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.info.yml @@ -3,4 +3,4 @@ type: theme description: 'Test theme for breakpoint.' version: VERSION core: 8.x -'base theme': bartik +parent: bartik diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index 5cb8ef3..cefefcf 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -91,8 +91,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['parent'])) { + $css = array_merge(_ckeditor_theme_css($info['parent'], $css)); } } return $css; diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module index 6b5a9cf..96d214a 100644 --- a/core/modules/quickedit/quickedit.module +++ b/core/modules/quickedit/quickedit.module @@ -94,8 +94,8 @@ function quickedit_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'])) { - quickedit_library_alter($library, $name, $info['base theme']); + if (isset($info['parent'])) { + quickedit_library_alter($library, $name, $info['parent']); } if (isset($info['quickedit_stylesheets']) && is_array($info['quickedit_stylesheets'])) { foreach ($info['quickedit_stylesheets'] as $path) { diff --git a/core/modules/system/src/Controller/SystemController.php b/core/modules/system/src/Controller/SystemController.php index 4f1b2f1..b7a14f4 100644 --- a/core/modules/system/src/Controller/SystemController.php +++ b/core/modules/system/src/Controller/SystemController.php @@ -231,7 +231,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['parent']) && !isset($themes[$theme->info['parent']]); // 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 57edc26..cc84b7d 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -422,7 +422,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['parent'])); } 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 f29a4d4..6e6377c 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,4 +3,4 @@ type: theme description: 'Test theme which has a non-existent base theme.' version: VERSION core: 8.x -'base theme': not_real_test_basetheme +parent: not_real_test_basetheme 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 6adfee4..fa872ed 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 +parent: test_basetheme stylesheets: all: - css/sub-add.css 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 2580fd6..9a8d69b 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,4 +3,4 @@ type: theme description: 'Test theme which uses update_test_basetheme as the base theme.' version: VERSION core: 8.x -'base theme': update_test_basetheme +parent: update_test_basetheme diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php index 3d89abe..31c8bfb 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php @@ -258,7 +258,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['parent'] = 'test_basetheme'; $info_basetheme->sub_themes = array('test_subtheme'); $this->assertEquals(DRUPAL_ROOT . '/core/themes/engines/twig/twig.engine', $info_basetheme->owner); @@ -293,7 +293,7 @@ public function testGetBaseThemes(array $themes, $theme, array $expected) { public function providerTestGetBaseThemes() { $data = array(); - // Tests a theme without any base theme. + // Tests a theme without any parent theme. $themes = array(); $themes['test_1'] = (object) array( 'name' => 'test_1', @@ -303,24 +303,24 @@ public function providerTestGetBaseThemes() { ); $data[] = array($themes, 'test_1', array()); - // Tests a theme with a non existing base theme. + // Tests a theme with a non existing parent theme. $themes = array(); $themes['test_1'] = (object) array( 'name' => 'test_1', 'info' => array( 'name' => 'test_1', - 'base theme' => 'test_2', + 'parent' => 'test_2', ), ); $data[] = array($themes, 'test_1', array('test_2' => NULL)); - // Tests a theme with a single existing base theme. + // Tests a theme with a single existing parent theme. $themes = array(); $themes['test_1'] = (object) array( 'name' => 'test_1', 'info' => array( 'name' => 'test_1', - 'base theme' => 'test_2', + 'parent' => 'test_2', ), ); $themes['test_2'] = (object) array( @@ -331,20 +331,20 @@ public function providerTestGetBaseThemes() { ); $data[] = array($themes, 'test_1', array('test_2' => 'test_2')); - // Tests a theme with multiple base themes. + // Tests a theme with multiple parent themes. $themes = array(); $themes['test_1'] = (object) array( 'name' => 'test_1', 'info' => array( 'name' => 'test_1', - 'base theme' => 'test_2', + 'parent' => 'test_2', ), ); $themes['test_2'] = (object) array( 'name' => 'test_2', 'info' => array( 'name' => 'test_2', - 'base theme' => 'test_3', + 'parent' => 'test_3', ), ); $themes['test_3'] = (object) array(