function kill() { $killed = false; $proActive = is_plugin_active($this->pro); $liteActive = is_plugin_active($this->lite); if ($proActive && $liteActive) { add_action('init', array($this, 'init')); $plgPath = ABSPATH . PLUGINDIR . "/{$this->lite}"; $liteData = get_plugin_data($plgPath); $plgPath = ABSPATH . PLUGINDIR . "/{$this->pro}"; $proData = get_plugin_data($plgPath); $this->liteName = $liteData['Name']; $this->proName = $proData['Name']; self::$adminNotice .= sprintf('<div class="updated"><p>'); self::$adminNotice .= sprintf(__("%s cannot be active now. Deactivating it so that you can use the Pro version %s If you really want to use the %s version, please deactivate the %s version first.", "easy-common"), "<strong><em>{$this->liteName}</em></strong>", "<strong><em>{$this->proName}</em></strong>.<br />", "<strong><em>Lite</em></strong>", "<strong><em>Pro</em></strong>"); self::$adminNotice .= sprintf("<br /><strong>" . __("Please reload this page to remove stale links.", 'easy-common') . " <input type='button' value='Reload Page' onClick='window.location.href=window.location.href.replace(\"activate=true&\",\"\")'></strong>"); self::$adminNotice .= sprintf('</p></div>'); add_action('admin_notices', array('EzKillLite', 'admin_notices')); add_action('admin_footer-plugins.php', array($this, 'admin_footer_kill')); $killed = true; } self::$killed = $killed; return $killed; }