/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { //Helper::removeRoute("ChildApi"); Helper::removeRoute("MainApi"); //Helper::removeAction("api"); return _t('关闭网站API接口'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removePanel(1, 'TeStore/market.php'); Helper::removeRoute('te-store_market'); Helper::removeRoute('te-store_install'); Helper::removeRoute('te-store_uninstall'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeRoute('routeName'); Helper::removeAction('actionName'); Helper::removePanel(1, 'MyPlugin/panel.php'); Helper::removeMenu('menuName'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removePanel(1, 'DevTool/index.php'); Helper::removeRoute('dev-tool_index'); Helper::removeRoute('dev-tool_options'); Helper::removeRoute('dev-tool_post'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeRoute('share_note'); Helper::removeAction('notes-manage'); // Helper::removePanel(2, 'Notes/add-note.php'); Helper::removePanel(3, 'Notes/manage-notes.php'); self::uninstall(); }
public static function deactivate() { Helper::removeRoute('ymplayer_ajax'); $files = glob(dirname(__FILE__) . '/cache/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } }
public static function uninstall() { //删除路由 Helper::removeRoute('baidu_sitemap'); Helper::removeRoute('baidu_sitemap_advanced'); Helper::removePanel(1, 'BaiduSubmit/Logs.php'); //获取配置,是否删除数据表 if (Helper::options()->plugin('BaiduSubmit')->delete == 1) { return self::remove_table(); } }
public static function deactivate() { $config = Typecho_Widget::widget('Widget_Options')->plugin('Access'); $isDrop = $config->isDrop; if ($isDrop == 0) { $db = Typecho_Db::get(); $prefix = $db->getPrefix(); $db->query("DROP TABLE `" . $prefix . "access`", Typecho_Db::WRITE); } Helper::removePanel(1, self::$panel); Helper::removeRoute("access_ipip"); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { include 'helpers/helpers.php'; //删除下载临时目录 $tempDir = __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__ . self::$tempPath; if (file_exists($tempDir) and (!delete_files($tempDir) or !@rmdir($tempDir))) { throw new Typecho_Plugin_Exception('无法删除插件下载临时目录.'); } //移除菜单和路由 Helper::removePanel(1, 'AppStore/market.php'); Helper::removeRoute('app.store.market'); Helper::removeRoute('app.store.install'); }
/** * 修改路由 */ public function edit() { $modified = false; if ($this->request->isPost()) { foreach ($this->_default as $key => $value) { if (array_key_exists($key, $this->_restore) && $this->request->__isSet($key) && $this->request->{$key} != $this->_default[$key]['url'] && $key != 'do') { Helper::removeRoute($key); Helper::addRoute($key, $this->request->{$key}, $this->_default[$key]['widget'], $this->_default[$key]['action']); $modified = true; } } } if ($modified) { $this->widget('Widget_Notice')->set(_t("路由变更已经保存"), NULL, 'success'); } else { $this->widget('Widget_Notice')->set(_t("路由未变更"), NULL, 'notice'); } }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeRoute('oauth'); Helper::removeRoute('oauth_callback'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeAction('tools'); Helper::removeRoute('sitemap'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeAction('kgsoft_dbbak'); Helper::removePanel(1, "TEDbBak/MainView.php"); Helper::removeRoute("forbiddenUrl"); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeRoute('passport_reset'); Helper::removeRoute('passport_forgot'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeRoute('update'); }
/** * 禁用插件方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeRoute('go'); Helper::removeAction('golinks'); Helper::removePanel(2, 'GoLinks/panel.php'); }
/** * 禁用duoshuo方法,如果禁用失败,直接抛出异常 * * @static * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function deactivate() { Helper::removeAction('duoshuo-edit'); Helper::removeRoute('DuoShuoSync'); Helper::removePanel(3, 'Duoshuo/manage-duoshuo.php'); }
/** * 重设自定义链接 */ public function resetLink() { $link = $this->request->link; Helper::removeRoute('go'); Helper::addRoute('go', $link, 'GoLinks_Action', 'golink'); Typecho_Response::throwJson('success'); }