From 8f007531517a1feb48488b457821cc58b6661274 Mon Sep 17 00:00:00 2001 From: ORYC Date: Fri, 18 Mar 2016 14:15:23 +0700 Subject: [PATCH] fix Notice in admin panel --- dw-question-answer.php | 15 ++------------- inc/Admin/Welcome.php | 2 +- readme.txt | 5 ++++- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/dw-question-answer.php b/dw-question-answer.php index f24c9f0c..2d07dae9 100644 --- a/dw-question-answer.php +++ b/dw-question-answer.php @@ -4,7 +4,7 @@ * Description: A WordPress plugin was make by DesignWall.com to build an Question Answer system for support, asking and comunitcate with your customer * Author: DesignWall * Author URI: http://www.designwall.com - * Version: 1.4.3.1 + * Version: 1.4.3.2 * Text Domain: dwqa * @since 1.4.0 */ @@ -39,7 +39,7 @@ class DW_Question_Answer { public function __construct() { $this->dir = DWQA_DIR; $this->uri = DWQA_URI; - $this->version = '1.4.3.1'; + $this->version = '1.4.3.2'; // load posttype $this->question = new DWQA_Posts_Question(); @@ -69,7 +69,6 @@ public function __construct() { // All init action of plugin will be included in add_action( 'init', array( $this, 'init' ) ); add_action( 'widgets_init', array( $this, 'widgets_init' ) ); - add_action( 'upgrader_process_complete', array( $this, 'register_upgrade_plugin' ), 10, 2 ); register_activation_hook( __FILE__, array( $this, 'activate_hook' ) ); register_deactivation_hook( __FILE__, array( $this, 'deactivate_hook' ) ); } @@ -205,16 +204,6 @@ public function activate_hook() { // dwqa_posttype_init(); } - // using action `upgrader_process_complete` - public function register_upgrade_plugin( $upgrader_object, $args ) { - $file_name = plugin_basename( __FILE__ ); - if ( isset( $args['plugins'] ) && !empty( $args['plugins'] ) ) { - if ( ( is_array( $args['plugins'] ) && in_array( $file_name, $args['plugins'] ) ) || ( is_string( $args['plugins'] && $file_name == $args['plugins'] ) ) ) { - update_option( 'dwqa_plugin_upgraded', true ); - } - } - } - public function deactivate_hook() { $this->permission->remove_permision_caps(); diff --git a/inc/Admin/Welcome.php b/inc/Admin/Welcome.php index 986d7802..fffb5d7c 100644 --- a/inc/Admin/Welcome.php +++ b/inc/Admin/Welcome.php @@ -18,7 +18,7 @@ public function welcome() { } public function admin_notices() { - if ( !isset( $_COOKIE['qa-pro-notice'] ) && 'off' != $_COOKIE['qa-pro-notice'] ) { + if ( !isset( $_COOKIE['qa-pro-notice'] ) ) { echo '

To support this plugin and get more features, upgrade to DW Question & Answer Pro →

'; } } diff --git a/readme.txt b/readme.txt index 1fa519d3..bc88f74b 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: designwall, Farid-Gh, scheunemann, gciprian, Ahmet Kolcu, Astroten Tags: question, answer, support, quora, stackoverflow Requires at least: 3.0.1 Tested up to: 4.4.2 -Stable tag: 1.4.3.1 +Stable tag: 1.4.3.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -85,6 +85,9 @@ Visit our [Github](https://github.com/designwall/dw-question-answer) project or == Changelog == += 1.4.3.2 = +Quick fix + = 1.4.3.1 = Quick fix and update some language file.