diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2022-08-19 00:11:56 +0800 |
|---|---|---|
| committer | Eltrac Koalar <hi@guhub.cn> | 2022-08-19 00:11:56 +0800 |
| commit | fe5203e20eba8af3c1c9230d2acf0f5e73fc17b2 (patch) | |
| tree | 4d6339d67412cdd2e1f8c3de99c2701a93697797 /libs/Utils.php | |
| parent | 107ec25fdcae5b9a78432ac77b7c514c7bda11ac (diff) | |
:stars: Perf: 完全重写了评论区的样式
Diffstat (limited to 'libs/Utils.php')
| -rw-r--r-- | libs/Utils.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/Utils.php b/libs/Utils.php index 98ac6a7..36675db 100644 --- a/libs/Utils.php +++ b/libs/Utils.php @@ -31,4 +31,16 @@ class Utils { Helper::options()->themeUrl($path); } + + /** + * 判断插件是否可用 + * + * @return bool + */ + public static function isPluginAvailable($name) + { + $plugins = Typecho_Plugin::export(); + $plugins = $plugins['activated']; + return is_array($plugins) && array_key_exists($name, $plugins); + } } |
