Skip to content

Commit

Permalink
fix Notice in admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
dungps committed Mar 18, 2016
1 parent 5c3296a commit 8f00753
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
15 changes: 2 additions & 13 deletions dw-question-answer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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' ) );
}
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion inc/Admin/Welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<div id="dwqa-message" class="notice is-dismissible"><p>To support this plugin and get more features, <a href="http://bit.ly/dwqa-pro" target="_blank">upgrade to DW Question & Answer Pro &rarr;</a></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
}
}
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 8f00753

Please sign in to comment.