Unique Headers - Version 1.6

Version Description

  • Removed admin notice from everywhere but the plugins page.
Download this release

Release Info

Developer ryanhellyer
Plugin Icon wp plugin Unique Headers
Version 1.6
Comparing to
See all releases

Code changes from version 1.5.3 to 1.6

Files changed (3) hide show
  1. inc/class-dotorg-plugin-review.php +16 -11
  2. index.php +1 -1
  3. readme.txt +4 -1
inc/class-dotorg-plugin-review.php CHANGED
@@ -7,6 +7,7 @@
7
  * Heavily based on code by Rhys Wynne
8
  * https://winwar.co.uk/2014/10/ask-wordpress-plugin-reviews-week/
9
  *
 
10
  * @copyright Copyright (c), Ryan Hellyer
11
  * @author Ryan Hellyer <ryanhellyer@gmail.com>
12
  */
@@ -130,19 +131,23 @@ class DotOrg_Plugin_Review {
130
  */
131
  public function display_admin_notice() {
132
 
133
- $no_bug_url = wp_nonce_url( admin_url( '?' . $this->nobug_option . '=true' ), 'review-nonce' );
 
134
 
135
- $time = $this->seconds_to_words( time() - get_site_option( $this->slug . '-activation-date' ) );
 
136
 
137
- echo '
138
- <div class="updated">
139
- <p>' . sprintf( __( 'You have been using the %s plugin for %s now, do you like it? If so, please leave us a review with your feedback!', 'spam-destroyer' ), $this->name, $time ) . '
140
- <br /><br />
141
- <a onclick="location.href=\'' . esc_url( $no_bug_url ) . '\';" class="button button-primary" href="' . esc_url( 'https://wordpress.org/support/view/plugin-reviews/' . $this->slug . '#postform' ) . '" target="_blank">' . __( 'Leave A Review', 'spam-destroyer' ) . '</a>
142
-
143
- <a href="' . esc_url( $no_bug_url ) . '">' . __( 'No thanks.', 'spam-destroyer' ) . '</a>
144
- </p>
145
- </div>';
 
 
146
 
147
  }
148
 
7
  * Heavily based on code by Rhys Wynne
8
  * https://winwar.co.uk/2014/10/ask-wordpress-plugin-reviews-week/
9
  *
10
+ * @version 1.0
11
  * @copyright Copyright (c), Ryan Hellyer
12
  * @author Ryan Hellyer <ryanhellyer@gmail.com>
13
  */
131
  */
132
  public function display_admin_notice() {
133
 
134
+ $screen = get_current_screen();
135
+ if ( isset( $screen->base ) && 'plugins' == $screen->base ) {
136
 
137
+ $no_bug_url = wp_nonce_url( admin_url( '?' . $this->nobug_option . '=true' ), 'review-nonce' );
138
+ $time = $this->seconds_to_words( time() - get_site_option( $this->slug . '-activation-date' ) );
139
 
140
+ echo '
141
+ <div class="updated">
142
+ <p>' . sprintf( __( 'You have been using the %s plugin for %s now, do you like it? If so, please leave us a review with your feedback!', 'spam-destroyer' ), $this->name, $time ) . '
143
+ <br /><br />
144
+ <a onclick="location.href=\'' . esc_url( $no_bug_url ) . '\';" class="button button-primary" href="' . esc_url( 'https://wordpress.org/support/view/plugin-reviews/' . $this->slug . '#postform' ) . '" target="_blank">' . __( 'Leave A Review', 'spam-destroyer' ) . '</a>
145
+
146
+ <a href="' . esc_url( $no_bug_url ) . '">' . __( 'No thanks.', 'spam-destroyer' ) . '</a>
147
+ </p>
148
+ </div>';
149
+
150
+ }
151
 
152
  }
153
 
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Unique Headers
4
  Plugin URI: https://geek.hellyer.kiwi/plugins/unique-headers/
5
  Description: Unique Headers
6
- Version: 1.5.3
7
  Author: Ryan Hellyer
8
  Author URI: https://geek.hellyer.kiwi/
9
  Text Domain: unique-headers
3
  Plugin Name: Unique Headers
4
  Plugin URI: https://geek.hellyer.kiwi/plugins/unique-headers/
5
  Description: Unique Headers
6
+ Version: 1.6
7
  Author: Ryan Hellyer
8
  Author URI: https://geek.hellyer.kiwi/
9
  Text Domain: unique-headers
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: custom-header, header, headers, images, page, post, plugin, image, images,
4
  Donate link: https://geek.hellyer.kiwi/donate/
5
  Requires at least: 4.3
6
  Tested up to: 4.5
7
- Stable tag: 1.5.3
8
 
9
 
10
 
@@ -97,6 +97,9 @@ No, I'm too busy. Having said that, if you are willing to pay me a small fortune
97
 
98
  == Changelog ==
99
 
 
 
 
100
  = 1.5.3 =
101
  * Fixing flawed bug fix from version 1.5.2.
102
 
4
  Donate link: https://geek.hellyer.kiwi/donate/
5
  Requires at least: 4.3
6
  Tested up to: 4.5
7
+ Stable tag: 1.6
8
 
9
 
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 1.6 =
101
+ * Removed admin notice from everywhere but the plugins page.
102
+
103
  = 1.5.3 =
104
  * Fixing flawed bug fix from version 1.5.2.
105