Simple Banner - Version 1.0.3

Version Description

  • Fix for themes with padding and margin applied to body.
Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.3

Files changed (4) hide show
  1. readme.txt +9 -2
  2. simple-banner.css +2 -0
  3. simple-banner.js +10 -0
  4. simple-banner.php +2 -2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: cta, banner, banners, announcement, announcements, notification, bar, bars, free, hello bar, hellobar
5
  Requires at least: 3.0.1
6
  Tested up to: 4.2.2
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -40,10 +40,14 @@ Yes.
40
 
41
  1. This is the first screen shot.
42
  2. This is the second screen shot.
43
- 2. This is the third screen shot.
 
44
 
45
  == Changelog ==
46
 
 
 
 
47
  = 1.0.2 =
48
  * Fixed banner for themes that don't already have jquery added.
49
 
@@ -55,6 +59,9 @@ Yes.
55
 
56
  == Upgrade Notice ==
57
 
 
 
 
58
  = 1.0.2 =
59
  If your banner didn't work before, it probably does now.
60
 
4
  Tags: cta, banner, banners, announcement, announcements, notification, bar, bars, free, hello bar, hellobar
5
  Requires at least: 3.0.1
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
40
 
41
  1. This is the first screen shot.
42
  2. This is the second screen shot.
43
+ 3. This is the third screen shot.
44
+ 4. This is the settings page... and the fourth screen shot.
45
 
46
  == Changelog ==
47
 
48
+ = 1.0.3 =
49
+ * Fix for themes with padding and margin applied to body.
50
+
51
  = 1.0.2 =
52
  * Fixed banner for themes that don't already have jquery added.
53
 
59
 
60
  == Upgrade Notice ==
61
 
62
+ = 1.0.3 =
63
+ Additional fixes for more themes, specifically "Twenty *" themes by Wordpress.
64
+
65
  = 1.0.2 =
66
  If your banner didn't work before, it probably does now.
67
 
simple-banner.css CHANGED
@@ -2,6 +2,8 @@
2
  width: 100%;
3
  background: #024985;
4
  text-align: center;
 
 
5
  display: none; }
6
  @media only screen and (min-width: 901px) {
7
  .simple-banner {
2
  width: 100%;
3
  background: #024985;
4
  text-align: center;
5
+ z-index: 200000;
6
+ position: relative;
7
  display: none; }
8
  @media only screen and (min-width: 901px) {
9
  .simple-banner {
simple-banner.js CHANGED
@@ -1,4 +1,14 @@
1
  jQuery(document).ready(function($){
2
  $('<div id="simple-banner" class="simple-banner"></div>')
3
  .prependTo('body');
 
 
 
 
 
 
 
 
 
 
4
  });
1
  jQuery(document).ready(function($){
2
  $('<div id="simple-banner" class="simple-banner"></div>')
3
  .prependTo('body');
4
+
5
+ var bodyPaddingLeft = $('body').css('padding-left')
6
+ var bodyPaddingRight = $('body').css('padding-right')
7
+
8
+ if (bodyPaddingLeft != "0px"){
9
+ $('head').append('<style type="text/css" media="screen">.simple-banner{margin-left:-'+bodyPaddingLeft+';padding-left:'+bodyPaddingLeft+';}</style>');
10
+ }
11
+ if (bodyPaddingRight != "0px"){
12
+ $('head').append('<style type="text/css" media="screen">.simple-banner{margin-right:-'+bodyPaddingRight+';padding-right:'+bodyPaddingRight+';}</style>');
13
+ }
14
  });
simple-banner.php CHANGED
@@ -3,13 +3,13 @@
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: 1.0.2
7
  * Author: Ryan Petersen
8
  * Author URI: http://rpetersen29.github.io/
9
  * License: GPL2
10
  *
11
  * @package Simple Banner
12
- * @version 1.0.2
13
  * @author Ryan Petersen <rpetersen@arcwebtech.com>
14
  */
15
 
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: 1.0.3
7
  * Author: Ryan Petersen
8
  * Author URI: http://rpetersen29.github.io/
9
  * License: GPL2
10
  *
11
  * @package Simple Banner
12
+ * @version 1.0.3
13
  * @author Ryan Petersen <rpetersen@arcwebtech.com>
14
  */
15