mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 21:16:00 +02:00
Add a message if installed on Grav < 1.1.0-beta.1
This commit is contained in:
@@ -243,6 +243,11 @@ class AdminPlugin extends Plugin
|
||||
// Only activate admin if we're inside the admin path.
|
||||
if ($this->active) {
|
||||
|
||||
if (version_compare(GRAV_VERSION, '1.1.0-beta.1', '<')) {
|
||||
$messages = $this->grav['messages'];
|
||||
$messages->add($this->grav['language']->translate('PLUGIN_ADMIN.NEEDS_GRAV_1_1'), 'error');
|
||||
}
|
||||
|
||||
// Have a unique Admin-only Cache key
|
||||
if (method_exists($this->grav['cache'], 'setKey')){
|
||||
$cache = $this->grav['cache'];
|
||||
|
||||
Reference in New Issue
Block a user