diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 1b3e34f00a..f641aa0e7a 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2070,7 +2070,6 @@ function drupal_common_theme() { ], 'authorize_report' => [ 'variables' => ['messages' => [], 'attributes' => []], - 'includes' => ['core/includes/theme.maintenance.inc'], 'template' => 'authorize-report', ], 'pager' => [ diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index 094780a10e..7a5997e0eb 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -475,9 +475,7 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path) // Load the includes, as they may contain preprocess functions. if (isset($info['includes'])) { - foreach ($info['includes'] as $include_file) { - include_once $this->root . '/' . $include_file; - } + throw new \Exception($info['includes'][0]); } // If the theme implementation defines a file, then also use the path diff --git a/core/modules/views/views.module b/core/modules/views/views.module index f04bd56338..b2cb9f5183 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -177,12 +177,7 @@ function views_theme($existing, $type, $theme, $path) { // For the views module we ensure views.theme.inc is included. if ($def['provider'] == 'views') { - if (!isset($hooks[$def['theme']]['includes'])) { - $hooks[$def['theme']]['includes'] = []; - } - if (!in_array('views.theme.inc', $hooks[$def['theme']]['includes'])) { - $hooks[$def['theme']]['includes'][] = $module_dir . '/views.theme.inc'; - } + $hooks[$def['theme']]['file'] = '../views.theme.inc'; } // The theme_file definition is always relative to the modules directory. elseif (!empty($def['theme_file'])) {