index($path); } /** * 输出相对首页路径,本方法用于静态文件 */ public static function indexHome($path = '') { Helper::options()->siteUrl($path); } /** * 输出相对主题目录路径,用于静态文件 */ public static function indexTheme($path = '') { Helper::options()->themeUrl($path); } public static function indexThemeUrl($path = '') { return 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); } }