summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 11004306b..14b2181e3 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -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);