public function onAdminInit() { if ($this->_pm->isPremium() && IfwPsn_Wp_Proxy_Blog::isPluginActive('post-status-notifier-lite/post-status-notifier-lite.php')) { // Lite version still activated $this->getAdminNotices()->addError(sprintf(__('The Lite version of this plugin is still activated. Please deactivate it! Refer to the <a href="%s">Upgrade Howto</a>.', 'psn'), 'http://docs.ifeelweb.de/post-status-notifier/upgrade_howto.html')); } }
/** * @param IfwPsn_Wp_Plugin_Manager $pm */ protected static function _dropTable($pm) { global $wpdb; if ($pm->isPremium() || !$pm->isPremium() && !IfwPsn_Wp_Proxy_Blog::isPluginActive('post-status-notifier/post-status-notifier.php')) { // only delete rules table if it's the Premium version // or it's the Lite version and the Premium version is not activated $wpdb->query('DROP TABLE IF EXISTS `' . $wpdb->prefix . 'psn_rules`'); } }
/** * (non-PHPdoc) * @see IfwPsn_Wp_Plugin_Installer_ActivationInterface::execute() */ public function execute(IfwPsn_Wp_Plugin_Manager $pm, $networkwide = false) { if ($pm->isPremium() && IfwPsn_Wp_Proxy_Blog::isPluginActive('post-status-notifier-lite/post-status-notifier-lite.php')) { trigger_error(sprintf(__('The Lite version of this plugin is still activated. Please deactivate it! Refer to the <a href=\\"%s\\">Upgrade Howto</a>.', 'psn'), 'http://docs.ifeelweb.de/post-status-notifier/upgrade_howto.html')); } $this->_dbPatcher = new Psn_Patch_Database(); if (IfwPsn_Wp_Proxy_Blog::isMultisite() && $networkwide == true) { // multisite installation $currentBlogId = IfwPsn_Wp_Proxy_Blog::getBlogId(); foreach (IfwPsn_Wp_Proxy_Blog::getMultisiteBlogIds() as $blogId) { // give every site in the network the default time limit of 30 seconds set_time_limit(30); IfwPsn_Wp_Proxy_Blog::switchToBlog($blogId); $this->_createTable(); $this->_presetOptions($pm); } IfwPsn_Wp_Proxy_Blog::switchToBlog($currentBlogId); } else { // single blog installation $this->_createTable(); $this->_presetOptions($pm); } }