Version Description
- Fixed script bug.
Download this release
Release Info
Developer | rpetersen29 |
Plugin | Simple Banner |
Version | 2.0.6 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0.6
- readme.txt +29 -2
- simple-banner-pro.js +4 -3
- simple-banner.php +8 -3
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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: 4.9.
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -45,6 +45,18 @@ Yes.
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
= 2.0.2 =
|
49 |
* Fixed script loading bug again.
|
50 |
|
@@ -92,6 +104,21 @@ Yes.
|
|
92 |
|
93 |
== Upgrade Notice ==
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= 2.0.2 =
|
96 |
Bug fixes for pro version.
|
97 |
|
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: 4.9.8
|
7 |
+
Stable tag: 2.0.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
45 |
|
46 |
== Changelog ==
|
47 |
|
48 |
+
= 2.0.6 =
|
49 |
+
* Fixed script bug.
|
50 |
+
|
51 |
+
= 2.0.5 =
|
52 |
+
* Fixed svn repo files.
|
53 |
+
|
54 |
+
= 2.0.4 =
|
55 |
+
* Fix bug with banner text newlines.
|
56 |
+
|
57 |
+
= 2.0.3 =
|
58 |
+
* Update Donate button color.
|
59 |
+
|
60 |
= 2.0.2 =
|
61 |
* Fixed script loading bug again.
|
62 |
|
104 |
|
105 |
== Upgrade Notice ==
|
106 |
|
107 |
+
= 2.0.6 =
|
108 |
+
Bug fixes for script.
|
109 |
+
|
110 |
+
= 2.0.5 =
|
111 |
+
Repo fixes.
|
112 |
+
|
113 |
+
= 2.0.4 =
|
114 |
+
Bug fixes for scripts.
|
115 |
+
|
116 |
+
= 2.0.4 =
|
117 |
+
Bug fixes for banner text.
|
118 |
+
|
119 |
+
= 2.0.3 =
|
120 |
+
Update Donate button color.
|
121 |
+
|
122 |
= 2.0.2 =
|
123 |
Bug fixes for pro version.
|
124 |
|
simple-banner-pro.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
-
|
|
|
2 |
var xhr = new XMLHttpRequest();
|
3 |
-
xhr.open("POST", "https://simple-banner.glitch.me/
|
4 |
xhr.setRequestHeader('Content-Type', 'application/json');
|
5 |
-
xhr.send(JSON.stringify({
|
6 |
}
|
1 |
+
// v2.0.6
|
2 |
+
if (!window.location.hostname.includes("localhost")) {
|
3 |
var xhr = new XMLHttpRequest();
|
4 |
+
xhr.open("POST", "https://simple-banner.glitch.me/hostname", true);
|
5 |
xhr.setRequestHeader('Content-Type', 'application/json');
|
6 |
+
xhr.send(JSON.stringify({ hostname: window.location.hostname }));
|
7 |
}
|
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: 2.0.
|
7 |
* Author: Ryan Petersen
|
8 |
* Author URI: http://rpetersen29.github.io/
|
9 |
* License: GPL2
|
10 |
*
|
11 |
* @package Simple Banner
|
12 |
-
* @version 2.0.
|
13 |
* @author Ryan Petersen <rpetersen.dev@gmail.com>
|
14 |
*/
|
15 |
|
@@ -102,7 +102,7 @@ function simple_banner_settings_page() {
|
|
102 |
?>
|
103 |
|
104 |
<div class="wrap">
|
105 |
-
<a class="button button-
|
106 |
<h2>Simple Banner Settings</h2>
|
107 |
<p>Use Hex color values for the color fields.</p>
|
108 |
<p>Links in the banner text must be typed in with HTML <code><a></code> tags.
|
@@ -396,6 +396,11 @@ function simple_banner_settings_page() {
|
|
396 |
});
|
397 |
document.getElementById('disabled_pages_array').value = disabledPagesArray;
|
398 |
};
|
|
|
|
|
|
|
|
|
|
|
399 |
</script>
|
400 |
<?php
|
401 |
}
|
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.0.6
|
7 |
* Author: Ryan Petersen
|
8 |
* Author URI: http://rpetersen29.github.io/
|
9 |
* License: GPL2
|
10 |
*
|
11 |
* @package Simple Banner
|
12 |
+
* @version 2.0.6
|
13 |
* @author Ryan Petersen <rpetersen.dev@gmail.com>
|
14 |
*/
|
15 |
|
102 |
?>
|
103 |
|
104 |
<div class="wrap">
|
105 |
+
<a class="button button-primary button-hero" style="font-weight: 700;" href="https://www.paypal.me/rpetersenDev" target="_blank">DONATE</a>
|
106 |
<h2>Simple Banner Settings</h2>
|
107 |
<p>Use Hex color values for the color fields.</p>
|
108 |
<p>Links in the banner text must be typed in with HTML <code><a></code> tags.
|
396 |
});
|
397 |
document.getElementById('disabled_pages_array').value = disabledPagesArray;
|
398 |
};
|
399 |
+
|
400 |
+
// remove banner text newlines on submit
|
401 |
+
document.getElementById('submit').onclick=function(e){
|
402 |
+
document.getElementById('simple_banner_text').value = document.getElementById('simple_banner_text').value.replace(/\n/g, "");
|
403 |
+
};
|
404 |
</script>
|
405 |
<?php
|
406 |
}
|