From 4ded5485d8afb0dc892dcd425c643b18d9f0ed01 Mon Sep 17 00:00:00 2001 From: floppy0 <31189947+floppy0@users.noreply.github.com> Date: Wed, 27 Dec 2017 14:44:57 +0100 Subject: [PATCH] functions for plugins --- bl-kernel/functions.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index cde4ea92..5234c9c0 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -273,14 +273,20 @@ function getPlugin($pluginClassName) { return false; } +// DEPRACTED // Returns TRUE if the plugin is enabled and installed, FALSE otherwise function pluginEnabled($pluginClassName) { - global $plugins; + return pluginActivated($pluginClassName); +} - if (isset($plugins['all'][$pluginClassName])) { - return $plugins['all'][$pluginClassName]->installed(); - } - return false; +// Returns TRUE if the plugin is activaed / installed, FALSE otherwise +function pluginActivated($pluginClassName) { + global $plugins; + + if (isset($plugins['all'][$pluginClassName])) { + return $plugins['all'][$pluginClassName]->installed(); + } + return false; } function activatePlugin($pluginClassName) {