diff --git a/admin.php b/admin.php index a1128e07..adc4030f 100644 --- a/admin.php +++ b/admin.php @@ -111,6 +111,12 @@ class AdminPlugin extends Plugin // Disable Asset pipelining $this->config->set('system.assets.css_pipeline', false); $this->config->set('system.assets.js_pipeline', false); + + // Replace themes service with admin. + $this->grav['themes'] = function ($c) { + require_once __DIR__ . '/classes/themes.php'; + return new Themes($this->grav); + }; } // We need popularity no matter what diff --git a/classes/themes.php b/classes/themes.php new file mode 100644 index 00000000..7c321b8f --- /dev/null +++ b/classes/themes.php @@ -0,0 +1,18 @@ +grav['themes']; + $themes->configure(); + } +}