mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Add authoritative list of default plugins #1967
This commit is contained in:
parent
16ecfa408e
commit
e33a071f3e
2 changed files with 96 additions and 1 deletions
|
|
@ -141,8 +141,9 @@ class Context
|
|||
private static $_oFrontEndFileHandler = null;
|
||||
|
||||
/**
|
||||
* Plugin blacklist cache
|
||||
* Plugin default and blacklist cache
|
||||
*/
|
||||
private static $_default_plugins = null;
|
||||
private static $_blacklist = null;
|
||||
|
||||
/**
|
||||
|
|
@ -2590,6 +2591,27 @@ class Context
|
|||
return Rhymix\Framework\Router::getRewriteLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether an addon, layout, module, or widget is distributed with Rhymix core.
|
||||
*
|
||||
* @param string $plugin_name
|
||||
* @param string $type
|
||||
* @return bool
|
||||
*/
|
||||
public static function isDefaultPlugin($plugin_name, $type)
|
||||
{
|
||||
if (self::$_default_plugins === null)
|
||||
{
|
||||
self::$_default_plugins = (include RX_BASEDIR . 'common/defaults/plugins.php');
|
||||
if (!is_array(self::$_default_plugins))
|
||||
{
|
||||
self::$_default_plugins = array();
|
||||
}
|
||||
}
|
||||
|
||||
return isset(self::$_default_plugins[$type][$plugin_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether an addon, module, or widget is blacklisted
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue