mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 03:36:30 +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'];
|
||||
|
||||
@@ -523,3 +523,4 @@ PLUGIN_ADMIN:
|
||||
FRONTMATTER_IGNORE_FIELDS: "Ignore frontmatter fields"
|
||||
FRONTMATTER_IGNORE_FIELDS_HELP: "Certain frontmatter fields may contain Twig but should not be processed, such as 'forms'"
|
||||
PACKAGE_X_INSTALLED_SUCCESSFULLY: "Package %s installed successfully"
|
||||
NEEDS_GRAV_1_1: "<strong>IMPORTANT</strong>: The Admin plugin version 1.1 <strong>requires Grav 1.1</strong>. You are running Grav 1.0. <strong>Update Grav now</strong>."
|
||||
|
||||
Reference in New Issue
Block a user