Simple Banner - Version 2.9.3

Version Description

  • Bug fixes for disabled pages.
Download this release

Release Info

Developer rpetersen29
Plugin Icon 128x128 Simple Banner
Version 2.9.3
Comparing to
See all releases

Code changes from version 2.9.2 to 2.9.3

Files changed (2) hide show
  1. readme.txt +9 -3
  2. simple-banner.php +8 -8
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Simple Banner ===
2
  Contributors: rpetersen29
3
  Donate link: https://www.paypal.me/rpetersenDev
4
- Tags: banner, banners, simple, announcement, announcements, cta, notification, bar, bars, free, hello bar, hellobar, pro
5
  Requires at least: 3.0.1
6
  Tested up to: 5.6.0
7
- Stable tag: 2.9.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -76,7 +76,7 @@ In the meantime you can use the following custom JavaScript to disable on your h
76
 
77
  Yes, but you should look through the support topics before you decide if you need the pro version.
78
 
79
- = Does this plugin use cookies =
80
 
81
  Yes, they are used only if you enable the close button. These cookies fall under the category of "strictly necessary cookies" and do not need consent from the user, more information <a target="_blank" href="https://gdpr.eu/cookies/">here</a>.
82
  If cookies are disabled on the user's browser, the banners close button expiration setting will not work and the banner will show on each refresh.
@@ -118,6 +118,9 @@ Set your banner position to <code>relative</code> and try this in 'Website Custo
118
 
119
  == Changelog ==
120
 
 
 
 
121
  = 2.9.2 =
122
  * Bug fixes and added close button color setting.
123
 
@@ -256,6 +259,9 @@ Set your banner position to <code>relative</code> and try this in 'Website Custo
256
 
257
  == Upgrade Notice ==
258
 
 
 
 
259
  = 2.9.2 =
260
  * Bug fixes and added close button color setting.
261
 
1
  === Simple Banner ===
2
  Contributors: rpetersen29
3
  Donate link: https://www.paypal.me/rpetersenDev
4
+ Tags: banner, banners, simple, announcement, announcements, bulletin, bulletins, notification, notifications, notification bar, notice, notices, notice bar, top bar, cta, ctas, bar, bars, free, hello bar, hellobar, pro
5
  Requires at least: 3.0.1
6
  Tested up to: 5.6.0
7
+ Stable tag: 2.9.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
76
 
77
  Yes, but you should look through the support topics before you decide if you need the pro version.
78
 
79
+ = Does this plugin use cookies? =
80
 
81
  Yes, they are used only if you enable the close button. These cookies fall under the category of "strictly necessary cookies" and do not need consent from the user, more information <a target="_blank" href="https://gdpr.eu/cookies/">here</a>.
82
  If cookies are disabled on the user's browser, the banners close button expiration setting will not work and the banner will show on each refresh.
118
 
119
  == Changelog ==
120
 
121
+ = 2.9.3 =
122
+ * Bug fixes for disabled pages.
123
+
124
  = 2.9.2 =
125
  * Bug fixes and added close button color setting.
126
 
259
 
260
  == Upgrade Notice ==
261
 
262
+ = 2.9.3 =
263
+ * Bug fixes for disabled pages.
264
+
265
  = 2.9.2 =
266
  * Bug fixes and added close button color setting.
267
 
simple-banner.php CHANGED
@@ -3,16 +3,16 @@
3
  * Plugin Name: Simple Banner
4
  * Plugin URI: https://github.com/rpetersen29/simple-banner
5
  * Description: Display a simple banner at the top of your website.
6
- * Version: 2.9.2
7
  * Author: Ryan Petersen
8
  * Author URI: http://rpetersen29.github.io/
9
  * License: GPL2
10
  *
11
  * @package Simple Banner
12
- * @version 2.9.2
13
  * @author Ryan Petersen <rpetersen.dev@gmail.com>
14
  */
15
- define ('VERSION', '2.9.2');
16
 
17
  register_activation_hook( __FILE__, 'simple_banner_activate' );
