Skip to content

Commit 91ed4de

Browse files
Plugins don't have to extend PluginAbstract. Presently this class loads language modinfo which is deprecated. If needed, modules can load their locales.
1 parent 29f685b commit 91ed4de

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

htdocs/xoops_lib/Xoops/Module/Plugin.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Xoops\Module;
1313

14-
use Xoops\Module\Plugin\PluginAbstract;
15-
1614
/**
1715
* @copyright 2013-2015 XOOPS Project (http://xoops.org)
1816
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
@@ -31,7 +29,7 @@ class Plugin
3129
* @param string $pluginName plugin name i.e. system, menus, etc.
3230
* @param bool $force get plugin even if module is inactive
3331
*
34-
* @return bool|PluginAbstract plugin, or false if plugin does not exist
32+
* @return bool|object plugin, or false if plugin does not exist
3533
*/
3634
public static function getPlugin($dirname, $pluginName = 'system', $force = false)
3735
{
@@ -75,7 +73,7 @@ public static function getPlugins($pluginName = 'system', $inactiveModules = fal
7573
$className = '\\' . ucfirst($dirname) . ucfirst($pluginName) . 'Plugin';
7674
$interface = '\\' . ucfirst($pluginName) . 'PluginInterface';
7775
$class = new $className($dirname);
78-
if ($class instanceof PluginAbstract && $class instanceof $interface) {
76+
if ($class instanceof $interface) {
7977
static::$plugins[$pluginName][$dirname] = $class;
8078
}
8179
}

0 commit comments

Comments
 (0)