From 4bc0696a849424ac4bf6e080b3799fbdefddb3bd Mon Sep 17 00:00:00 2001 From: Cory Date: Wed, 30 Aug 2017 14:37:56 -0400 Subject: [PATCH] fixes #12 --- src/TinyPNGExtension.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/TinyPNGExtension.php b/src/TinyPNGExtension.php index 0f5d548..c26ee4d 100644 --- a/src/TinyPNGExtension.php +++ b/src/TinyPNGExtension.php @@ -11,7 +11,7 @@ use Bolt\Asset\File\JavaScript; use Bolt\Asset\File\Stylesheet; use Bolt\Controller\Zone; - +use Bolt\Version as Version; use Bolt\Extension\cdowdy\tinypng\Controller\TinyPNGBackendController; use Bolt\Extension\SimpleExtension; use Bolt\Menu\MenuEntry; @@ -67,9 +67,15 @@ protected function registerMenuEntries() { protected function registerBackendControllers() { $config = $this->getConfig(); - return [ - '/extend/tinypng' => new TinyPNGBackendController( $config ), - ]; + if ( Version::compare('3.3.0', '>=')) { + return [ + '/extensions/tinypng' => new TinyPNGBackendController($config), + ]; + } else { + return [ + '/extend/tinypng' => new TinyPNGBackendController($config), + ]; + } } /**