Version Description
- You can now use single quotes or double quotes for Simple Banner Text.
Download this release
Release Info
Developer | rpetersen29 |
Plugin | Simple Banner |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.3.0
- readme.txt +8 -2
- simple-banner.php +8 -9
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.9.5
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -45,6 +45,9 @@ Yes.
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
48 |
= 1.2.1 =
|
49 |
* Rollback use of esc_attr() with banner text for now as it broke all links from showing properly.
|
50 |
|
@@ -74,6 +77,9 @@ Yes.
|
|
74 |
|
75 |
== Upgrade Notice ==
|
76 |
|
|
|
|
|
|
|
77 |
= 1.2.1 =
|
78 |
Bug fix with links.
|
79 |
|
@@ -99,4 +105,4 @@ If your banner didn't work before, it probably does now.
|
|
99 |
Just updated some stuff for the readme. No functionality change.
|
100 |
|
101 |
= 1.0.0 =
|
102 |
-
This is the first version.
|
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.9.5
|
7 |
+
Stable tag: 1.3.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
45 |
|
46 |
== Changelog ==
|
47 |
|
48 |
+
= 1.3.0 =
|
49 |
+
* You can now use single quotes or double quotes for Simple Banner Text.
|
50 |
+
|
51 |
= 1.2.1 =
|
52 |
* Rollback use of esc_attr() with banner text for now as it broke all links from showing properly.
|
53 |
|
77 |
|
78 |
== Upgrade Notice ==
|
79 |
|
80 |
+
= 1.3.0 =
|
81 |
+
Replace double quotes with single quotes in Simple Banner Text.
|
82 |
+
|
83 |
= 1.2.1 =
|
84 |
Bug fix with links.
|
85 |
|
105 |
Just updated some stuff for the readme. No functionality change.
|
106 |
|
107 |
= 1.0.0 =
|
108 |
+
This is the first version.
|
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.
|
7 |
* Author: Ryan Petersen
|
8 |
* Author URI: http://rpetersen29.github.io/
|
9 |
* License: GPL2
|
10 |
*
|
11 |
* @package Simple Banner
|
12 |
-
* @version 1.
|
13 |
* @author Ryan Petersen <rpetersen.dev@gmail.com>
|
14 |
*/
|
15 |
|
@@ -52,7 +52,7 @@ function simple_banner_custom_text()
|
|
52 |
if (get_option('simple_banner_text') != ""){
|
53 |
echo '<script type="text/javascript">jQuery(document).ready(function() {
|
54 |
var bannerSpan = document.getElementById("simple-banner");
|
55 |
-
bannerSpan.innerHTML = "<div class=' . "simple-banner-text" . '><span>' . get_option('simple_banner_text') . '</span></div>"
|
56 |
});
|
57 |
</script>';
|
58 |
}
|
@@ -78,13 +78,13 @@ function simple_banner_settings_page() {
|
|
78 |
<div class="wrap">
|
79 |
<h2>Simple Banner Settings</h2>
|
80 |
<p>Use Hex color values for the color fields.</p>
|
81 |
-
<p>Links in the banner text must be typed in with HTML <code><a></code> tags
|
82 |
-
<br />e.g. <code
|
83 |
|
84 |
<!-- Preview Banner -->
|
85 |
<div id="preview_banner" class="simple-banner" style="width: 100%;text-align: center;">
|
86 |
<div id="preview_banner_text" class="simple-banner-text" style="font-size: 1.1em;font-weight: 700;padding: 10px; }">
|
87 |
-
<span>This is what your banner will look like with a <a href="/">link</a
|
88 |
</div>
|
89 |
</div>
|
90 |
<br>
|
@@ -139,7 +139,6 @@ function simple_banner_settings_page() {
|
|
139 |
<th scope="row">
|
140 |
Simple Banner Text
|
141 |
<br><span style="font-weight:400;">(Leaving this blank removes the banner)</span>
|
142 |
-
<br><span style="font-weight:400;color:blue;">Remember to only use single quotes with the href links.</span>
|
143 |
</th>
|
144 |
<td>
|
145 |
<textarea id="simple_banner_text" style="height: 150px;width: 265px;resize: none;" name="simple_banner_text"><?php echo get_option('simple_banner_text'); ?></textarea>
|
@@ -174,10 +173,10 @@ function simple_banner_settings_page() {
|
|
174 |
var style_custom_css = document.createElement('style');
|
175 |
|
176 |
// Banner Text
|
177 |
-
document.getElementById('preview_banner_text').innerHTML = document.getElementById('simple_banner_text').value != "" ? '<span>'+document.getElementById('simple_banner_text').value+'</span>' : '<span>This is what your banner will look like with a <a href="/">link</a
|
178 |
document.getElementById('simple_banner_text').onchange=function(e){
|
179 |
console.log(e.target.value);
|
180 |
-
document.getElementById('preview_banner_text').innerHTML = e.target.value != "" ? '<span>'+e.target.value+'</span>' : '<span>This is what your banner will look like with a <a href="/">link</a
|
181 |
};
|
182 |
|
183 |
// Background Color
|
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.3.0
|
7 |
* Author: Ryan Petersen
|
8 |
* Author URI: http://rpetersen29.github.io/
|
9 |
* License: GPL2
|
10 |
*
|
11 |
* @package Simple Banner
|
12 |
+
* @version 1.3.0
|
13 |
* @author Ryan Petersen <rpetersen.dev@gmail.com>
|
14 |
*/
|
15 |
|
52 |
if (get_option('simple_banner_text') != ""){
|
53 |
echo '<script type="text/javascript">jQuery(document).ready(function() {
|
54 |
var bannerSpan = document.getElementById("simple-banner");
|
55 |
+
bannerSpan.innerHTML = "<div class=' . "simple-banner-text" . '><span>' . str_replace('"', "'", get_option('simple_banner_text')) . '</span></div>"
|
56 |
});
|
57 |
</script>';
|
58 |
}
|
78 |
<div class="wrap">
|
79 |
<h2>Simple Banner Settings</h2>
|
80 |
<p>Use Hex color values for the color fields.</p>
|
81 |
+
<p>Links in the banner text must be typed in with HTML <code><a></code> tags.
|
82 |
+
<br />e.g. <code>This is a <a href='http://www.wordpress.com'>Link to Wordpress</a></code>.</p>
|
83 |
|
84 |
<!-- Preview Banner -->
|
85 |
<div id="preview_banner" class="simple-banner" style="width: 100%;text-align: center;">
|
86 |
<div id="preview_banner_text" class="simple-banner-text" style="font-size: 1.1em;font-weight: 700;padding: 10px; }">
|
87 |
+
<span>This is what your banner will look like with a <a href="/">link</a>.</span>
|
88 |
</div>
|
89 |
</div>
|
90 |
<br>
|
139 |
<th scope="row">
|
140 |
Simple Banner Text
|
141 |
<br><span style="font-weight:400;">(Leaving this blank removes the banner)</span>
|
|
|
142 |
</th>
|
143 |
<td>
|
144 |
<textarea id="simple_banner_text" style="height: 150px;width: 265px;resize: none;" name="simple_banner_text"><?php echo get_option('simple_banner_text'); ?></textarea>
|
173 |
var style_custom_css = document.createElement('style');
|
174 |
|
175 |
// Banner Text
|
176 |
+
document.getElementById('preview_banner_text').innerHTML = document.getElementById('simple_banner_text').value != "" ? '<span>'+document.getElementById('simple_banner_text').value+'</span>' : '<span>This is what your banner will look like with a <a href="/">link</a>.</span>';
|
177 |
document.getElementById('simple_banner_text').onchange=function(e){
|
178 |
console.log(e.target.value);
|
179 |
+
document.getElementById('preview_banner_text').innerHTML = e.target.value != "" ? '<span>'+e.target.value+'</span>' : '<span>This is what your banner will look like with a <a href="/">link</a>.</span>';
|
180 |
};
|
181 |
|
182 |
// Background Color
|