Simple Banner - Version 2.2.3

Version Description

  • CSS Changes.
Download this release

Release Info

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

Code changes from version 2.2.2 to 2.2.3

Files changed (3) hide show
  1. readme.txt +22 -1
  2. simple-banner.css +0 -6
  3. simple-banner.php +13 -7
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.3.2
7
- Stable tag: 2.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -36,6 +36,21 @@ This plugin makes it easy to display a simple announcement banner or bar at the
36
 
37
  Yes.
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  == Screenshots ==
40
 
41
  1. This is the first screen shot.
@@ -45,6 +60,9 @@ Yes.
45
 
46
  == Changelog ==
47
 
 
 
 
48
  = 2.2.2 =
49
  * Added version number to css and js file to force update on version change.
50
 
@@ -128,6 +146,9 @@ Yes.
128
 
129
  == Upgrade Notice ==
130
 
 
 
 
131
  = 2.2.2 =
132
  Added version number to css and js file to force update on version change.
133
 
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.3.2
7
+ Stable tag: 2.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
36
 
37
  Yes.
38
 
39
+ = Is there a Pro version? =
40
+
41
+ Yes.
42
+
43
+ = How do I disable the banner in my posts? =
44
+
45
+ This feature is being acitvely developed, in the meantime you can use this custom JavaScript:
46
+
47
+ `document.addEventListener('DOMContentLoaded', function(){
48
+ if (window.location.pathname.includes("post")){
49
+ document.getElementById('simple-banner').remove();
50
+ }
51
+ }, false);
52
+ `
53
+
54
  == Screenshots ==
55
 
56
  1. This is the first screen shot.
60
 
61
  == Changelog ==
62
 
63
+ = 2.2.3 =
64
+ * CSS Changes.
65
+
66
  = 2.2.2 =
67
  * Added version number to css and js file to force update on version change.
68
 
146
 
147
  == Upgrade Notice ==
148
 
149
+ = 2.2.3 =
150
+ * CSS Changes.
151
+
152
  = 2.2.2 =
153
  Added version number to css and js file to force update on version change.
154
 
simple-banner.css CHANGED
@@ -1,6 +1,5 @@
1
  .simple-banner {
2
  width: 100%;
3
- background: #024985;
4
  text-align: center;
5
  z-index: 99999;
6
  position: relative;
@@ -8,12 +7,7 @@
8
  }
9
 
10
  .simple-banner .simple-banner-text {
11
- color: #ffffff;
12
  font-size: 1.1em;
13
  font-weight: 700;
14
  padding: 10px;
15
  }
16
-
17
- .simple-banner .simple-banner-text a {
18
- color: #f16521;
19
- }
1
  .simple-banner {
2
  width: 100%;
 
3
  text-align: center;
4
  z-index: 99999;
5
  position: relative;
7
  }
8
 
9
  .simple-banner .simple-banner-text {
 
10
  font-size: 1.1em;
11
  font-weight: 700;
12
  padding: 10px;
13
  }
 
 
 
 
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.2.2
7
  * Author: Ryan Petersen
8
  * Author URI: http://rpetersen29.github.io/
9
  * License: GPL2
10
  *
11
  * @package Simple Banner
12
- * @version 2.2.2
13
  * @author Ryan Petersen <rpetersen.dev@gmail.com>
14
  */
15
- define ('VERSION', '2.2.2');
16
 
17
  add_action( 'wp_enqueue_scripts', 'simple_banner' );
18
  function simple_banner() {
@@ -48,19 +48,25 @@ add_action( 'wp_head', 'simple_banner_custom_color');
48
  function simple_banner_custom_color()
49
  {
50
  if (get_option('simple_banner_color') != ""){
51
- echo '<style type="text/css" media="screen">.simple-banner{background:' . get_option('simple_banner_color') . "};</style>";
 
 
52
  }
53
 
54
  if (get_option('simple_banner_text_color') != ""){
55
- echo '<style type="text/css" media="screen">.simple-banner .simple-banner-text{color:' . get_option('simple_banner_text_color') . "};</style>";
 
 
56
  }
57
 
58
  if (get_option('simple_banner_link_color') != ""){
59
- echo '<style type="text/css" media="screen">.simple-banner .simple-banner-text a{color:' . get_option('simple_banner_link_color') . "};</style>";
 
 
60
  }
61
 
62
  if (get_option('simple_banner_custom_css') != ""){
63
- echo '<style type="text/css" media="screen">.simple-banner{'. get_option('simple_banner_custom_css') . "};</style>";
64
  }
65
 
66
  if (get_option('site_custom_css') != "" && get_option('pro_version_enabled')) {
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.2.3
7
  * Author: Ryan Petersen
8
  * Author URI: http://rpetersen29.github.io/
9
  * License: GPL2
10
  *
11
  * @package Simple Banner
12
+ * @version 2.2.3
13
  * @author Ryan Petersen <rpetersen.dev@gmail.com>
14
  */
15
+ define ('VERSION', '2.2.3');
16
 
17
  add_action( 'wp_enqueue_scripts', 'simple_banner' );
18
  function simple_banner() {
48
  function simple_banner_custom_color()
49
  {
50
  if (get_option('simple_banner_color') != ""){
51
+ echo '<style type="text/css" media="screen">.simple-banner{background:' . get_option('simple_banner_color') . '}</style>';
52
+ } else {
53
+ echo '<style type="text/css" media="screen">.simple-banner{background: #024985;}</style>';
54
  }
55
 
56
  if (get_option('simple_banner_text_color') != ""){
57
+ echo '<style type="text/css" media="screen">.simple-banner .simple-banner-text{color:' . get_option('simple_banner_text_color') . '}</style>';
58
+ } else {
59
+ echo '<style type="text/css" media="screen">.simple-banner .simple-banner-text{color: #ffffff;}</style>';
60
  }
61
 
62
  if (get_option('simple_banner_link_color') != ""){
63
+ echo '<style type="text/css" media="screen">.simple-banner .simple-banner-text a{color:' . get_option('simple_banner_link_color') . "}</style>";
64
+ } else {
65
+ echo '<style type="text/css" media="screen">.simple-banner .simple-banner-text a{color:#f16521;}</style>';
66
  }
67
 
68
  if (get_option('simple_banner_custom_css') != ""){
69
+ echo '<style type="text/css" media="screen">.simple-banner{'. get_option('simple_banner_custom_css') . "}</style>";
70
  }
71
 
72
  if (get_option('site_custom_css') != "" && get_option('pro_version_enabled')) {