Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
cdowdy committed Aug 30, 2017
1 parent 93af2ee commit 4bc0696
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/TinyPNGExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
];
}
}

/**
Expand Down

0 comments on commit 4bc0696

Please sign in to comment.