/** * 激活插件方法,如果激活失败,直接抛出异常 * * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function activate() { $info = DomainTheme_Plugin::install(); Helper::addPanel(1, 'DomainTheme/manage-domaintheme.php', '域名模板', '管理域名模板', 'administrator'); Helper::addAction('DomainTheme-edit', 'DomainTheme_Action'); Typecho_Plugin::factory('Widget_Archive')->handleInit = array(__CLASS__, 'run'); return _t($info); }