Loading core/lib/Drupal/Core/Theme/ActiveTheme.php +2 −1 Original line number Diff line number Diff line Loading @@ -183,7 +183,8 @@ public function getLibraries() { * Returns an array of base theme extension objects keyed by name. * * The order starts with the base theme of $this and ends with the root of * the dependency chain. * the dependency chain. For most use cases, parent themes are expected to * be called first, so this order needs to be reversed with array_reverse() * * @return \Drupal\Core\Extension\Extension[] */ Loading core/lib/Drupal/Core/Theme/ThemeInitialization.php +3 −3 Original line number Diff line number Diff line Loading @@ -131,14 +131,14 @@ public function loadActiveTheme(ActiveTheme $active_theme) { if ($active_theme->getEngine()) { // Include the engine. include_once $this->root . '/' . $active_theme->getOwner(); foreach ($active_theme->getBaseThemeExtensions() as $base) { foreach (array_reverse($active_theme->getBaseThemeExtensions()) as $base) { $base->load(); } $active_theme->getExtension()->load(); } else { // include non-engine theme files foreach ($active_theme->getBaseThemeExtensions() as $base) { foreach (array_reverse($active_theme->getBaseThemeExtensions()) as $base) { // Include the theme file or the engine. if ($base->owner) { include_once $this->root . '/' . $base->owner; Loading Loading @@ -178,7 +178,7 @@ public function getActiveTheme(Extension $theme, array $base_themes = []) { $values['libraries_override'] = []; // Get libraries overrides declared by base themes. foreach ($base_themes as $base) { foreach (array_reverse($base_themes) as $base) { if (!empty($base->info['libraries-override'])) { foreach ($base->info['libraries-override'] as $library => $override) { $values['libraries_override'][$base->getPath()][$library] = $override; Loading core/lib/Drupal/Core/Theme/ThemeManager.php +1 −1 Original line number Diff line number Diff line Loading @@ -436,7 +436,7 @@ public function alterForTheme(ActiveTheme $theme, $type, &$data, &$context1 = NU } } $theme_keys = array_keys($theme->getBaseThemeExtensions()); $theme_keys = array_reverse(array_keys($theme->getBaseThemeExtensions())); $theme_keys[] = $theme->getName(); $functions = []; foreach ($theme_keys as $theme_key) { Loading core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.info.yml +5 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,8 @@ type: theme description: 'Test theme which uses test_subtheme as the base theme.' version: VERSION base theme: test_subtheme libraries-override: test_basetheme/global-styling: css: base: css/sub-sub-last-override.css: false core/modules/views/src/ViewExecutable.php +1 −1 Original line number Diff line number Diff line Loading @@ -1485,7 +1485,7 @@ public function render($display_id = NULL) { // @todo In the long run, it would be great to execute a view without // the theme system at all. See https://www.drupal.org/node/2322623. $active_theme = \Drupal::theme()->getActiveTheme(); $themes = array_keys($active_theme->getBaseThemeExtensions()); $themes = array_reverse(array_keys($active_theme->getBaseThemeExtensions())); $themes[] = $active_theme->getName(); // Check for already-cached output. Loading Loading
core/lib/Drupal/Core/Theme/ActiveTheme.php +2 −1 Original line number Diff line number Diff line Loading @@ -183,7 +183,8 @@ public function getLibraries() { * Returns an array of base theme extension objects keyed by name. * * The order starts with the base theme of $this and ends with the root of * the dependency chain. * the dependency chain. For most use cases, parent themes are expected to * be called first, so this order needs to be reversed with array_reverse() * * @return \Drupal\Core\Extension\Extension[] */ Loading
core/lib/Drupal/Core/Theme/ThemeInitialization.php +3 −3 Original line number Diff line number Diff line Loading @@ -131,14 +131,14 @@ public function loadActiveTheme(ActiveTheme $active_theme) { if ($active_theme->getEngine()) { // Include the engine. include_once $this->root . '/' . $active_theme->getOwner(); foreach ($active_theme->getBaseThemeExtensions() as $base) { foreach (array_reverse($active_theme->getBaseThemeExtensions()) as $base) { $base->load(); } $active_theme->getExtension()->load(); } else { // include non-engine theme files foreach ($active_theme->getBaseThemeExtensions() as $base) { foreach (array_reverse($active_theme->getBaseThemeExtensions()) as $base) { // Include the theme file or the engine. if ($base->owner) { include_once $this->root . '/' . $base->owner; Loading Loading @@ -178,7 +178,7 @@ public function getActiveTheme(Extension $theme, array $base_themes = []) { $values['libraries_override'] = []; // Get libraries overrides declared by base themes. foreach ($base_themes as $base) { foreach (array_reverse($base_themes) as $base) { if (!empty($base->info['libraries-override'])) { foreach ($base->info['libraries-override'] as $library => $override) { $values['libraries_override'][$base->getPath()][$library] = $override; Loading
core/lib/Drupal/Core/Theme/ThemeManager.php +1 −1 Original line number Diff line number Diff line Loading @@ -436,7 +436,7 @@ public function alterForTheme(ActiveTheme $theme, $type, &$data, &$context1 = NU } } $theme_keys = array_keys($theme->getBaseThemeExtensions()); $theme_keys = array_reverse(array_keys($theme->getBaseThemeExtensions())); $theme_keys[] = $theme->getName(); $functions = []; foreach ($theme_keys as $theme_key) { Loading
core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.info.yml +5 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,8 @@ type: theme description: 'Test theme which uses test_subtheme as the base theme.' version: VERSION base theme: test_subtheme libraries-override: test_basetheme/global-styling: css: base: css/sub-sub-last-override.css: false
core/modules/views/src/ViewExecutable.php +1 −1 Original line number Diff line number Diff line Loading @@ -1485,7 +1485,7 @@ public function render($display_id = NULL) { // @todo In the long run, it would be great to execute a view without // the theme system at all. See https://www.drupal.org/node/2322623. $active_theme = \Drupal::theme()->getActiveTheme(); $themes = array_keys($active_theme->getBaseThemeExtensions()); $themes = array_reverse(array_keys($active_theme->getBaseThemeExtensions())); $themes[] = $active_theme->getName(); // Check for already-cached output. Loading