variable with installed plugins

This commit is contained in:
Diego Najar 2019-05-09 17:19:56 +02:00
parent 1419483708
commit 9d436f8a76
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,8 @@ $plugins = array(
$pluginsEvents = $plugins;
unset($pluginsEvents['all']);
$pluginsInstalled = array();
// ============================================================================
// Functions
// ============================================================================
@ -51,6 +53,7 @@ function buildPlugins()
{
global $plugins;
global $pluginsEvents;
global $pluginsInstalled;
global $L;
global $site;
@ -98,6 +101,7 @@ function buildPlugins()
// If the plugin is installed insert on the hooks
if ($Plugin->installed()) {
$pluginsInstalled[$pluginClass] = $Plugin;
foreach ($pluginsEvents as $event=>$value) {
if (method_exists($Plugin, $event)) {
array_push($plugins[$event], $Plugin);