diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 1b86f46b3..0bcb8dd02 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -33,6 +33,11 @@ $e107 = e107::getInstance(); $sql = e107::getDb(); e107::getDebug()->logTime('(Header Top)'); +if($themeSC = e107::getScBatch('theme')) // init theme_shortcodes after THEME_LAYOUT is available. +{ + $themeSC->init(); + unset($themeSC); +} e107::getRender()->init(); diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php index dd7a2e2d0..8c7849c7d 100644 --- a/e107_handlers/shortcode_handler.php +++ b/e107_handlers/shortcode_handler.php @@ -292,7 +292,7 @@ class e_parse_shortcode { $this->scClasses[$class] = new $class(); - if(method_exists($this->scClasses[$class], 'init')) + if($class !== 'theme_shortcodes' && method_exists($this->scClasses[$class], 'init')) { $this->scClasses[$class]->init(); }