18
  function simple_banner_activate() {
@@ -26,7 +26,7 @@ function simple_banner() {
26
  wp_enqueue_style('simple-banner-style');
27
  // Set Script parameters
28
  $disabled_pages_array = explode(',', get_option('disabled_pages_array'));
29
- $disabled_on_current_page = !empty($disabled_pages) && in_array(get_the_ID(), $disabled_pages_array);
30
  $script_params = array(
31
  // script specific parameters
32
  'version' => VERSION,
@@ -73,9 +73,9 @@ if ( function_exists( 'wp_body_open' ) && get_option('wp_body_open_enabled') ) {
73
  }
74
  function simple_banner_body_open() {
75
  // if not disabled use wp_body_open
76
- $disabled_pages = get_option('disabled_pages_array');
77
  $close_button_enabled = get_option('close_button_enabled');
78
- $disabled_on_current_page = !empty($disabled_pages) && in_array(get_the_ID(), explode(',', $disabled_pages));
79
  $closed_cookie = $close_button_enabled && isset($_COOKIE['simplebannerclosed']);
80
  $closed_button = get_option('close_button_enabled') ? '<button id="simple-banner-close-button" class="simple-banner-button">&#x2715;</button>' : '';
81
 
@@ -94,8 +94,8 @@ function simple_banner_custom_color()
94
  {
95
  $closed_cookie = get_option('close_button_enabled') && isset($_COOKIE["simplebannerclosed"]);
96
 
97
- $disabled_pages = get_option('disabled_pages_array');
98
- $disabled_on_current_page = !empty($disabled_pages) && in_array(get_the_ID(), explode(',', $disabled_pages));
99
  $banner_is_disabled = $disabled_on_current_page || get_option('hide_simple_banner') == "yes";
100
 
101
  if ($banner_is_disabled || $closed_cookie){
3
  * Plugin Name: Simple Banner
4
  * Plugin URI: https://github.com/rpetersen29/simple-banner
5
  * Description: Display a simple banner at the top of your website.
6
+ * Version: 2.9.3
7
  * Author: Ryan Petersen
8
  * Author URI: http://rpetersen29.github.io/
9
  * License: GPL2
10
  *
11
  * @package Simple Banner
12
+ * @version 2.9.3
13
  * @author Ryan Petersen <rpetersen.dev@gmail.com>
14
  */
15
+ define ('VERSION', '2.9.3');
16
 
17
  register_activation_hook( __FILE__, 'simple_banner_activate' );
18
  function simple_banner_activate() {
26
  wp_enqueue_style('simple-banner-style');
27
  // Set Script parameters
28
  $disabled_pages_array = explode(',', get_option('disabled_pages_array'));
29
+ $disabled_on_current_page = !empty($disabled_pages_array) && in_array(get_the_ID(), $disabled_pages_array);
30
  $script_params = array(
31
  // script specific parameters
32
  'version' => VERSION,
73
  }
74
  function simple_banner_body_open() {
75
  // if not disabled use wp_body_open
76
+ $disabled_pages_array = get_option('disabled_pages_array');
77
  $close_button_enabled = get_option('close_button_enabled');
78
+ $disabled_on_current_page = !empty($disabled_pages_array) && in_array(get_the_ID(), explode(',', $disabled_pages_array));
79
  $closed_cookie = $close_button_enabled && isset($_COOKIE['simplebannerclosed']);
80
  $closed_button = get_option('close_button_enabled') ? '<button id="simple-banner-close-button" class="simple-banner-button">&#x2715;</button>' : '';
81
 
94
  {
95
  $closed_cookie = get_option('close_button_enabled') && isset($_COOKIE["simplebannerclosed"]);
96
 
97
+ $disabled_pages_array = get_option('disabled_pages_array');
98
+ $disabled_on_current_page = !empty($disabled_pages_array) && in_array(get_the_ID(), explode(',', $disabled_pages_array));
99
  $banner_is_disabled = $disabled_on_current_page || get_option('hide_simple_banner') == "yes";
100
 
101
  if ($banner_is_disabled || $closed_cookie){