diff --git a/bl-kernel/boot/rules/60.plugins.php b/bl-kernel/boot/rules/60.plugins.php index 77611470..1311fcc9 100755 --- a/bl-kernel/boot/rules/60.plugins.php +++ b/bl-kernel/boot/rules/60.plugins.php @@ -75,27 +75,13 @@ function buildPlugins() foreach($pluginsDeclaredClasess as $pluginClass) { - $Plugin = new $pluginClass(); - - // Deprecated - // // Check if the plugin is translated. - // $languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.$Site->locale().'.json'; - // if( !Sanitize::pathFile($languageFilename) ) { - // $languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.'en_US.json'; - // } - - // $database = file_get_contents($languageFilename); - // $database = json_decode($database, true); - - // // Set name and description from the language file. - // $Plugin->setMetadata('name',$database['plugin-data']['name']); - // $Plugin->setMetadata('description',$database['plugin-data']['description']); - - // // Remove name and description, and add new words if there are. - // unset($database['plugin-data']); - // if(!empty($database)) { - // $Language->add($database); - // } + // Ignore non-plugin classes + if ( !is_subclass_of( $pluginClass, 'Plugin' ) ) + { + continue; + } + + $Plugin = new $pluginClass(); // Push Plugin to array all plugins installed and not installed. $plugins['all'][$pluginClass] = $Plugin;