/** * The task to be executed * @return mixed */ protected function _execute() { $updateApi = IfwPsn_Wp_Plugin_Update_Api_Factory::get($this->_pm); remove_action('in_plugin_update_message-' . $this->_pm->getPathinfo()->getFilenamePath(), array($updateApi, 'getUpdateInlineMessage')); remove_filter('pre_set_site_transient_update_plugins', array($updateApi, 'getUpdateData')); remove_filter('plugins_api', array($updateApi, 'getPluginInformation')); }
public function init() { if ($this->_pm->getConfig()->plugin->autoupdate == 1) { $updateApi = IfwPsn_Wp_Plugin_Update_Api_Factory::get($this->_pm); // check for custom update message IfwPsn_Wp_Proxy_Action::add('in_plugin_update_message-' . $this->_pm->getPathinfo()->getFilenamePath(), array($updateApi, 'getUpdateInlineMessage'), 10, 3); IfwPsn_Wp_Proxy_Filter::add('pre_set_site_transient_update_plugins', array($updateApi, 'getUpdateData')); if ($this->_pm->isPremium()) { // check for premium get update info IfwPsn_Wp_Proxy_Filter::add('plugins_api', array($updateApi, 'getPluginInformation'), 10, 3); } } $this->_pm->getBootstrap()->getOptionsManager()->registerExternalOption('present_version'); }