name = $name; $this->slug = $slug; $this->review_url = "https://wordpress.org/support/plugin/$slug/reviews/#new-post"; $this->buy_now = $buy_now; $this->price = $price; $this->nonce = 'pi_theme_nonce'; add_action( 'admin_init', array( $this, 'hide_review_notice' ) ); add_action( 'admin_notices', array( $this, 'review_notice' ) ); } function showNotification(){ //delete_transient($this->slug.'_show_notification'); //delete_option($this->slug.'_first_run'); $this->show_notification = get_transient($this->slug.'_show_notification'); $this->first_run = get_option($this->slug.'_first_run',""); if($this->first_run == ""){ set_transient( $this->slug.'_show_notification', 'no',172800); update_option($this->slug.'_first_run',"complete"); return false; } if($this->show_notification == 'no'){ return false; } return true; } function thisFirstRun(){ $this->first_run = get_option($this->slug.'_show_notification',""); if($this->first_run == ""){ return true; } return false; } function review_notice(){ if(!$this->showNotification()) return; ?>
You have been using our plugin name; ?> for the last few days, please provide a 5 Star rating to help the plugin grow