Skip to content
Snippets Groups Projects
Commit 99233a9c authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #19590 by Moshe: lazy initialization of the theme system.  Improves
  performance of pages that don't need the theme system (such as RSS feeds)
  and makes it easier to set a custom theme.
parent a9091183
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1905,7 +1905,4 @@ function clone($object) {
// Initialize the localization system.
$locale = locale_initialize();
// Initialize the enabled theme.
$theme = init_theme();
?>
......@@ -171,8 +171,12 @@ function list_theme_engines($refresh = FALSE) {
* An HTML string that generates the themed output.
*/
function theme() {
global $theme;
global $theme_engine;
global $theme, $theme_engine;
if (!$theme) {
// Initialize the enabled theme.
$theme = init_theme();
}
$args = func_get_args();
$function = array_shift($args);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment