Esempio n. 1
0
 /** (non-PHPdoc)
  * @see IfwPsn_Wp_Plugin_Installer_UninstallInterface::execute()
  */
 public static function execute($pm, $networkwide = false)
 {
     // handle the DB
     if (IfwPsn_Wp_Proxy_Blog::isMultisite() && $networkwide == true) {
         // multisite installation
         $currentBlogId = IfwPsn_Wp_Proxy_Blog::getBlogId();
         foreach (IfwPsn_Wp_Proxy_Blog::getMultisiteBlogIds() as $blogId) {
             IfwPsn_Wp_Proxy_Blog::switchToBlog($blogId);
             self::_dropTable($pm);
         }
         IfwPsn_Wp_Proxy_Blog::switchToBlog($currentBlogId);
     } else {
         // single blog installation
         self::_dropTable($pm);
     }
     // remove update action
     if ($pm->getConfig()->plugin->autoupdate == 1) {
         IfwPsn_Wp_Proxy_Action::remove('in_plugin_update_message-' . $pm->getPathinfo()->getFilenamePath(), array($pm->getBootstrap()->getUpdateManager(), 'onPluginUpdateMessage'), 10, 3);
         IfwPsn_Wp_Proxy_Filter::remove('pre_set_site_transient_update_plugins', array($pm->getBootstrap()->getUpdateManager(), 'checkForPremiumUpdate'));
         if ($pm->isPremium()) {
             IfwPsn_Wp_Proxy_Filter::remove('plugins_api', array($pm->getBootstrap()->getUpdateManager(), 'getPluginInfo'), 10, 3);
         }
     }
 }