diff --git a/app/Controllers/SiteController.php b/app/Controllers/SiteController.php index 79cc10b..06dc945 100644 --- a/app/Controllers/SiteController.php +++ b/app/Controllers/SiteController.php @@ -75,6 +75,10 @@ public function index(Request $request, Response $response, array $args) : Respo return $response->withJson($entry); } + + $themeBootstrapPath = PATH['project']. '/themes/' . flextype('registry')->get('plugins.site.settings.theme') . '/theme.php'; + filesystem()->file($themeBootstrapPath)->exists() and include_once $themeBootstrapPath; + // Set template path for current entry $path = 'themes/' . flextype('registry')->get('plugins.site.settings.theme') . '/' . (empty($entry['template']) ? 'templates/default' : 'templates/' . $entry['template']) . '.html'; diff --git a/dependencies.php b/dependencies.php index 81a843e..526a4ac 100644 --- a/dependencies.php +++ b/dependencies.php @@ -22,6 +22,3 @@ * Init themes */ flextype()->container()['themes']->init(); - -$themeBootstrapPath = PATH['project']. '/themes/' . flextype('registry')->get('plugins.site.settings.theme') . '/theme.php'; -filesystem()->file($themeBootstrapPath)->exists() and include_once $themeBootstrapPath;