mirror of
https://github.com/typecho/typecho.git
synced 2025-04-14 06:41:53 +02:00
fix #1160
This commit is contained in:
parent
58cb9105d4
commit
729dcf729a
@ -63,7 +63,11 @@ class Plugin
|
||||
*/
|
||||
public function __construct(string $handle)
|
||||
{
|
||||
/** 初始化变量 */
|
||||
if (defined('__TYPECHO_CLASS_ALIASES__')) {
|
||||
$alias = array_search($handle, __TYPECHO_CLASS_ALIASES__);
|
||||
$handle = $alias ?: $handle;
|
||||
}
|
||||
|
||||
$this->handle = Common::nativeClassName($handle);
|
||||
}
|
||||
|
||||
@ -89,7 +93,6 @@ class Plugin
|
||||
*/
|
||||
public static function factory(string $handle): Plugin
|
||||
{
|
||||
$handle = Common::nativeClassName($handle);
|
||||
return self::$instances[$handle] ?? (self::$instances[$handle] = new self($handle));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user