Version Description
- Keep closed for days.
- Change color of close button.
- Custom CSS option added.
Download this release
Release Info
Developer | syammohanm |
Plugin | WPFront Notification Bar |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.2
- classes/class-wpfront-notification-bar-options.php +5 -0
- classes/class-wpfront-notification-bar.php +2 -1
- css/options.css +6 -0
- css/wpfront-notification-bar.css +2 -11
- js/wpfront-notification-bar.js +9 -6
- languages/wpfront-notification-bar.mo +0 -0
- languages/wpfront-notification-bar.po +59 -27
- readme.txt +11 -2
- templates/notification-bar-template.php +19 -1
- templates/options-template.php +57 -13
- wpfront-notification-bar.php +1 -1
classes/class-wpfront-notification-bar-options.php
CHANGED
@@ -67,7 +67,12 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
|
|
67 |
$this->addOption('display_open_button', 'bit', false)->__('Display Reopen Button');
|
68 |
$this->addOption('open_button_color', 'string', '#00b7ea')->__('Reopen Button Color');
|
69 |
$this->addOption('keep_closed', 'bit', FALSE)->__('Keep Closed');
|
|
|
70 |
$this->addOption('position_offset', 'int', 0)->__('Position Offset');
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
//validation function
|
67 |
$this->addOption('display_open_button', 'bit', false)->__('Display Reopen Button');
|
68 |
$this->addOption('open_button_color', 'string', '#00b7ea')->__('Reopen Button Color');
|
69 |
$this->addOption('keep_closed', 'bit', FALSE)->__('Keep Closed');
|
70 |
+
$this->addOption('keep_closed_for', 'int', 0, array($this, 'validate_zero_positive'))->__('Keep Closed For');
|
71 |
$this->addOption('position_offset', 'int', 0)->__('Position Offset');
|
72 |
+
$this->addOption('custom_css', 'string', '')->__('Custom CSS');
|
73 |
+
$this->addOption('close_button_color', 'string', '#555555', array($this, 'validate_color'))->__('Close Button Color');
|
74 |
+
$this->addOption('close_button_color_hover', 'string', '#aaaaaa', array($this, 'validate_color'));
|
75 |
+
$this->addOption('close_button_color_x', 'string', '#000000', array($this, 'validate_color'));
|
76 |
}
|
77 |
|
78 |
//validation function
|
classes/class-wpfront-notification-bar.php
CHANGED
@@ -35,7 +35,7 @@ if (!class_exists('WPFront_Notification_Bar')) {
|
|
35 |
class WPFront_Notification_Bar {
|
36 |
|
37 |
//Constants
|
38 |
-
const VERSION = '1.
|
39 |
const OPTIONSPAGE_SLUG = 'wpfront-notification-bar';
|
40 |
const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
|
41 |
const OPTION_NAME = 'wpfront-notification-bar-options';
|
@@ -194,6 +194,7 @@ if (!class_exists('WPFront_Notification_Bar')) {
|
|
194 |
'is_admin_bar_showing' => $this->is_admin_bar_showing(),
|
195 |
'display_open_button' => $this->options->display_open_button(),
|
196 |
'keep_closed' => $this->options->keep_closed(),
|
|
|
197 |
'position_offset' => $this->options->position_offset(),
|
198 |
)) . ');';
|
199 |
echo '</script>';
|
35 |
class WPFront_Notification_Bar {
|
36 |
|
37 |
//Constants
|
38 |
+
const VERSION = '1.2';
|
39 |
const OPTIONSPAGE_SLUG = 'wpfront-notification-bar';
|
40 |
const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
|
41 |
const OPTION_NAME = 'wpfront-notification-bar-options';
|
194 |
'is_admin_bar_showing' => $this->is_admin_bar_showing(),
|
195 |
'display_open_button' => $this->options->display_open_button(),
|
196 |
'keep_closed' => $this->options->keep_closed(),
|
197 |
+
'keep_closed_for' => $this->options->keep_closed_for(),
|
198 |
'position_offset' => $this->options->position_offset(),
|
199 |
)) . ');';
|
200 |
echo '</script>';
|
css/options.css
CHANGED
@@ -27,6 +27,12 @@
|
|
27 |
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
#wpfront-notification-bar-options table.form-table .color-selector
|
31 |
{
|
32 |
vertical-align: middle;
|
27 |
|
28 |
}
|
29 |
|
30 |
+
#wpfront-notification-bar-options table.form-table .color-selector-div
|
31 |
+
{
|
32 |
+
display: inline-block;
|
33 |
+
width: 100px;
|
34 |
+
}
|
35 |
+
|
36 |
#wpfront-notification-bar-options table.form-table .color-selector
|
37 |
{
|
38 |
vertical-align: middle;
|
css/wpfront-notification-bar.css
CHANGED
@@ -44,20 +44,9 @@
|
|
44 |
font-size: 10px;
|
45 |
padding: 5px 2px;
|
46 |
|
47 |
-
border: 1px solid #555;
|
48 |
-webkit-border-radius: 2px;
|
49 |
-moz-border-radius: 2px;
|
50 |
border-radius: 2px;
|
51 |
-
|
52 |
-
|
53 |
-
color: #000;
|
54 |
-
background-color: #555;
|
55 |
-
}
|
56 |
-
|
57 |
-
#wpfront-notification-bar div.wpfront-close:hover
|
58 |
-
{
|
59 |
-
border: 1px solid #aaa;
|
60 |
-
background-color: #aaa;
|
61 |
}
|
62 |
|
63 |
#wpfront-notification-bar table, #wpfront-notification-bar tbody, #wpfront-notification-bar tr
|
@@ -65,10 +54,12 @@
|
|
65 |
margin: auto;
|
66 |
border: 0px;
|
67 |
padding: 0px;
|
|
|
68 |
}
|
69 |
|
70 |
#wpfront-notification-bar td
|
71 |
{
|
|
|
72 |
vertical-align: middle;
|
73 |
text-align: center;
|
74 |
border: 0px;
|
44 |
font-size: 10px;
|
45 |
padding: 5px 2px;
|
46 |
|
|
|
47 |
-webkit-border-radius: 2px;
|
48 |
-moz-border-radius: 2px;
|
49 |
border-radius: 2px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
#wpfront-notification-bar table, #wpfront-notification-bar tbody, #wpfront-notification-bar tr
|
54 |
margin: auto;
|
55 |
border: 0px;
|
56 |
padding: 0px;
|
57 |
+
background: inherit;
|
58 |
}
|
59 |
|
60 |
#wpfront-notification-bar td
|
61 |
{
|
62 |
+
background: inherit;
|
63 |
vertical-align: middle;
|
64 |
text-align: center;
|
65 |
border: 0px;
|
js/wpfront-notification-bar.js
CHANGED
@@ -54,7 +54,7 @@
|
|
54 |
|
55 |
//function to set bar height based on options
|
56 |
var closed = false;
|
57 |
-
function setHeight(height, callback) {
|
58 |
callback = callback || $.noop;
|
59 |
if (height == 0) {
|
60 |
if (closed)
|
@@ -75,8 +75,11 @@
|
|
75 |
if (height == 0 && data.display_open_button) {
|
76 |
open_button.show();
|
77 |
}
|
78 |
-
if (height == 0) {
|
79 |
-
|
|
|
|
|
|
|
80 |
}
|
81 |
};
|
82 |
|
@@ -97,14 +100,14 @@
|
|
97 |
|
98 |
if (data.close_button) {
|
99 |
bar.find(".wpfront-close").click(function() {
|
100 |
-
setHeight(0);
|
101 |
});
|
102 |
}
|
103 |
|
104 |
//close button action
|
105 |
if (data.button_action_close_bar) {
|
106 |
bar.find(".wpfront-button").click(function() {
|
107 |
-
setHeight(0);
|
108 |
});
|
109 |
}
|
110 |
|
@@ -126,7 +129,7 @@
|
|
126 |
setHeight(height, function() {
|
127 |
if (data.auto_close_after > 0) {
|
128 |
setTimeout(function() {
|
129 |
-
setHeight(0);
|
130 |
}, data.auto_close_after * 1000);
|
131 |
}
|
132 |
});
|
54 |
|
55 |
//function to set bar height based on options
|
56 |
var closed = false;
|
57 |
+
function setHeight(height, callback, userclosed) {
|
58 |
callback = callback || $.noop;
|
59 |
if (height == 0) {
|
60 |
if (closed)
|
75 |
if (height == 0 && data.display_open_button) {
|
76 |
open_button.show();
|
77 |
}
|
78 |
+
if (height == 0 && data.keep_closed && userclosed) {
|
79 |
+
if (data.keep_closed_for > 0)
|
80 |
+
$.cookie(keep_closed_cookie, 1, {path: "/", expires: data.keep_closed_for});
|
81 |
+
else
|
82 |
+
$.cookie(keep_closed_cookie, 1, {path: "/"});
|
83 |
}
|
84 |
};
|
85 |
|
100 |
|
101 |
if (data.close_button) {
|
102 |
bar.find(".wpfront-close").click(function() {
|
103 |
+
setHeight(0, null, true);
|
104 |
});
|
105 |
}
|
106 |
|
107 |
//close button action
|
108 |
if (data.button_action_close_bar) {
|
109 |
bar.find(".wpfront-button").click(function() {
|
110 |
+
setHeight(0, null, true);
|
111 |
});
|
112 |
}
|
113 |
|
129 |
setHeight(height, function() {
|
130 |
if (data.auto_close_after > 0) {
|
131 |
setTimeout(function() {
|
132 |
+
setHeight(0, null, true);
|
133 |
}, data.auto_close_after * 1000);
|
134 |
}
|
135 |
});
|
languages/wpfront-notification-bar.mo
CHANGED
Binary file
|
languages/wpfront-notification-bar.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WPFront Notification Bar\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: WPFront <contact@wpfront.com>\n"
|
8 |
"Language: en\n"
|
@@ -119,9 +119,21 @@ msgid "Keep Closed"
|
|
119 |
msgstr "Keep Closed"
|
120 |
|
121 |
#: ../classes/class-wpfront-notification-bar-options.php:70
|
|
|
|
|
|
|
|
|
122 |
msgid "Position Offset"
|
123 |
msgstr "Position Offset"
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
#: ../classes/class-wpfront-notification-bar.php:114
|
126 |
msgid "WPFront Notification Bar"
|
127 |
msgstr "WPFront Notification Bar"
|
@@ -138,20 +150,20 @@ msgstr "You do not have sufficient permissions to access this page."
|
|
138 |
msgid "Settings"
|
139 |
msgstr "Settings"
|
140 |
|
141 |
-
#: ../classes/class-wpfront-notification-bar.php:
|
142 |
msgid "Save Changes"
|
143 |
msgstr "Save Changes"
|
144 |
|
145 |
-
#: ../classes/class-wpfront-notification-bar.php:
|
146 |
-
#: ../classes/class-wpfront-notification-bar.php:
|
147 |
msgid "[Page]"
|
148 |
msgstr "[Page]"
|
149 |
|
150 |
-
#: ../classes/class-wpfront-notification-bar.php:
|
151 |
msgid "Home"
|
152 |
msgstr "Home"
|
153 |
|
154 |
-
#: ../classes/class-wpfront-notification-bar.php:
|
155 |
msgid "[Post]"
|
156 |
msgstr "[Post]"
|
157 |
|
@@ -228,83 +240,103 @@ msgstr "A reopen button will be displayed after the bar is closed."
|
|
228 |
msgid "Once closed, bar will display closed on other pages."
|
229 |
msgstr "Once closed, bar will display closed on other pages."
|
230 |
|
231 |
-
#: ../templates/options-template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
msgid "Content"
|
233 |
msgstr "Content"
|
234 |
|
235 |
-
#: ../templates/options-template.php:
|
236 |
msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
|
237 |
msgstr "[HTML tags are allowed. e.g. Add <br /> for break.]"
|
238 |
|
239 |
-
#: ../templates/options-template.php:
|
240 |
msgid "[Displays a button next to the message.]"
|
241 |
msgstr "[Displays a button next to the message.]"
|
242 |
|
243 |
-
#: ../templates/options-template.php:
|
244 |
msgid "Filter"
|
245 |
msgstr "Filter"
|
246 |
|
247 |
-
#: ../templates/options-template.php:
|
248 |
msgid "All pages."
|
249 |
msgstr "All pages."
|
250 |
|
251 |
-
#: ../templates/options-template.php:
|
252 |
msgid "Only in landing page."
|
253 |
msgstr "Only in landing page."
|
254 |
|
255 |
-
#: ../templates/options-template.php:
|
256 |
msgid "[The first page they visit on your website.]"
|
257 |
msgstr "[The first page they visit on your website.]"
|
258 |
|
259 |
-
#: ../templates/options-template.php:
|
260 |
msgid "Include in following pages"
|
261 |
msgstr "Include in following pages"
|
262 |
|
263 |
-
#: ../templates/options-template.php:
|
264 |
msgid "Exclude in following pages"
|
265 |
msgstr "Exclude in following pages"
|
266 |
|
267 |
-
#: ../templates/options-template.php:
|
268 |
msgid "Color"
|
269 |
msgstr "Color"
|
270 |
|
271 |
-
#: ../templates/options-template.php:
|
272 |
msgid "Bar Color"
|
273 |
msgstr "Bar Color"
|
274 |
|
275 |
-
#: ../templates/options-template.php:
|
276 |
msgid "[Select two different colors to create a gradient.]"
|
277 |
msgstr "[Select two different colors to create a gradient.]"
|
278 |
|
279 |
-
#: ../templates/options-template.php:
|
280 |
msgid "Button Color"
|
281 |
msgstr "Button Color"
|
282 |
|
283 |
-
#: ../templates/options-template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
msgid "Plugin Ideas"
|
285 |
msgstr "Plugin Ideas"
|
286 |
|
287 |
-
#: ../templates/options-template.php:
|
288 |
msgid "Settings Description"
|
289 |
msgstr "Settings Description"
|
290 |
|
291 |
-
#: ../templates/options-template.php:
|
292 |
msgid "Plugin FAQ"
|
293 |
msgstr "Plugin FAQ"
|
294 |
|
295 |
-
#: ../templates/options-template.php:
|
296 |
msgid "Feature Request"
|
297 |
msgstr "Feature Request"
|
298 |
|
299 |
-
#: ../templates/options-template.php:
|
300 |
msgid "Report Bug"
|
301 |
msgstr "Report Bug"
|
302 |
|
303 |
-
#: ../templates/options-template.php:
|
304 |
msgid "Write Review"
|
305 |
msgstr "Write Review"
|
306 |
|
307 |
-
#: ../templates/options-template.php:
|
308 |
msgid "Contact Me (syam@wpfront.com)"
|
309 |
msgstr "Contact Me (syam@wpfront.com)"
|
310 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WPFront Notification Bar\n"
|
4 |
+
"POT-Creation-Date: 2014-01-30 17:38-0700\n"
|
5 |
+
"PO-Revision-Date: 2014-01-30 17:39-0700\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: WPFront <contact@wpfront.com>\n"
|
8 |
"Language: en\n"
|
119 |
msgstr "Keep Closed"
|
120 |
|
121 |
#: ../classes/class-wpfront-notification-bar-options.php:70
|
122 |
+
msgid "Keep Closed For"
|
123 |
+
msgstr "Keep Closed For"
|
124 |
+
|
125 |
+
#: ../classes/class-wpfront-notification-bar-options.php:71
|
126 |
msgid "Position Offset"
|
127 |
msgstr "Position Offset"
|
128 |
|
129 |
+
#: ../classes/class-wpfront-notification-bar-options.php:72
|
130 |
+
msgid "Custom CSS"
|
131 |
+
msgstr "Custom CSS"
|
132 |
+
|
133 |
+
#: ../classes/class-wpfront-notification-bar-options.php:73
|
134 |
+
msgid "Close Button Color"
|
135 |
+
msgstr "Close Button Color"
|
136 |
+
|
137 |
#: ../classes/class-wpfront-notification-bar.php:114
|
138 |
msgid "WPFront Notification Bar"
|
139 |
msgstr "WPFront Notification Bar"
|
150 |
msgid "Settings"
|
151 |
msgstr "Settings"
|
152 |
|
153 |
+
#: ../classes/class-wpfront-notification-bar.php:216
|
154 |
msgid "Save Changes"
|
155 |
msgstr "Save Changes"
|
156 |
|
157 |
+
#: ../classes/class-wpfront-notification-bar.php:231
|
158 |
+
#: ../classes/class-wpfront-notification-bar.php:235
|
159 |
msgid "[Page]"
|
160 |
msgstr "[Page]"
|
161 |
|
162 |
+
#: ../classes/class-wpfront-notification-bar.php:231
|
163 |
msgid "Home"
|
164 |
msgstr "Home"
|
165 |
|
166 |
+
#: ../classes/class-wpfront-notification-bar.php:240
|
167 |
msgid "[Post]"
|
168 |
msgstr "[Post]"
|
169 |
|
240 |
msgid "Once closed, bar will display closed on other pages."
|
241 |
msgstr "Once closed, bar will display closed on other pages."
|
242 |
|
243 |
+
#: ../templates/options-template.php:155
|
244 |
+
msgid "day(s)"
|
245 |
+
msgstr "day(s)"
|
246 |
+
|
247 |
+
#: ../templates/options-template.php:155
|
248 |
+
msgid ""
|
249 |
+
"Bar will be kept closed for the number of days specified from last closed "
|
250 |
+
"date."
|
251 |
+
msgstr ""
|
252 |
+
"Bar will be kept closed for the number of days specified from last closed "
|
253 |
+
"date."
|
254 |
+
|
255 |
+
#: ../templates/options-template.php:160
|
256 |
msgid "Content"
|
257 |
msgstr "Content"
|
258 |
|
259 |
+
#: ../templates/options-template.php:169
|
260 |
msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
|
261 |
msgstr "[HTML tags are allowed. e.g. Add <br /> for break.]"
|
262 |
|
263 |
+
#: ../templates/options-template.php:177
|
264 |
msgid "[Displays a button next to the message.]"
|
265 |
msgstr "[Displays a button next to the message.]"
|
266 |
|
267 |
+
#: ../templates/options-template.php:222
|
268 |
msgid "Filter"
|
269 |
msgstr "Filter"
|
270 |
|
271 |
+
#: ../templates/options-template.php:231
|
272 |
msgid "All pages."
|
273 |
msgstr "All pages."
|
274 |
|
275 |
+
#: ../templates/options-template.php:236
|
276 |
msgid "Only in landing page."
|
277 |
msgstr "Only in landing page."
|
278 |
|
279 |
+
#: ../templates/options-template.php:236
|
280 |
msgid "[The first page they visit on your website.]"
|
281 |
msgstr "[The first page they visit on your website.]"
|
282 |
|
283 |
+
#: ../templates/options-template.php:241
|
284 |
msgid "Include in following pages"
|
285 |
msgstr "Include in following pages"
|
286 |
|
287 |
+
#: ../templates/options-template.php:259
|
288 |
msgid "Exclude in following pages"
|
289 |
msgstr "Exclude in following pages"
|
290 |
|
291 |
+
#: ../templates/options-template.php:279
|
292 |
msgid "Color"
|
293 |
msgstr "Color"
|
294 |
|
295 |
+
#: ../templates/options-template.php:283
|
296 |
msgid "Bar Color"
|
297 |
msgstr "Bar Color"
|
298 |
|
299 |
+
#: ../templates/options-template.php:294 ../templates/options-template.php:319
|
300 |
msgid "[Select two different colors to create a gradient.]"
|
301 |
msgstr "[Select two different colors to create a gradient.]"
|
302 |
|
303 |
+
#: ../templates/options-template.php:308
|
304 |
msgid "Button Color"
|
305 |
msgstr "Button Color"
|
306 |
|
307 |
+
#: ../templates/options-template.php:357
|
308 |
+
msgid "[Normal, Hover, X]"
|
309 |
+
msgstr "[Normal, Hover, X]"
|
310 |
+
|
311 |
+
#: ../templates/options-template.php:362
|
312 |
+
msgid "CSS"
|
313 |
+
msgstr "CSS"
|
314 |
+
|
315 |
+
#: ../templates/options-template.php:376
|
316 |
msgid "Plugin Ideas"
|
317 |
msgstr "Plugin Ideas"
|
318 |
|
319 |
+
#: ../templates/options-template.php:378
|
320 |
msgid "Settings Description"
|
321 |
msgstr "Settings Description"
|
322 |
|
323 |
+
#: ../templates/options-template.php:380
|
324 |
msgid "Plugin FAQ"
|
325 |
msgstr "Plugin FAQ"
|
326 |
|
327 |
+
#: ../templates/options-template.php:382
|
328 |
msgid "Feature Request"
|
329 |
msgstr "Feature Request"
|
330 |
|
331 |
+
#: ../templates/options-template.php:384
|
332 |
msgid "Report Bug"
|
333 |
msgstr "Report Bug"
|
334 |
|
335 |
+
#: ../templates/options-template.php:386
|
336 |
msgid "Write Review"
|
337 |
msgstr "Write Review"
|
338 |
|
339 |
+
#: ../templates/options-template.php:388
|
340 |
msgid "Contact Me (syam@wpfront.com)"
|
341 |
msgstr "Contact Me (syam@wpfront.com)"
|
342 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: syammohanm
|
|
3 |
Donate link: http://wpfront.com/donate/
|
4 |
Tags: notification bar, wordpress notification bar, top bar, bottom bar, notification, bar, quick bar, fixed bar, sticky bar, message bar, message, floating bar, notice, sticky header, special offer, discount offer, offer, important, attention bar, highlight bar, popup bar, hellobar, heads up, heads up bar, headsup, headsupbar, popup, Toolbar
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.8
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -55,6 +55,11 @@ No one has asked anything yet.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
= 1.1 =
|
59 |
* Filter pages option added.
|
60 |
* Reopen button added.
|
@@ -70,6 +75,10 @@ No one has asked anything yet.
|
|
70 |
|
71 |
== Upgrade Notice ==
|
72 |
|
|
|
|
|
|
|
|
|
73 |
= 1.1 =
|
74 |
* This version is WordPress 3.8 ready.
|
75 |
* Now you can filter the pages.
|
3 |
Donate link: http://wpfront.com/donate/
|
4 |
Tags: notification bar, wordpress notification bar, top bar, bottom bar, notification, bar, quick bar, fixed bar, sticky bar, message bar, message, floating bar, notice, sticky header, special offer, discount offer, offer, important, attention bar, highlight bar, popup bar, hellobar, heads up, heads up bar, headsup, headsupbar, popup, Toolbar
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 1.2 =
|
59 |
+
* Keep closed for days.
|
60 |
+
* Change color of close button.
|
61 |
+
* Custom CSS option added.
|
62 |
+
|
63 |
= 1.1 =
|
64 |
* Filter pages option added.
|
65 |
* Reopen button added.
|
75 |
|
76 |
== Upgrade Notice ==
|
77 |
|
78 |
+
= 1.2 =
|
79 |
+
* Now you can keep it closed for days.
|
80 |
+
* Change the color of close button.
|
81 |
+
|
82 |
= 1.1 =
|
83 |
* This version is WordPress 3.8 ready.
|
84 |
* Now you can filter the pages.
|
templates/notification-bar-template.php
CHANGED
@@ -60,11 +60,24 @@
|
|
60 |
|
61 |
color: <?php echo $this->options->button_text_color(); ?>;
|
62 |
}
|
63 |
-
|
64 |
#wpfront-notification-bar-open-button
|
65 |
{
|
66 |
background-color: <?php echo $this->options->open_button_color(); ?>;
|
67 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
</style>
|
69 |
|
70 |
<?php if ($this->options->display_button() && $this->options->button_action() == 2) { ?>
|
@@ -106,3 +119,8 @@
|
|
106 |
</table>
|
107 |
</div>
|
108 |
</div>
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
color: <?php echo $this->options->button_text_color(); ?>;
|
62 |
}
|
63 |
+
|
64 |
#wpfront-notification-bar-open-button
|
65 |
{
|
66 |
background-color: <?php echo $this->options->open_button_color(); ?>;
|
67 |
}
|
68 |
+
|
69 |
+
#wpfront-notification-bar div.wpfront-close
|
70 |
+
{
|
71 |
+
border: 1px solid <?php echo $this->options->close_button_color(); ?>;
|
72 |
+
background-color: <?php echo $this->options->close_button_color(); ?>;
|
73 |
+
color: <?php echo $this->options->close_button_color_x(); ?>;
|
74 |
+
}
|
75 |
+
|
76 |
+
#wpfront-notification-bar div.wpfront-close:hover
|
77 |
+
{
|
78 |
+
border: 1px solid <?php echo $this->options->close_button_color_hover(); ?>;
|
79 |
+
background-color: <?php echo $this->options->close_button_color_hover(); ?>;
|
80 |
+
}
|
81 |
</style>
|
82 |
|
83 |
<?php if ($this->options->display_button() && $this->options->button_action() == 2) { ?>
|
119 |
</table>
|
120 |
</div>
|
121 |
</div>
|
122 |
+
|
123 |
+
|
124 |
+
<style type="text/css">
|
125 |
+
<?php echo $this->options->custom_css(); ?>
|
126 |
+
</style>
|
templates/options-template.php
CHANGED
@@ -147,6 +147,14 @@
|
|
147 |
<input type="checkbox" name="<?php echo $this->options->keep_closed_name(); ?>" <?php echo $this->options->keep_closed() ? 'checked' : ''; ?> /> <span class="description">[<?php echo $this->__('Once closed, bar will display closed on other pages.'); ?>]</span>
|
148 |
</td>
|
149 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
</table>
|
151 |
|
152 |
<h3><?php echo $this->__('Content'); ?></h3>
|
@@ -275,12 +283,14 @@
|
|
275 |
<?php echo $this->__('Bar Color'); ?>
|
276 |
</th>
|
277 |
<td>
|
278 |
-
<div class="color-selector"
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
<
|
283 |
-
|
|
|
|
|
284 |
<span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
|
285 |
</td>
|
286 |
</tr>
|
@@ -298,12 +308,14 @@
|
|
298 |
<?php echo $this->__('Button Color'); ?>
|
299 |
</th>
|
300 |
<td>
|
301 |
-
<div class="color-selector"
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
<
|
306 |
-
|
|
|
|
|
307 |
<span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
|
308 |
</td>
|
309 |
</tr>
|
@@ -325,10 +337,42 @@
|
|
325 |
<input type="hidden" name="<?php echo $this->options->open_button_color_name(); ?>" value="<?php echo $this->options->open_button_color(); ?>" />
|
326 |
</td>
|
327 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
</table>
|
329 |
|
330 |
<?php @$this->submit_button(); ?>
|
331 |
-
|
332 |
<a href="http://wpfront.com/notification-bar-plugin-ideas/" target="_blank"><?php echo $this->__('Plugin Ideas'); ?></a>
|
333 |
|
|
334 |
<a href="http://wpfront.com/notification-bar-plugin-settings/" target="_blank"><?php echo $this->__('Settings Description'); ?></a>
|
147 |
<input type="checkbox" name="<?php echo $this->options->keep_closed_name(); ?>" <?php echo $this->options->keep_closed() ? 'checked' : ''; ?> /> <span class="description">[<?php echo $this->__('Once closed, bar will display closed on other pages.'); ?>]</span>
|
148 |
</td>
|
149 |
</tr>
|
150 |
+
<tr>
|
151 |
+
<th scope="row">
|
152 |
+
<?php echo $this->options->keep_closed_for_label(); ?>
|
153 |
+
</th>
|
154 |
+
<td>
|
155 |
+
<input class="seconds" name="<?php echo $this->options->keep_closed_for_name(); ?>" value="<?php echo $this->options->keep_closed_for(); ?>" /> <?php echo $this->__('day(s)'); ?> <span class="description">[<?php echo $this->__('Bar will be kept closed for the number of days specified from last closed date.'); ?>]</span>
|
156 |
+
</td>
|
157 |
+
</tr>
|
158 |
</table>
|
159 |
|
160 |
<h3><?php echo $this->__('Content'); ?></h3>
|
283 |
<?php echo $this->__('Bar Color'); ?>
|
284 |
</th>
|
285 |
<td>
|
286 |
+
<div class="color-selector-div">
|
287 |
+
<div class="color-selector" color="<?php echo $this->options->bar_from_color(); ?>"></div> <span><?php echo $this->options->bar_from_color(); ?></span>
|
288 |
+
<input type="hidden" name="<?php echo $this->options->bar_from_color_name(); ?>" value="<?php echo $this->options->bar_from_color(); ?>" />
|
289 |
+
</div>
|
290 |
+
<div class="color-selector-div">
|
291 |
+
<div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div> <span><?php echo $this->options->bar_to_color(); ?></span>
|
292 |
+
<input type="hidden" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo $this->options->bar_to_color(); ?>" />
|
293 |
+
</div>
|
294 |
<span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
|
295 |
</td>
|
296 |
</tr>
|
308 |
<?php echo $this->__('Button Color'); ?>
|
309 |
</th>
|
310 |
<td>
|
311 |
+
<div class="color-selector-div">
|
312 |
+
<div class="color-selector" color="<?php echo $this->options->button_from_color(); ?>"></div> <span><?php echo $this->options->button_from_color(); ?></span>
|
313 |
+
<input type="hidden" name="<?php echo $this->options->button_from_color_name(); ?>" value="<?php echo $this->options->button_from_color(); ?>" />
|
314 |
+
</div>
|
315 |
+
<div class="color-selector-div">
|
316 |
+
<div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div> <span><?php echo $this->options->button_to_color(); ?></span>
|
317 |
+
<input type="hidden" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo $this->options->button_to_color(); ?>" />
|
318 |
+
</div>
|
319 |
<span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
|
320 |
</td>
|
321 |
</tr>
|
337 |
<input type="hidden" name="<?php echo $this->options->open_button_color_name(); ?>" value="<?php echo $this->options->open_button_color(); ?>" />
|
338 |
</td>
|
339 |
</tr>
|
340 |
+
<tr>
|
341 |
+
<th scope="row">
|
342 |
+
<?php echo $this->options->close_button_color_label(); ?>
|
343 |
+
</th>
|
344 |
+
<td>
|
345 |
+
<div class="color-selector-div">
|
346 |
+
<div class="color-selector" color="<?php echo $this->options->close_button_color(); ?>"></div> <span><?php echo $this->options->close_button_color(); ?></span>
|
347 |
+
<input type="hidden" name="<?php echo $this->options->close_button_color_name(); ?>" value="<?php echo $this->options->close_button_color(); ?>" />
|
348 |
+
</div>
|
349 |
+
<div class="color-selector-div">
|
350 |
+
<div class="color-selector" color="<?php echo $this->options->close_button_color_hover(); ?>"></div> <span><?php echo $this->options->close_button_color_hover(); ?></span>
|
351 |
+
<input type="hidden" name="<?php echo $this->options->close_button_color_hover_name(); ?>" value="<?php echo $this->options->close_button_color_hover(); ?>" />
|
352 |
+
</div>
|
353 |
+
<div class="color-selector-div">
|
354 |
+
<div class="color-selector" color="<?php echo $this->options->close_button_color_x(); ?>"></div> <span><?php echo $this->options->close_button_color_x(); ?></span>
|
355 |
+
<input type="hidden" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo $this->options->close_button_color_x(); ?>" />
|
356 |
+
</div>
|
357 |
+
<span class="description"><?php echo $this->__('[Normal, Hover, X]'); ?></span>
|
358 |
+
</td>
|
359 |
+
</tr>
|
360 |
+
</table>
|
361 |
+
|
362 |
+
<h3><?php echo $this->__('CSS'); ?></h3>
|
363 |
+
<table class="form-table">
|
364 |
+
<tr>
|
365 |
+
<th scope="row">
|
366 |
+
<?php echo $this->options->custom_css_label(); ?>
|
367 |
+
</th>
|
368 |
+
<td>
|
369 |
+
<textarea name="<?php echo $this->options->custom_css_name(); ?>" rows="10" cols="75"><?php echo $this->options->custom_css(); ?></textarea>
|
370 |
+
</td>
|
371 |
+
</tr>
|
372 |
</table>
|
373 |
|
374 |
<?php @$this->submit_button(); ?>
|
375 |
+
|
376 |
<a href="http://wpfront.com/notification-bar-plugin-ideas/" target="_blank"><?php echo $this->__('Plugin Ideas'); ?></a>
|
377 |
|
|
378 |
<a href="http://wpfront.com/notification-bar-plugin-settings/" target="_blank"><?php echo $this->__('Settings Description'); ?></a>
|
wpfront-notification-bar.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WPFront Notification Bar
|
4 |
* Plugin URI: http://wpfront.com/notification-bar-plugin/
|
5 |
* Description: Easily lets you create a bar on top or bottom to display a notification.
|
6 |
-
* Version: 1.
|
7 |
* Author: Syam Mohan
|
8 |
* Author URI: http://wpfront.com
|
9 |
* License: GPL v3
|
3 |
* Plugin Name: WPFront Notification Bar
|
4 |
* Plugin URI: http://wpfront.com/notification-bar-plugin/
|
5 |
* Description: Easily lets you create a bar on top or bottom to display a notification.
|
6 |
+
* Version: 1.2
|
7 |
* Author: Syam Mohan
|
8 |
* Author URI: http://wpfront.com
|
9 |
* License: GPL v3
|