protected function _initUninstall() { self::$_uninstall[$this->_pm->getPathinfo()->getFilenamePath()] = array(); $this->registerUninstall(); ifw_raise_memory_limit(); // add default uninstall commands require_once $this->_pm->getPathinfo()->getRootLib() . 'IfwPsn/Wp/Plugin/Installer/Command/UninstallDeleteLog.php'; require_once $this->_pm->getPathinfo()->getRootLib() . 'IfwPsn/Wp/Plugin/Installer/Command/UninstallResetOptions.php'; require_once $this->_pm->getPathinfo()->getRootLib() . 'IfwPsn/Wp/Plugin/Installer/Command/UninstallRemoveHooks.php'; $this->addUninstall(new IfwPsn_Wp_Plugin_Installer_Command_UninstallDeleteLog()); $this->addUninstall(new IfwPsn_Wp_Plugin_Installer_Command_UninstallResetOptions()); $this->addUninstall(new IfwPsn_Wp_Plugin_Installer_Command_UninstallRemoveHooks()); }
/** * Calls the getResponse method and handles the response */ public final function actionCallback() { if (empty($this->action) || !check_ajax_referer($this->_getNonceName(), 'nonce', false)) { // invalid nonce $response = new IfwPsn_Wp_Ajax_Response_Json(false, array('html' => ''), 'invalid request'); trigger_error(sprintf('invalid nonce for ajax request %s', $this->action)); } else { ifw_raise_memory_limit(); $response = $this->getResponse(); } if ($response instanceof IfwPsn_Wp_Ajax_Response_Abstract) { $response->header(); $response->output(); } else { trigger_error(sprintf('invalid ajax response in %s', __METHOD__)); } wp_die(); }
private function _applicationBootstrap() { if ($this->_pm->getAccess()->isPlugin() && $this->_pm->getPathinfo()->hasRootApplication() && !$this->_pm->getAccess()->isAjax()) { // it's an access to the plugin settings and no AJAX request // start the admin application ifw_raise_memory_limit(); require_once $this->_pm->getPathinfo()->getRootLib() . '/IfwPsn/Wp/Plugin/Application.php'; $this->_application = IfwPsn_Wp_Plugin_Application::factory($this->_pm); $this->_application->load(); } }