Version Description
- Recurring schedule(PRO).
- New UI.
- Bug fixes.
Download this release
Release Info
Developer | syammohanm |
Plugin | WPFront Notification Bar |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.0 to 3.2.0
- classes/class-wpfront-notification-bar-controller.php +56 -41
- classes/class-wpfront-notification-bar-options.php +3 -2
- classes/class-wpfront-notification-bar.php +6 -11
- css/options.css +74 -30
- css/options.min.css +1 -1
- css/settings.min.css +1 -1
- css/wpfront-notification-bar.min.css +1 -1
- jquery-plugins/colorpicker/css/colorpicker.min.css +1 -1
- js/options.js +177 -54
- js/options.min.js +9 -3
- js/wpfront-notification-bar.min.js +9 -9
- languages/wpfront-notification-bar.mo +0 -0
- languages/wpfront-notification-bar.po +0 -503
- readme.txt +10 -2
- templates/template-wpfront-notification-bar-add-edit.php +379 -77
- uninstall.php +14 -8
- wpfront-notification-bar.php +1 -1
classes/class-wpfront-notification-bar-controller.php
CHANGED
@@ -105,22 +105,27 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Controller
|
|
105 |
}
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
108 |
//options page scripts
|
109 |
public function enqueue_options_scripts() {
|
110 |
wp_enqueue_media();
|
111 |
|
112 |
$this->enqueue_scripts();
|
113 |
|
|
|
114 |
wp_enqueue_script('jquery');
|
115 |
wp_enqueue_script('jquery-ui-core');
|
116 |
wp_enqueue_script('jquery-ui-datepicker');
|
117 |
-
|
118 |
wp_enqueue_script('jquery-ui-timepicker', plugins_url('jquery-plugins/timepicker/js/timepicker.min.js', $this->plugin_file), array('jquery', 'jquery-ui-core'), '1.13.14');
|
119 |
|
120 |
$js = 'jquery-plugins/colorpicker/js/colorpicker.min.js';
|
121 |
wp_enqueue_script('jquery.eyecon.colorpicker', plugins_url($js, $this->plugin_file), array('jquery', 'jquery-ui-core'), WPFront_Notification_Bar::VERSION);
|
122 |
-
|
123 |
wp_enqueue_script('wpfront-notification-bar-options', plugins_url("js/options{$this->min_file_suffix}.js", $this->plugin_file), array(), WPFront_Notification_Bar::VERSION);
|
|
|
124 |
}
|
125 |
|
126 |
//options page styles
|
@@ -374,44 +379,9 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Controller
|
|
374 |
return true;
|
375 |
}
|
376 |
|
377 |
-
$
|
378 |
-
|
379 |
-
|
380 |
-
$now = strtotime($now_str);
|
381 |
-
|
382 |
-
$start_date = $this->options->start_date();
|
383 |
-
if ($start_date != NULL) {
|
384 |
-
$start_date = date('Y-m-d', $start_date);
|
385 |
-
$start_time = $this->options->start_time();
|
386 |
-
if ($start_time == NULL) {
|
387 |
-
$start_time = '12:00 am';
|
388 |
-
} else {
|
389 |
-
$start_time = date('h:i a', $start_time);
|
390 |
-
}
|
391 |
-
$start_date_str = $start_date . ' ' . $start_time;
|
392 |
-
$start_date = strtotime($start_date_str);
|
393 |
-
|
394 |
-
if ($start_date > $now) {
|
395 |
-
$this->log('Filter: Start time is in future, disabling notification. Start time: %s[%s], Current time: %s[%s]', [$start_date, $start_date_str, $now, $now_str]);
|
396 |
-
return false;
|
397 |
-
}
|
398 |
-
}
|
399 |
-
|
400 |
-
$end_date = $this->options->end_date();
|
401 |
-
if ($end_date != NULL) {
|
402 |
-
$end_date = date('Y-m-d', $end_date);
|
403 |
-
$end_time = $this->options->end_time();
|
404 |
-
if ($end_time == NULL) {
|
405 |
-
$end_time = '11:59 pm';
|
406 |
-
} else {
|
407 |
-
$end_time = date('h:i a', $end_time);
|
408 |
-
}
|
409 |
-
|
410 |
-
$end_date_str = $end_date . ' ' . $end_time;
|
411 |
-
$end_date = strtotime($end_date_str);
|
412 |
-
|
413 |
-
if ($end_date < $now) {
|
414 |
-
$this->log('Filter: End time is in past, disabling notification. End time: %s[%s], Current time: %s[%s]', [$end_date, $end_date_str, $now, $now_str]);
|
415 |
return false;
|
416 |
}
|
417 |
}
|
@@ -506,6 +476,51 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Controller
|
|
506 |
return true;
|
507 |
}
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
protected function is_user_logged_in() {
|
510 |
$logged_in = is_user_logged_in();
|
511 |
|
@@ -708,7 +723,7 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Controller
|
|
708 |
return false;
|
709 |
}
|
710 |
|
711 |
-
|
712 |
$log_prefix = $this->get_log_prefix();
|
713 |
$this->logs["$log_prefix $message"] = $args;
|
714 |
}
|
105 |
}
|
106 |
}
|
107 |
|
108 |
+
public function get_menu_slug() {
|
109 |
+
return WPFront_Notification_Bar::PLUGIN_SLUG;
|
110 |
+
}
|
111 |
+
|
112 |
//options page scripts
|
113 |
public function enqueue_options_scripts() {
|
114 |
wp_enqueue_media();
|
115 |
|
116 |
$this->enqueue_scripts();
|
117 |
|
118 |
+
wp_enqueue_script('postbox');
|
119 |
wp_enqueue_script('jquery');
|
120 |
wp_enqueue_script('jquery-ui-core');
|
121 |
wp_enqueue_script('jquery-ui-datepicker');
|
|
|
122 |
wp_enqueue_script('jquery-ui-timepicker', plugins_url('jquery-plugins/timepicker/js/timepicker.min.js', $this->plugin_file), array('jquery', 'jquery-ui-core'), '1.13.14');
|
123 |
|
124 |
$js = 'jquery-plugins/colorpicker/js/colorpicker.min.js';
|
125 |
wp_enqueue_script('jquery.eyecon.colorpicker', plugins_url($js, $this->plugin_file), array('jquery', 'jquery-ui-core'), WPFront_Notification_Bar::VERSION);
|
126 |
+
wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0');
|
127 |
wp_enqueue_script('wpfront-notification-bar-options', plugins_url("js/options{$this->min_file_suffix}.js", $this->plugin_file), array(), WPFront_Notification_Bar::VERSION);
|
128 |
+
wp_enqueue_script('jquery-ui-tooltip', null, array('jquery'));
|
129 |
}
|
130 |
|
131 |
//options page styles
|
379 |
return true;
|
380 |
}
|
381 |
|
382 |
+
if ($this->options->filter_date_type() === 'start_end') {
|
383 |
+
$result = $this->start_date_time();
|
384 |
+
if (!$result) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
return false;
|
386 |
}
|
387 |
}
|
476 |
return true;
|
477 |
}
|
478 |
|
479 |
+
protected function start_date_time() {
|
480 |
+
$now = current_time('mysql');
|
481 |
+
$now = strtotime($now);
|
482 |
+
$now_str = date('Y-m-d h:i a', $now);
|
483 |
+
$now = strtotime($now_str);
|
484 |
+
|
485 |
+
$start_date = $this->options->start_date();
|
486 |
+
if ($start_date != NULL) {
|
487 |
+
$start_date = date('Y-m-d', $start_date);
|
488 |
+
$start_time = $this->options->start_time();
|
489 |
+
if ($start_time == NULL) {
|
490 |
+
$start_time = '12:00 am';
|
491 |
+
} else {
|
492 |
+
$start_time = date('h:i a', $start_time);
|
493 |
+
}
|
494 |
+
$start_date_str = $start_date . ' ' . $start_time;
|
495 |
+
$start_date = strtotime($start_date_str);
|
496 |
+
|
497 |
+
if ($start_date > $now) {
|
498 |
+
$this->log('Filter: Start time is in future, disabling notification. Start time: %s[%s], Current time: %s[%s]', [$start_date, $start_date_str, $now, $now_str]);
|
499 |
+
return false;
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
$end_date = $this->options->end_date();
|
504 |
+
if ($end_date != NULL) {
|
505 |
+
$end_date = date('Y-m-d', $end_date);
|
506 |
+
$end_time = $this->options->end_time();
|
507 |
+
if ($end_time == NULL) {
|
508 |
+
$end_time = '11:59 pm';
|
509 |
+
} else {
|
510 |
+
$end_time = date('h:i a', $end_time);
|
511 |
+
}
|
512 |
+
|
513 |
+
$end_date_str = $end_date . ' ' . $end_time;
|
514 |
+
$end_date = strtotime($end_date_str);
|
515 |
+
|
516 |
+
if ($end_date < $now) {
|
517 |
+
$this->log('Filter: End time is in past, disabling notification. End time: %s[%s], Current time: %s[%s]', [$end_date, $end_date_str, $now, $now_str]);
|
518 |
+
return false;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
return true;
|
522 |
+
}
|
523 |
+
|
524 |
protected function is_user_logged_in() {
|
525 |
$logged_in = is_user_logged_in();
|
526 |
|
723 |
return false;
|
724 |
}
|
725 |
|
726 |
+
protected function log($message, $args = null) {
|
727 |
$log_prefix = $this->get_log_prefix();
|
728 |
$this->logs["$log_prefix $message"] = $args;
|
729 |
}
|
classes/class-wpfront-notification-bar-options.php
CHANGED
@@ -109,7 +109,8 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Options'))
|
|
109 |
$this->addOption('max_views_for', 'int', 0, array($this, 'validate_zero_positive'))->label(__('Max Views For', 'wpfront-notification-bar'));
|
110 |
$this->addOption('max_views_cookie_name', 'string', 'wpfront-notification-bar-max-views' . $this->get_time(), array($this, 'validate_max_views_cookie_name'))->label(__('Max Views Cookie Name', 'wpfront-notification-bar'));
|
111 |
$this->addOption('css_enqueue_footer', 'bit', false)->label(__('Enqueue in Footer', 'wpfront-notification-bar'));
|
112 |
-
|
|
|
113 |
}
|
114 |
|
115 |
//validation function
|
@@ -206,7 +207,7 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Options'))
|
|
206 |
|
207 |
return $arg;
|
208 |
}
|
209 |
-
|
210 |
protected function validate_max_views_cookie_name($arg) {
|
211 |
$arg = sanitize_key($arg);
|
212 |
|
109 |
$this->addOption('max_views_for', 'int', 0, array($this, 'validate_zero_positive'))->label(__('Max Views For', 'wpfront-notification-bar'));
|
110 |
$this->addOption('max_views_cookie_name', 'string', 'wpfront-notification-bar-max-views' . $this->get_time(), array($this, 'validate_max_views_cookie_name'))->label(__('Max Views Cookie Name', 'wpfront-notification-bar'));
|
111 |
$this->addOption('css_enqueue_footer', 'bit', false)->label(__('Enqueue in Footer', 'wpfront-notification-bar'));
|
112 |
+
$this->addOption('filter_date_type', 'string', 'start_end')->label(__('Date Type', 'wpfront-notification-bar'));
|
113 |
+
$this->addOption('schedule', 'string', '0 0 * * *')->label(__('Schedule', 'wpfront-notification-bar'));
|
114 |
}
|
115 |
|
116 |
//validation function
|
207 |
|
208 |
return $arg;
|
209 |
}
|
210 |
+
|
211 |
protected function validate_max_views_cookie_name($arg) {
|
212 |
$arg = sanitize_key($arg);
|
213 |
|
classes/class-wpfront-notification-bar.php
CHANGED
@@ -41,7 +41,7 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
41 |
class WPFront_Notification_Bar {
|
42 |
|
43 |
//Constants
|
44 |
-
const VERSION = '3.
|
45 |
const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
|
46 |
const OPTION_NAME = 'wpfront-notification-bar-options';
|
47 |
const PLUGIN_SLUG = 'wpfront-notification-bar';
|
@@ -70,7 +70,6 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
70 |
public function init($plugin_file) {
|
71 |
$this->plugin_file = $plugin_file;
|
72 |
|
73 |
-
add_action('plugins_loaded', array($this, 'plugins_loaded'));
|
74 |
add_action('init', array($this, 'custom_css'));
|
75 |
|
76 |
if (is_admin()) {
|
@@ -127,10 +126,6 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
127 |
}
|
128 |
}
|
129 |
|
130 |
-
public function plugins_loaded() {
|
131 |
-
load_plugin_textdomain(self::PLUGIN_SLUG, false, self::PLUGIN_SLUG . '/languages/');
|
132 |
-
}
|
133 |
-
|
134 |
public function admin_init() {
|
135 |
register_setting(self::OPTIONS_GROUP_NAME, self::OPTION_NAME);
|
136 |
}
|
@@ -180,13 +175,13 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
180 |
$settings_link = '<a id="wpfront-notification-bar-settings-link" href="' . menu_page_url(self::PLUGIN_SLUG, false) . '">' . __('Settings', 'wpfront-notification-bar') . '</a>';
|
181 |
array_unshift($links, $settings_link);
|
182 |
}
|
183 |
-
|
184 |
$url = 'https://wpfront.com/notification-bar-pro/';
|
185 |
$text = __('Upgrade', 'wpfront-notification-bar');
|
186 |
$a = sprintf('<a id="wpfront-notification-bar-upgrade-link" style="color:red;" target="_blank" href="%s">%s</a>', $url, $text);
|
187 |
array_unshift($links, $a);
|
188 |
}
|
189 |
-
|
190 |
return $links;
|
191 |
}
|
192 |
|
@@ -211,7 +206,7 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
211 |
$template->write($controller, true);
|
212 |
exit();
|
213 |
}
|
214 |
-
|
215 |
foreach ($this->controllers as $controller) {
|
216 |
$options = $controller->get_options();
|
217 |
if ($options->dynamic_css_use_url()) {
|
@@ -219,7 +214,7 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
219 |
$template->write($controller);
|
220 |
}
|
221 |
}
|
222 |
-
|
223 |
exit();
|
224 |
}
|
225 |
|
@@ -247,7 +242,7 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar')) {
|
|
247 |
public function option_page_capability_callback() {
|
248 |
return $this->cap;
|
249 |
}
|
250 |
-
|
251 |
}
|
252 |
|
253 |
}
|
41 |
class WPFront_Notification_Bar {
|
42 |
|
43 |
//Constants
|
44 |
+
const VERSION = '3.2.0.011614';
|
45 |
const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
|
46 |
const OPTION_NAME = 'wpfront-notification-bar-options';
|
47 |
const PLUGIN_SLUG = 'wpfront-notification-bar';
|
70 |
public function init($plugin_file) {
|
71 |
$this->plugin_file = $plugin_file;
|
72 |
|
|
|
73 |
add_action('init', array($this, 'custom_css'));
|
74 |
|
75 |
if (is_admin()) {
|
126 |
}
|
127 |
}
|
128 |
|
|
|
|
|
|
|
|
|
129 |
public function admin_init() {
|
130 |
register_setting(self::OPTIONS_GROUP_NAME, self::OPTION_NAME);
|
131 |
}
|
175 |
$settings_link = '<a id="wpfront-notification-bar-settings-link" href="' . menu_page_url(self::PLUGIN_SLUG, false) . '">' . __('Settings', 'wpfront-notification-bar') . '</a>';
|
176 |
array_unshift($links, $settings_link);
|
177 |
}
|
178 |
+
|
179 |
$url = 'https://wpfront.com/notification-bar-pro/';
|
180 |
$text = __('Upgrade', 'wpfront-notification-bar');
|
181 |
$a = sprintf('<a id="wpfront-notification-bar-upgrade-link" style="color:red;" target="_blank" href="%s">%s</a>', $url, $text);
|
182 |
array_unshift($links, $a);
|
183 |
}
|
184 |
+
|
185 |
return $links;
|
186 |
}
|
187 |
|
206 |
$template->write($controller, true);
|
207 |
exit();
|
208 |
}
|
209 |
+
|
210 |
foreach ($this->controllers as $controller) {
|
211 |
$options = $controller->get_options();
|
212 |
if ($options->dynamic_css_use_url()) {
|
214 |
$template->write($controller);
|
215 |
}
|
216 |
}
|
217 |
+
|
218 |
exit();
|
219 |
}
|
220 |
|
242 |
public function option_page_capability_callback() {
|
243 |
return $this->cap;
|
244 |
}
|
245 |
+
|
246 |
}
|
247 |
|
248 |
}
|
css/options.css
CHANGED
@@ -1,37 +1,35 @@
|
|
1 |
-
#icon-wpfront-notification-bar
|
2 |
-
{
|
3 |
-
background: url("../images/settings32x32.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
|
4 |
-
}
|
5 |
-
|
6 |
-
#wpfront-notification-bar-options
|
7 |
-
{
|
8 |
-
}
|
9 |
-
|
10 |
#wpfront-notification-bar-options input.seconds,
|
11 |
#wpfront-notification-bar-options input.pixels
|
12 |
{
|
13 |
width: 40px;
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
#wpfront-notification-bar-options input.date,
|
17 |
#wpfront-notification-bar-options input.time
|
18 |
{
|
19 |
width: 100px;
|
20 |
}
|
21 |
|
22 |
-
#wpfront-notification-bar-options
|
23 |
{
|
24 |
-
width:
|
25 |
}
|
26 |
|
27 |
#wpfront-notification-bar-options input.URL
|
28 |
{
|
29 |
-
width:
|
30 |
}
|
31 |
|
32 |
-
#wpfront-notification-bar-options table.form-table
|
33 |
{
|
34 |
-
|
|
|
|
|
35 |
}
|
36 |
|
37 |
#wpfront-notification-bar-options table.form-table .color-selector-div
|
@@ -55,7 +53,7 @@
|
|
55 |
|
56 |
#wpfront-notification-bar-options table.form-table div.pages-selection, #wpfront-notification-bar-options table.form-table div.roles-selection
|
57 |
{
|
58 |
-
width:
|
59 |
height: 150px;
|
60 |
background-color: #fff;
|
61 |
overflow: auto;
|
@@ -70,20 +68,16 @@
|
|
70 |
#wpfront-notification-bar-options table.form-table div.page-div, #wpfront-notification-bar-options table.form-table div.role-div
|
71 |
{
|
72 |
float: left;
|
73 |
-
width:
|
|
|
74 |
padding: 2px;
|
75 |
white-space: nowrap;
|
76 |
overflow: hidden;
|
77 |
}
|
78 |
|
79 |
-
#wpfront-notification-bar-options input.cookie-name
|
80 |
-
{
|
81 |
-
width: 30%;
|
82 |
-
}
|
83 |
-
|
84 |
#wpfront-notification-bar-options input.post-id-list
|
85 |
{
|
86 |
-
width:
|
87 |
}
|
88 |
|
89 |
.colorpicker input
|
@@ -95,16 +89,10 @@
|
|
95 |
{
|
96 |
min-height: 0px;
|
97 |
height: 24px;
|
98 |
-
margin-bottom: 5px;
|
99 |
line-height: inherit;
|
100 |
vertical-align: inherit;
|
101 |
}
|
102 |
|
103 |
-
#wpfront-notification-bar-options #reopen-button-image-url
|
104 |
-
{
|
105 |
-
width:600px;
|
106 |
-
}
|
107 |
-
|
108 |
.wp-editor-container textarea.wp-editor-area
|
109 |
{
|
110 |
width: 100% !important;
|
@@ -119,6 +107,62 @@
|
|
119 |
height: 280px;
|
120 |
}
|
121 |
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#wpfront-notification-bar-options input.seconds,
|
2 |
#wpfront-notification-bar-options input.pixels
|
3 |
{
|
4 |
width: 40px;
|
5 |
}
|
6 |
|
7 |
+
#wpfront-notification-bar-options input.minutes
|
8 |
+
{
|
9 |
+
width: 50px;
|
10 |
+
}
|
11 |
+
|
12 |
#wpfront-notification-bar-options input.date,
|
13 |
#wpfront-notification-bar-options input.time
|
14 |
{
|
15 |
width: 100px;
|
16 |
}
|
17 |
|
18 |
+
#wpfront-notification-bar-options textarea
|
19 |
{
|
20 |
+
width: 100%;
|
21 |
}
|
22 |
|
23 |
#wpfront-notification-bar-options input.URL
|
24 |
{
|
25 |
+
width: 70%;
|
26 |
}
|
27 |
|
28 |
+
#wpfront-notification-bar-options table.form-table i.fa.fa-question-circle-o
|
29 |
{
|
30 |
+
opacity: 0.8;
|
31 |
+
font-size: 13px;
|
32 |
+
vertical-align: middle;
|
33 |
}
|
34 |
|
35 |
#wpfront-notification-bar-options table.form-table .color-selector-div
|
53 |
|
54 |
#wpfront-notification-bar-options table.form-table div.pages-selection, #wpfront-notification-bar-options table.form-table div.roles-selection
|
55 |
{
|
56 |
+
width: 100%;
|
57 |
height: 150px;
|
58 |
background-color: #fff;
|
59 |
overflow: auto;
|
68 |
#wpfront-notification-bar-options table.form-table div.page-div, #wpfront-notification-bar-options table.form-table div.role-div
|
69 |
{
|
70 |
float: left;
|
71 |
+
width: 32%;
|
72 |
+
min-width: 225px;
|
73 |
padding: 2px;
|
74 |
white-space: nowrap;
|
75 |
overflow: hidden;
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
78 |
#wpfront-notification-bar-options input.post-id-list
|
79 |
{
|
80 |
+
width: 100%;
|
81 |
}
|
82 |
|
83 |
.colorpicker input
|
89 |
{
|
90 |
min-height: 0px;
|
91 |
height: 24px;
|
|
|
92 |
line-height: inherit;
|
93 |
vertical-align: inherit;
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
.wp-editor-container textarea.wp-editor-area
|
97 |
{
|
98 |
width: 100% !important;
|
107 |
height: 280px;
|
108 |
}
|
109 |
|
110 |
+
.notification-bar-schedule {
|
111 |
+
font-weight: bold !important;
|
112 |
+
}
|
113 |
+
|
114 |
+
#wpfront-schedule-crontable {
|
115 |
+
border-collapse: collapse;
|
116 |
+
width: 60%;
|
117 |
+
margin-top: 10px;
|
118 |
+
}
|
119 |
+
|
120 |
+
#wpfront-schedule-crontable th,
|
121 |
+
#wpfront-schedule-crontable td {
|
122 |
+
border-bottom: 1px solid gray;
|
123 |
+
padding: 10px 10px 10px 0;
|
124 |
+
}
|
125 |
+
|
126 |
+
#wpfront-schedule-crontable .hour,
|
127 |
+
#wpfront-schedule-crontable .minute {
|
128 |
+
text-align: right;
|
129 |
+
}
|
130 |
+
|
131 |
+
.notification-bar-tooltip {
|
132 |
+
background: #ffffff;
|
133 |
+
border: 1px solid #888;
|
134 |
}
|
135 |
+
.notification-bar-tooltip {
|
136 |
+
padding: 10px 20px;
|
137 |
+
color: black;
|
138 |
+
border-radius: 5px;
|
139 |
+
box-shadow: 0 0 7px #888888;
|
140 |
+
max-width:350px;
|
141 |
+
opacity: 1;
|
142 |
+
font-family: inherit;
|
143 |
+
font-size: inherit;
|
144 |
+
font-style: inherit;
|
145 |
+
font-weight: inherit;
|
146 |
+
}
|
147 |
+
|
148 |
+
#wpfront-notification-bar-options .free-to-pro ul {
|
149 |
+
list-style: inside !important;
|
150 |
+
font-weight: bold;
|
151 |
+
}
|
152 |
+
|
153 |
+
#wpfront-notification-bar-options .free-to-pro .discount-tip,
|
154 |
+
#wpfront-notification-bar-options .free-to-pro .discount-code,
|
155 |
+
#wpfront-notification-bar-options .free-to-pro .upgrade-button {
|
156 |
+
text-align: center;
|
157 |
+
}
|
158 |
+
|
159 |
+
#wpfront-notification-bar-options .free-to-pro .discount-tip {
|
160 |
+
color: red;
|
161 |
+
}
|
162 |
+
|
163 |
+
#wpfront-notification-bar-options .free-to-pro .discount-code,
|
164 |
+
#wpfront-notification-bar-options #postbox-side-2 .postbox-header .hndle {
|
165 |
+
font-weight: bold;
|
166 |
+
color: red;
|
167 |
+
}
|
168 |
+
|
css/options.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#
|
1 |
+
#wpfront-notification-bar-options input.pixels,#wpfront-notification-bar-options input.seconds{width:40px}#wpfront-notification-bar-options input.minutes{width:50px}#wpfront-notification-bar-options input.date,#wpfront-notification-bar-options input.time{width:100px}#wpfront-notification-bar-options textarea{width:100%}#wpfront-notification-bar-options input.URL{width:70%}#wpfront-notification-bar-options table.form-table i.fa.fa-question-circle-o{font-size:13px;opacity:.8;vertical-align:middle}#wpfront-notification-bar-options table.form-table .color-selector-div{display:inline-block;width:120px}#wpfront-notification-bar-options table.form-table .color-selector{vertical-align:middle}#wpfront-notification-bar-options table.form-table .color-value{height:24px;min-height:0;vertical-align:middle;width:75px}#wpfront-notification-bar-options table.form-table div.pages-selection,#wpfront-notification-bar-options table.form-table div.roles-selection{background-color:#fff;border:1px solid #dfdfdf;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;height:150px;overflow:auto;width:100%}#wpfront-notification-bar-options table.form-table div.page-div,#wpfront-notification-bar-options table.form-table div.role-div{float:left;min-width:225px;overflow:hidden;padding:2px;white-space:nowrap;width:32%}#wpfront-notification-bar-options input.post-id-list{width:100%}.colorpicker input{min-height:0}#wpfront-notification-bar-options #media-library-button{height:24px;line-height:inherit;min-height:0;vertical-align:inherit}.wp-editor-container textarea.wp-editor-area{width:100%!important}.wpfront-notification-bar-editor{width:70%}#notification-bar-message-text{height:280px}.notification-bar-schedule{font-weight:700!important}#wpfront-schedule-crontable{border-collapse:collapse;margin-top:10px;width:60%}#wpfront-schedule-crontable td,#wpfront-schedule-crontable th{border-bottom:1px solid gray;padding:10px 10px 10px 0}#wpfront-schedule-crontable .hour,#wpfront-schedule-crontable .minute{text-align:right}.notification-bar-tooltip{background:#fff;border:1px solid #888;border-radius:5px;box-shadow:0 0 7px #888;color:#000;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;max-width:350px;opacity:1;padding:10px 20px}#wpfront-notification-bar-options .free-to-pro ul{font-weight:700;list-style:inside!important}#wpfront-notification-bar-options .free-to-pro .discount-code,#wpfront-notification-bar-options .free-to-pro .discount-tip,#wpfront-notification-bar-options .free-to-pro .upgrade-button{text-align:center}#wpfront-notification-bar-options .free-to-pro .discount-tip{color:red}#wpfront-notification-bar-options #postbox-side-2 .postbox-header .hndle,#wpfront-notification-bar-options .free-to-pro .discount-code{color:red;font-weight:700}
|
css/settings.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.tagify{
|
1 |
+
.tagify{box-shadow:0 0 0 transparent;border-radius:4px;border:1px solid #7e8993;background-color:#fff;color:#32373c}div.wrap.wpfront-notification-bar table.wp-list-table.notification .column-enabled,div.wrap.wpfront-notification-bar table.wp-list-table.notification .column-preview-mode,div.wrap.wpfront-notification-bar table.wp-list-table.notification .column-debug-mode{text-align:center}div.wrap.wp-notification-bar-license table.form-table td.invalid,div.wrap.wp-notification-bar-license table.form-table td.expired,div.wrap.wp-notification-bar-license table.form-table td.item_name_mismatch,div.wrap.wp-notification-bar-license table.form-table td.disabled{color:red}
|
css/wpfront-notification-bar.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpfront-notification-bar{
|
1 |
+
.wpfront-notification-bar{visibility:hidden;position:fixed;overflow:hidden;left:0;right:0;text-align:center;color:#fff;background-color:#000;z-index:99998}.wpfront-bottom-shadow{-webkit-box-shadow:0 5px 5px 0 rgba(0,0,0,0.75);-moz-box-shadow:0 5px 5px 0 rgba(0,0,0,0.75);box-shadow:0 5px 5px 0 rgba(0,0,0,0.75)}.wpfront-top-shadow{-webkit-box-shadow:0 -5px 5px 0 rgba(0,0,0,0.75);-moz-box-shadow:0 -5px 5px 0 rgba(0,0,0,0.75);box-shadow:0 -5px 5px 0 rgba(0,0,0,0.75)}.wpfront-notification-bar.wpfront-fixed{position:fixed;z-index:99998;width:100%;display:flex;align-content:center;align-items:center;justify-content:center;flex-direction:row}.wpfront-notification-bar.wpfront-fixed-position{z-index:99999}.wpfront-notification-bar.wpfront-fixed.load{visibility:visible;position:relative}.wpfront-notification-bar.top{top:0}.wpfront-notification-bar.bottom{bottom:0}.wpfront-notification-bar div.wpfront-close{position:absolute;top:3px;right:5px;cursor:pointer;font-family:Arial,sans-serif;font-weight:bold;line-height:0;font-size:10px;padding:5px 2px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.wpfront-notification-bar table,.wpfront-notification-bar tbody,.wpfront-notification-bar tr{margin:auto;border:0;padding:0;background:inherit}.wpfront-notification-bar td{background:inherit;vertical-align:middle;text-align:center;border:0;margin:0;padding:0;line-height:1em}.wpfront-notification-bar div.wpfront-div{display:inline-block;text-align:center;vertical-align:middle;padding:5px 0}.wpfront-notification-bar-editor a.wpfront-button,.wpfront-notification-bar a.wpfront-button{display:inline-block;box-shadow:0 1px 2px rgba(0,0,0,0.2);white-space:nowrap;font-size:13px;font-weight:bold;text-align:center;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,0.3);cursor:pointer;padding:5px 10px;margin-left:5px;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.wpfront-notification-bar-open-button{position:absolute;right:10px;z-index:99998;border:3px solid white;width:23px;height:30px;cursor:pointer;background-repeat:no-repeat;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wpfront-notification-bar-open-button.hidden{display:none}.wpfront-notification-bar-open-button.top{top:0;background-position:top center;border-top:0;-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-top-left-radius:0}.wpfront-notification-bar-open-button.bottom{bottom:0;background-position:bottom center;border-bottom:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.wpfront-notification-bar-spacer{position:relative;z-index:99998}.wpfront-notification-bar-spacer.wpfront-fixed-position{z-index:99999}.wpfront-notification-bar-spacer.hidden{display:none}div.wpfront-message p{margin:0}
|
jquery-plugins/colorpicker/css/colorpicker.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background
|
1 |
+
.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/colorpicker_overlay.png)}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/colorpicker_select.gif);margin:-5px 0 0 -5px}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/colorpicker_indic.gif) left top;margin:-4px 0 0 0;left:0}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:13px;outline:0}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/colorpicker_hex.png) top;left:212px;top:142px}.colorpicker_hex input{right:6px}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}.colorpicker_rgb_r{background-image:url(../images/colorpicker_rgb_r.png);top:52px;left:212px}.colorpicker_rgb_g{background-image:url(../images/colorpicker_rgb_g.png);top:82px;left:212px}.colorpicker_rgb_b{background-image:url(../images/colorpicker_rgb_b.png);top:112px;left:212px}.colorpicker_hsb_h{background-image:url(../images/colorpicker_hsb_h.png);top:52px;left:282px}.colorpicker_hsb_s{background-image:url(../images/colorpicker_hsb_s.png);top:82px;left:282px}.colorpicker_hsb_b{background-image:url(../images/colorpicker_hsb_b.png);top:112px;left:282px}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}.colorpicker_focus{background-position:center}.colorpicker_hex.colorpicker_focus{background-position:bottom}.colorpicker_submit.colorpicker_focus{background-position:bottom}.colorpicker_slider{background-position:bottom}.color-selector{display:inline-block;width:26px;height:26px;background:url(../images/select2.png) center}
|
js/options.js
CHANGED
@@ -1,71 +1,194 @@
|
|
1 |
-
|
2 |
-
var
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
var $this = $(this);
|
7 |
-
var $input = $this.parent().parent().parent().prev();
|
8 |
-
var $text = $input.val();
|
9 |
|
10 |
-
if ($
|
11 |
-
$
|
|
|
|
|
|
|
|
|
12 |
} else {
|
13 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
-
$
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
var div = $(this).parent().parent().parent();
|
23 |
-
div.find('input:checked').each(function (i, e) {
|
24 |
-
values.push($(e).val());
|
25 |
});
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
});
|
40 |
-
|
41 |
-
function setColorPicker(div) {
|
42 |
-
if (div.ColorPicker) {
|
43 |
-
div.ColorPicker({
|
44 |
-
color: div.attr('color'),
|
45 |
-
onShow: function (colpkr) {
|
46 |
-
$(colpkr).fadeIn(500);
|
47 |
-
return false;
|
48 |
-
}, onHide: function (colpkr) {
|
49 |
-
$(colpkr).fadeOut(500);
|
50 |
-
return false;
|
51 |
-
},
|
52 |
-
onChange: function (hsb, hex, rgb) {
|
53 |
-
div.css('backgroundColor', '#' + hex);
|
54 |
-
div.next().val('#' + hex);
|
55 |
}
|
56 |
-
|
|
|
|
|
|
|
57 |
}
|
58 |
-
}
|
59 |
|
60 |
-
$divOptions.find(".color-selector").each(function (i, e) {
|
61 |
-
setColorPicker($(e));
|
62 |
-
});
|
63 |
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
-
(function () {
|
67 |
window.init_wpfront_notifiction_bar_options = function (settings) {
|
68 |
var $ = jQuery;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
var mediaLibrary = null;
|
70 |
|
71 |
$('#wpfront-notification-bar-options').on('click', '#media-library-button', function () {
|
1 |
+
(function () {
|
2 |
+
var fn_init = function (settings) {
|
3 |
+
var $ = jQuery;
|
4 |
+
var $divOptions = $('#wpfront-notification-bar-options');
|
5 |
+
|
6 |
+
$divOptions.on('change', '.pages-selection input[type="checkbox"]', function () {
|
7 |
+
var $this = $(this);
|
8 |
+
var $input = $this.parent().parent().parent().prev();
|
9 |
+
var $text = $input.val();
|
10 |
+
|
11 |
+
if ($this.prop('checked')) {
|
12 |
+
$text += ',' + $this.val();
|
13 |
+
} else {
|
14 |
+
$text = (',' + $text + ',').replace(',' + $this.val() + ',', ',');
|
15 |
+
}
|
16 |
+
|
17 |
+
$text = $text.replace(/(^[,\s]+)|([,\s]+$)/g, '');
|
18 |
+
$input.val($text);
|
19 |
+
});
|
20 |
+
|
21 |
+
$divOptions.on('change', '.roles-selection input[type="checkbox"]', function () {
|
22 |
+
var values = [];
|
23 |
+
var div = $(this).parent().parent().parent();
|
24 |
+
div.find('input:checked').each(function (i, e) {
|
25 |
+
values.push($(e).val());
|
26 |
+
});
|
27 |
+
div.children(":first").val(JSON.stringify(values));
|
28 |
+
});
|
29 |
|
30 |
+
minutestohours();
|
|
|
|
|
|
|
31 |
|
32 |
+
if ($("#date-none").is(":checked") === true) {
|
33 |
+
$('.start-end-date').hide();
|
34 |
+
$('.schedule-date').hide();
|
35 |
+
} else if ($("#start-end-date").is(":checked") === true) {
|
36 |
+
$('.start-end-date').show();
|
37 |
+
$('.schedule-date').hide();
|
38 |
} else {
|
39 |
+
$('.start-end-date').hide();
|
40 |
+
$('.schedule-date').show();
|
41 |
+
}
|
42 |
+
|
43 |
+
$divOptions.on('click', '#start-end-date', function () {
|
44 |
+
$('.start-end-date').show();
|
45 |
+
$('.schedule-date').hide();
|
46 |
+
});
|
47 |
+
$divOptions.on('click', '#schedule-date', function () {
|
48 |
+
$('.start-end-date').hide();
|
49 |
+
$('.schedule-date').show();
|
50 |
+
});
|
51 |
+
$divOptions.on('click', '#date-none', function () {
|
52 |
+
$('.start-end-date').hide();
|
53 |
+
$('.schedule-date').hide();
|
54 |
+
});
|
55 |
+
|
56 |
+
function schedule() {
|
57 |
+
var cronminutes = [];
|
58 |
+
var cronhours = [];
|
59 |
+
var cronmday = [];
|
60 |
+
var cronmon = [];
|
61 |
+
var cronwday = [];
|
62 |
+
var schedule_date = $('input[name="wpfront-notification-bar-options[schedule_start_date]"]').val();
|
63 |
+
var schedule_time = $('input[name="wpfront-notification-bar-options[schedule_start_time]"]').val();
|
64 |
+
var schedule_duration = $('input[name="wpfront-notification-bar-options[schedule_duration]"]').val();
|
65 |
+
|
66 |
+
if ('hour' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
67 |
+
cronminutes.push($('select[name="hour_cron_minutes"]').val());
|
68 |
+
cronhours.push('*');
|
69 |
+
cronmday.push('*');
|
70 |
+
cronmon.push('*');
|
71 |
+
cronwday.push('*');
|
72 |
+
}
|
73 |
+
|
74 |
+
if ('day' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
75 |
+
cronminutes.push($('select[name="day_cron_minutes"]').val());
|
76 |
+
cronhours.push($('select[name="day_cron_hours"]').val());
|
77 |
+
cronmday.push('*');
|
78 |
+
cronmon.push('*');
|
79 |
+
cronwday.push('*');
|
80 |
+
}
|
81 |
+
|
82 |
+
if ('week' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
83 |
+
cronminutes.push($('select[name="weekly_cron_minutes"]').val());
|
84 |
+
cronhours.push($('select[name="weekly_cron_hours"]').val());
|
85 |
+
cronmday.push('*');
|
86 |
+
cronmon.push('*');
|
87 |
+
cronwday.push($('select[name="weekly_cron_days"]').val());
|
88 |
+
}
|
89 |
+
|
90 |
+
if ('mon' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
91 |
+
cronminutes.push($('select[name="monthly_cron_minutes"]').val());
|
92 |
+
cronhours.push($('select[name="monthly_cron_hours"]').val());
|
93 |
+
cronmday.push($('select[name="monthly_cron_days"]').val());
|
94 |
+
cronmon.push('*');
|
95 |
+
cronwday.push('*');
|
96 |
+
}
|
97 |
+
|
98 |
+
var data = {
|
99 |
+
action: 'notification_bar_cron_text',
|
100 |
+
cronminutes: cronminutes,
|
101 |
+
cronhours: cronhours,
|
102 |
+
cronmday: cronmday,
|
103 |
+
cronmon: cronmon,
|
104 |
+
cronwday: cronwday,
|
105 |
+
schedulestartdate: schedule_date,
|
106 |
+
schedulestarttime: schedule_time,
|
107 |
+
scheduleduration: schedule_duration
|
108 |
+
};
|
109 |
+
|
110 |
+
$.post(ajaxurl, data, function (response) {
|
111 |
+
$('#notification-bar-schedule').replaceWith(response);
|
112 |
+
});
|
113 |
+
|
114 |
}
|
115 |
|
116 |
+
$divOptions.on('change', '[name="wpfront-notification-bar-options[schedule]"], select[name="hour_cron_minutes"], select[name="day_cron_minutes"], select[name="day_cron_hours"], select[name="weekly_cron_days"], select[name="weekly_cron_minutes"], select[name="weekly_cron_hours"], select[name="monthly_cron_days"], select[name="monthly_cron_hours"], select[name="monthly_cron_minutes"], input[name="wpfront-notification-bar-options[schedule_start_date]"], input[name="wpfront-notification-bar-options[schedule_start_time]"], input[name="wpfront-notification-bar-options[schedule_duration]"] ', function () {
|
117 |
+
schedule();
|
118 |
+
});
|
119 |
|
120 |
+
$divOptions.on('focusout', '[name="wpfront-notification-bar-options[schedule_duration]"]', function () {
|
121 |
+
minutestohours();
|
|
|
|
|
|
|
122 |
});
|
123 |
+
|
124 |
+
function minutestohours() {
|
125 |
+
var duration = parseInt($('input[name="wpfront-notification-bar-options[schedule_duration]"]').val());
|
126 |
+
if (duration > 60) {
|
127 |
+
var hours = (duration / 60);
|
128 |
+
var comp_hours = Math.floor(hours);
|
129 |
+
var minutes = (hours - comp_hours) * 60;
|
130 |
+
var comp_minutes = Math.round(minutes);
|
131 |
+
var hours_minutes;
|
132 |
+
if (comp_minutes > 0) {
|
133 |
+
hours_minutes = settings.x_hours_minutes.replace("%1$d", comp_hours).replace("%2$d", comp_minutes);
|
134 |
+
} else {
|
135 |
+
hours_minutes = settings.x_hours.replace("%1$d", comp_hours);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
137 |
+
$('#schedule_duration').replaceWith('<span id="schedule_duration" class="description">= ' + hours_minutes + '</span>');
|
138 |
+
} else {
|
139 |
+
$('#schedule_duration').replaceWith('<span id="schedule_duration" class="description"></span>');
|
140 |
+
}
|
141 |
}
|
|
|
142 |
|
|
|
|
|
|
|
143 |
|
144 |
+
$divOptions.find('input.date').datepicker({
|
145 |
+
'dateFormat': 'yy-mm-dd'
|
146 |
+
});
|
147 |
+
|
148 |
+
$divOptions.find('input.time').timepicker({
|
149 |
+
'timeFormat': 'h:i a'
|
150 |
+
});
|
151 |
+
|
152 |
+
$divOptions.on('change', '#chk_button_action_url_noopener', function () {
|
153 |
+
$('#txt_button_action_url_noopener').val($(this).prop('checked') ? 1 : 0);
|
154 |
+
});
|
155 |
+
|
156 |
+
function setColorPicker(div) {
|
157 |
+
if (div.ColorPicker) {
|
158 |
+
div.ColorPicker({
|
159 |
+
color: div.attr('color'),
|
160 |
+
onShow: function (colpkr) {
|
161 |
+
$(colpkr).fadeIn(500);
|
162 |
+
return false;
|
163 |
+
}, onHide: function (colpkr) {
|
164 |
+
$(colpkr).fadeOut(500);
|
165 |
+
return false;
|
166 |
+
},
|
167 |
+
onChange: function (hsb, hex, rgb) {
|
168 |
+
div.css('backgroundColor', '#' + hex);
|
169 |
+
div.next().val('#' + hex);
|
170 |
+
}
|
171 |
+
}).css('backgroundColor', div.attr('color'));
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
$divOptions.find(".color-selector").each(function (i, e) {
|
176 |
+
setColorPicker($(e));
|
177 |
+
});
|
178 |
+
|
179 |
+
};
|
180 |
|
|
|
181 |
window.init_wpfront_notifiction_bar_options = function (settings) {
|
182 |
var $ = jQuery;
|
183 |
+
|
184 |
+
if(document.readyState === "complete") {
|
185 |
+
fn_init(settings);
|
186 |
+
} else {
|
187 |
+
$(function(){
|
188 |
+
fn_init(settings);
|
189 |
+
});
|
190 |
+
}
|
191 |
+
|
192 |
var mediaLibrary = null;
|
193 |
|
194 |
$('#wpfront-notification-bar-options').on('click', '#media-library-button', function () {
|
js/options.min.js
CHANGED
@@ -1,3 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(){var l=function(d){function g(){var b=[],e=[],h=[],c=[],d=[],f=a('input[name="wpfront-notification-bar-options[schedule_start_date]"]').val(),g=a('input[name="wpfront-notification-bar-options[schedule_start_time]"]').val(),k=a('input[name="wpfront-notification-bar-options[schedule_duration]"]').val();"hour"==a('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&(b.push(a('select[name="hour_cron_minutes"]').val()),e.push("*"),h.push("*"),c.push("*"),d.push("*"));"day"==
|
2 |
+
a('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&(b.push(a('select[name="day_cron_minutes"]').val()),e.push(a('select[name="day_cron_hours"]').val()),h.push("*"),c.push("*"),d.push("*"));"week"==a('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&(b.push(a('select[name="weekly_cron_minutes"]').val()),e.push(a('select[name="weekly_cron_hours"]').val()),h.push("*"),c.push("*"),d.push(a('select[name="weekly_cron_days"]').val()));"mon"==a('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&
|
3 |
+
(b.push(a('select[name="monthly_cron_minutes"]').val()),e.push(a('select[name="monthly_cron_hours"]').val()),h.push(a('select[name="monthly_cron_days"]').val()),c.push("*"),d.push("*"));a.post(ajaxurl,{action:"notification_bar_cron_text",cronminutes:b,cronhours:e,cronmday:h,cronmon:c,cronwday:d,schedulestartdate:f,schedulestarttime:g,scheduleduration:k},function(b){a("#notification-bar-schedule").replaceWith(b)})}function f(){var b=parseInt(a('input[name="wpfront-notification-bar-options[schedule_duration]"]').val());
|
4 |
+
if(60<b){var e=b/60;b=Math.floor(e);e=Math.round(60*(e-b));b=0<e?d.x_hours_minutes.replace("%1$d",b).replace("%2$d",e):d.x_hours.replace("%1$d",b);a("#schedule_duration").replaceWith('<span id="schedule_duration" class="description">= '+b+"</span>")}else a("#schedule_duration").replaceWith('<span id="schedule_duration" class="description"></span>')}function k(b){b.ColorPicker&&b.ColorPicker({color:b.attr("color"),onShow:function(b){a(b).fadeIn(500);return!1},onHide:function(b){a(b).fadeOut(500);return!1},
|
5 |
+
onChange:function(a,c,d){b.css("backgroundColor","#"+c);b.next().val("#"+c)}}).css("backgroundColor",b.attr("color"))}var a=jQuery,c=a("#wpfront-notification-bar-options");c.on("change",'.pages-selection input[type="checkbox"]',function(){var b=a(this),c=b.parent().parent().parent().prev(),d=c.val();d=b.prop("checked")?d+(","+b.val()):(","+d+",").replace(","+b.val()+",",",");d=d.replace(/(^[,\s]+)|([,\s]+$)/g,"");c.val(d)});c.on("change",'.roles-selection input[type="checkbox"]',function(){var b=
|
6 |
+
[],c=a(this).parent().parent().parent();c.find("input:checked").each(function(c,d){b.push(a(d).val())});c.children(":first").val(JSON.stringify(b))});f();!0===a("#date-none").is(":checked")?(a(".start-end-date").hide(),a(".schedule-date").hide()):!0===a("#start-end-date").is(":checked")?(a(".start-end-date").show(),a(".schedule-date").hide()):(a(".start-end-date").hide(),a(".schedule-date").show());c.on("click","#start-end-date",function(){a(".start-end-date").show();a(".schedule-date").hide()});
|
7 |
+
c.on("click","#schedule-date",function(){a(".start-end-date").hide();a(".schedule-date").show()});c.on("click","#date-none",function(){a(".start-end-date").hide();a(".schedule-date").hide()});c.on("change",'[name="wpfront-notification-bar-options[schedule]"], select[name="hour_cron_minutes"], select[name="day_cron_minutes"], select[name="day_cron_hours"], select[name="weekly_cron_days"], select[name="weekly_cron_minutes"], select[name="weekly_cron_hours"], select[name="monthly_cron_days"], select[name="monthly_cron_hours"], select[name="monthly_cron_minutes"], input[name="wpfront-notification-bar-options[schedule_start_date]"], input[name="wpfront-notification-bar-options[schedule_start_time]"], input[name="wpfront-notification-bar-options[schedule_duration]"] ',
|
8 |
+
function(){g()});c.on("focusout",'[name="wpfront-notification-bar-options[schedule_duration]"]',function(){f()});c.find("input.date").datepicker({dateFormat:"yy-mm-dd"});c.find("input.time").timepicker({timeFormat:"h:i a"});c.on("change","#chk_button_action_url_noopener",function(){a("#txt_button_action_url_noopener").val(a(this).prop("checked")?1:0)});c.find(".color-selector").each(function(b,c){k(a(c))})};window.init_wpfront_notifiction_bar_options=function(d){var g=jQuery;"complete"===document.readyState?
|
9 |
+
l(d):g(function(){l(d)});var f=null;g("#wpfront-notification-bar-options").on("click","#media-library-button",function(){null===f&&(f=wp.media.frames.file_frame=wp.media({title:d.choose_image,multiple:!1,button:{text:d.select_image}}).on("select",function(){var d=f.state().get("selection").first().toJSON();g("#reopen-button-image-url").val(d.url)}));f.open();return!1})}})();
|
js/wpfront-notification-bar.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
function(){
|
9 |
-
|
1 |
+
(function(){window.wpfront_notification_bar=function(a,w){function e(h,c,e){c=c||b.noop;e&&(x=!0);if(0==h){if(m)return;m=!0}else{if(!m)return;m=!1}0==h&&a.keep_closed&&e&&(0<a.keep_closed_for?Cookies.set(u,1,{path:"/",expires:a.keep_closed_for}):Cookies.set(u,1,{path:"/"}));0!==h&&a.set_max_views&&(l=Cookies.get(q),l="undefined"===typeof l?0:parseInt(l),0<a.max_views_for?Cookies.set(q,l+1,{path:"/",expires:a.max_views_for}):Cookies.set(q,l+1,{path:"/"}),f("Setting view count to "+(l+1)+"."));var k=
|
2 |
+
c;c=function(){k();0<h&&(0==a.height&&g.height("auto"),a.display_open_button&&(f("Setting reopen button state to hidden."),r.addClass("hidden")),m=!1);0==h&&a.display_open_button&&(f("Setting reopen button state to visible."),r.removeClass("hidden"))};0<h?f("Setting notification bar state to visible."):f("Setting notification bar state to hidden.");0<a.animate_delay?g.stop().animate({height:h+"px"},{duration:1E3*a.animate_delay,easing:"swing",complete:function(){a.fixed_position&&d.height(h);p(h);
|
3 |
+
c()},step:function(b){a.fixed_position&&d.height(b);p(b)}}):(g.height(h),a.fixed_position&&d.height(h),p(h),c())}function p(c){if(!y)return 0;if(!0!==c){clearInterval(v);var d=0;v=setInterval(function(){p(!0);d++;100<d&&clearInterval(v)},10)}if(0==b(a.theme_sticky_selector).length)return 0;1==a.position&&(null===n&&(n=b(a.theme_sticky_selector).position().top),g.is(":visible")?b(a.theme_sticky_selector).css("top",g.height()+g.position().top+"px"):b(a.theme_sticky_selector).css("top",n+"px"));2==a.position&&
|
4 |
+
(null===n&&(n=b(a.theme_sticky_selector).height()+parseFloat(b(a.theme_sticky_selector).css("bottom"))),g.is(":visible")?b(a.theme_sticky_selector).css("bottom",g.height()+parseFloat(g.css("bottom"))+"px"):b(a.theme_sticky_selector).css("bottom",n+"px"))}var f=function(b){a.log&&console.log(a.log_prefix+b)};if("function"!==typeof jQuery||a.keep_closed&&"function"!==typeof Cookies||a.set_max_views&&"function"!==typeof Cookies)f("Waiting for "+("function"!==typeof jQuery?"jQuery.":"Cookies.")),setTimeout(function(){wpfront_notification_bar(a,
|
5 |
+
w)},100);else if(2==a.position&&!0!==w)jQuery(function(){wpfront_notification_bar(a,!0)});else{var b=jQuery,u=a.keep_closed_cookie,l=0,q=a.max_views_cookie,d=b("#wpfront-notification-bar-spacer"+a.id_suffix).removeClass("hidden"),g=b("#wpfront-notification-bar"+a.id_suffix),r=b("#wpfront-notification-bar-open-button"+a.id_suffix);if(1==a.position){f("Setting notification bar at top.");var c=0;a.fixed_position&&a.is_admin_bar_showing&&(c=b("html").css("margin-top"),"0px"==c&&(c=b("html").css("padding-top")),
|
6 |
+
c=parseInt(c));a.fixed_position&&(c+=a.position_offset);g.css("top",c+"px");r.css("top",c+"px");d.css("top",a.position_offset+"px");var k=b("body");c=k.children().first();if(c.hasClass("wpfront-notification-bar-spacer"))for(;;){var z=c.next();if(z.hasClass("wpfront-notification-bar-spacer"))c=z;else{c.after(d);break}}else k.prepend(d);b(function(){k.children().first().hasClass("wpfront-notification-bar-spacer")||a.fixed_position&&!k.children().first().is(d)&&k.prepend(d)})}else f("Setting notification bar at bottom."),
|
7 |
+
k=b("body"),k.children().last().is(d)||k.append(d),b(function(){k.children().last().is(d)||k.append(d)});var t=g.height();0<a.height&&(t=a.height,g.find("table, tbody, tr").css("height","100%"));g.height(0).css({position:a.fixed_position?"fixed":"relative",visibility:"visible"});r.css({position:a.fixed_position?"fixed":"absolute"});var m=!1,x=!1,n=null,v=0,y=a.fixed_position&&""!=a.theme_sticky_selector;if(y)b(window).on("scroll resize",function(){p()});if(a.close_button)d.on("click",".wpfront-close",
|
8 |
+
function(){e(0,null,!0)});if(a.button_action_close_bar)d.on("click",".wpfront-button",function(){e(0,null,!0)});if(a.display_open_button)d.on("click","#wpfront-notification-bar-open-button"+a.id_suffix,function(){e(t)});if(a.keep_closed&&Cookies.get(u))f("Keep closed enabled and keep closed cookie exists. Hiding notification bar."),e(0);else{if(a.set_max_views&&(l=Cookies.get(q),"undefined"===typeof l&&(l=0),l>=a.max_views)){f("Reached max views, hiding notification bar.");e(0);return}m=!0;a.display_scroll?
|
9 |
+
(f("Display on scroll enabled. Hiding notification bar."),e(0),b(window).on("scroll",function(){x||(b(this).scrollTop()>a.display_scroll_offset?e(t):e(0))})):(f("Setting notification bar open event after "+a.display_after+" second(s)."),setTimeout(function(){e(t,function(){0<a.auto_close_after&&(f("Setting notification bar auto close event after "+a.auto_close_after+" second(s)."),setTimeout(function(){e(0,null,!0)},1E3*a.auto_close_after))})},1E3*a.display_after))}}}})();
|
languages/wpfront-notification-bar.mo
DELETED
Binary file
|
languages/wpfront-notification-bar.po
DELETED
@@ -1,503 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: WPFront Notification Bar\n"
|
4 |
-
"POT-Creation-Date: 2014-03-12 17:05-0700\n"
|
5 |
-
"PO-Revision-Date: 2014-03-12 17:05-0700\n"
|
6 |
-
"Last-Translator: \n"
|
7 |
-
"Language-Team: WPFront <contact@wpfront.com>\n"
|
8 |
-
"Language: en\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.6.4\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
-
|
19 |
-
#: ../classes/base/class-wpfront-base-menu.php:52
|
20 |
-
msgid "Name"
|
21 |
-
msgstr "Name"
|
22 |
-
|
23 |
-
#: ../classes/base/class-wpfront-base-menu.php:53
|
24 |
-
msgid "Version"
|
25 |
-
msgstr "Version"
|
26 |
-
|
27 |
-
#: ../classes/base/class-wpfront-base-menu.php:54
|
28 |
-
msgid "Rating"
|
29 |
-
msgstr "Rating"
|
30 |
-
|
31 |
-
#: ../classes/base/class-wpfront-base-menu.php:55
|
32 |
-
msgid "Description"
|
33 |
-
msgstr "Description"
|
34 |
-
|
35 |
-
#: ../classes/base/class-wpfront-base-menu.php:69
|
36 |
-
#, php-format
|
37 |
-
msgid "based on %s rating(s)"
|
38 |
-
msgstr "based on %s rating(s)"
|
39 |
-
|
40 |
-
#: ../classes/base/class-wpfront-base-menu.php:105
|
41 |
-
msgid "Unable to communicate with WordPress.org"
|
42 |
-
msgstr "Unable to communicate with WordPress.org"
|
43 |
-
|
44 |
-
#: ../classes/base/class-wpfront-base-menu.php:123
|
45 |
-
#: ../classes/base/class-wpfront-base-menu.php:217
|
46 |
-
msgid "WPFront Plugins"
|
47 |
-
msgstr "WPFront Plugins"
|
48 |
-
|
49 |
-
#: ../classes/base/class-wpfront-base-menu.php:147
|
50 |
-
#, php-format
|
51 |
-
msgid "By %s"
|
52 |
-
msgstr "By %s"
|
53 |
-
|
54 |
-
#: ../classes/base/class-wpfront-base-menu.php:154
|
55 |
-
#, php-format
|
56 |
-
msgid "More information about %s"
|
57 |
-
msgstr "More information about %s"
|
58 |
-
|
59 |
-
#: ../classes/base/class-wpfront-base-menu.php:154
|
60 |
-
msgid "Details"
|
61 |
-
msgstr "Details"
|
62 |
-
|
63 |
-
#: ../classes/base/class-wpfront-base-menu.php:163
|
64 |
-
#, php-format
|
65 |
-
msgid "Install %s"
|
66 |
-
msgstr "Install %s"
|
67 |
-
|
68 |
-
#: ../classes/base/class-wpfront-base-menu.php:163
|
69 |
-
msgid "Install Now"
|
70 |
-
msgstr "Install Now"
|
71 |
-
|
72 |
-
#: ../classes/base/class-wpfront-base-menu.php:168
|
73 |
-
#, php-format
|
74 |
-
msgid "Update to version %s"
|
75 |
-
msgstr "Update to version %s"
|
76 |
-
|
77 |
-
#: ../classes/base/class-wpfront-base-menu.php:168
|
78 |
-
msgid "Update Now"
|
79 |
-
msgstr "Update Now"
|
80 |
-
|
81 |
-
#: ../classes/base/class-wpfront-base-menu.php:173
|
82 |
-
msgid "This plugin is already installed and is up to date"
|
83 |
-
msgstr "This plugin is already installed and is up to date"
|
84 |
-
|
85 |
-
#: ../classes/base/class-wpfront-base-menu.php:173
|
86 |
-
msgid "Installed"
|
87 |
-
msgstr "Installed"
|
88 |
-
|
89 |
-
#: ../classes/base/class-wpfront-base-menu.php:175
|
90 |
-
#: ../classes/base/class-wpfront-base.php:105
|
91 |
-
msgid "Settings"
|
92 |
-
msgstr "Settings"
|
93 |
-
|
94 |
-
#: ../classes/base/class-wpfront-base-menu.php:177
|
95 |
-
msgid "Activate"
|
96 |
-
msgstr "Activate"
|
97 |
-
|
98 |
-
#: ../classes/base/class-wpfront-base-menu.php:199
|
99 |
-
msgid "Feedback"
|
100 |
-
msgstr "Feedback"
|
101 |
-
|
102 |
-
#: ../classes/base/class-wpfront-base-menu.php:216
|
103 |
-
msgid "WPFront"
|
104 |
-
msgstr "WPFront"
|
105 |
-
|
106 |
-
#: ../classes/base/class-wpfront-base-menu.php:217
|
107 |
-
msgid "All Plugins"
|
108 |
-
msgstr "All Plugins"
|
109 |
-
|
110 |
-
#: ../classes/base/class-wpfront-base.php:130
|
111 |
-
msgid "You do not have sufficient permissions to access this page."
|
112 |
-
msgstr "You do not have sufficient permissions to access this page."
|
113 |
-
|
114 |
-
#: ../classes/base/class-wpfront-base.php:150
|
115 |
-
msgid ""
|
116 |
-
"If you have a caching plugin, clear the cache for the new settings to take "
|
117 |
-
"effect."
|
118 |
-
msgstr ""
|
119 |
-
"If you have a caching plugin, clear the cache for the new settings to take "
|
120 |
-
"effect."
|
121 |
-
|
122 |
-
#: ../classes/base/class-wpfront-base.php:168
|
123 |
-
msgid "Settings Description"
|
124 |
-
msgstr "Settings Description"
|
125 |
-
|
126 |
-
#: ../classes/base/class-wpfront-base.php:170
|
127 |
-
msgid "Plugin FAQ"
|
128 |
-
msgstr "Plugin FAQ"
|
129 |
-
|
130 |
-
#: ../classes/base/class-wpfront-base.php:172
|
131 |
-
msgid "Feature Request"
|
132 |
-
msgstr "Feature Request"
|
133 |
-
|
134 |
-
#: ../classes/base/class-wpfront-base.php:174
|
135 |
-
msgid "Report Bug"
|
136 |
-
msgstr "Report Bug"
|
137 |
-
|
138 |
-
#: ../classes/base/class-wpfront-base.php:176
|
139 |
-
msgid "Write Review"
|
140 |
-
msgstr "Write Review"
|
141 |
-
|
142 |
-
#: ../classes/base/class-wpfront-base.php:178
|
143 |
-
msgid "Contact Me (syam@wpfront.com)"
|
144 |
-
msgstr "Contact Me (syam@wpfront.com)"
|
145 |
-
|
146 |
-
#: ../classes/base/class-wpfront-base.php:180
|
147 |
-
msgid "Buy me a Beer or Coffee"
|
148 |
-
msgstr "Buy me a Beer or Coffee"
|
149 |
-
|
150 |
-
#: ../classes/base/class-wpfront-base.php:197
|
151 |
-
msgid "Save Changes"
|
152 |
-
msgstr "Save Changes"
|
153 |
-
|
154 |
-
#: ../classes/class-wpfront-notification-bar-options.php:41
|
155 |
-
msgid "Enabled"
|
156 |
-
msgstr "Enabled"
|
157 |
-
|
158 |
-
#: ../classes/class-wpfront-notification-bar-options.php:42
|
159 |
-
msgid "Position"
|
160 |
-
msgstr "Position"
|
161 |
-
|
162 |
-
#: ../classes/class-wpfront-notification-bar-options.php:43
|
163 |
-
msgid "Bar Height"
|
164 |
-
msgstr "Bar Height"
|
165 |
-
|
166 |
-
#: ../classes/class-wpfront-notification-bar-options.php:44
|
167 |
-
msgid "Message Text"
|
168 |
-
msgstr "Message Text"
|
169 |
-
|
170 |
-
#: ../classes/class-wpfront-notification-bar-options.php:45
|
171 |
-
msgid "Display After"
|
172 |
-
msgstr "Display After"
|
173 |
-
|
174 |
-
#: ../classes/class-wpfront-notification-bar-options.php:46
|
175 |
-
msgid "Animation Duration"
|
176 |
-
msgstr "Animation Duration"
|
177 |
-
|
178 |
-
#: ../classes/class-wpfront-notification-bar-options.php:47
|
179 |
-
msgid "Display Close Button"
|
180 |
-
msgstr "Display Close Button"
|
181 |
-
|
182 |
-
#: ../classes/class-wpfront-notification-bar-options.php:48
|
183 |
-
msgid "Auto Close After"
|
184 |
-
msgstr "Auto Close After"
|
185 |
-
|
186 |
-
#: ../classes/class-wpfront-notification-bar-options.php:49
|
187 |
-
msgid "Display Button"
|
188 |
-
msgstr "Display Button"
|
189 |
-
|
190 |
-
#: ../classes/class-wpfront-notification-bar-options.php:50
|
191 |
-
msgid "Button Text"
|
192 |
-
msgstr "Button Text"
|
193 |
-
|
194 |
-
#: ../classes/class-wpfront-notification-bar-options.php:51
|
195 |
-
msgid "Button Action"
|
196 |
-
msgstr "Button Action"
|
197 |
-
|
198 |
-
#: ../classes/class-wpfront-notification-bar-options.php:52
|
199 |
-
msgid "Open URL:"
|
200 |
-
msgstr "Open URL:"
|
201 |
-
|
202 |
-
#: ../classes/class-wpfront-notification-bar-options.php:53
|
203 |
-
msgid "Open URL in new tab/window"
|
204 |
-
msgstr "Open URL in new tab/window"
|
205 |
-
|
206 |
-
#: ../classes/class-wpfront-notification-bar-options.php:54
|
207 |
-
msgid "Execute JavaScript"
|
208 |
-
msgstr "Execute JavaScript"
|
209 |
-
|
210 |
-
#: ../classes/class-wpfront-notification-bar-options.php:55
|
211 |
-
msgid "Close Bar on Button Click"
|
212 |
-
msgstr "Close Bar on Button Click"
|
213 |
-
|
214 |
-
#: ../classes/class-wpfront-notification-bar-options.php:56
|
215 |
-
msgid "Display Shadow"
|
216 |
-
msgstr "Display Shadow"
|
217 |
-
|
218 |
-
#: ../classes/class-wpfront-notification-bar-options.php:57
|
219 |
-
msgid "Fixed at Position"
|
220 |
-
msgstr "Fixed at Position"
|
221 |
-
|
222 |
-
#: ../classes/class-wpfront-notification-bar-options.php:58
|
223 |
-
msgid "Message Text Color"
|
224 |
-
msgstr "Message Text Color"
|
225 |
-
|
226 |
-
#: ../classes/class-wpfront-notification-bar-options.php:59
|
227 |
-
#: ../classes/class-wpfront-notification-bar-options.php:61
|
228 |
-
msgid "From Color"
|
229 |
-
msgstr "From Color"
|
230 |
-
|
231 |
-
#: ../classes/class-wpfront-notification-bar-options.php:60
|
232 |
-
#: ../classes/class-wpfront-notification-bar-options.php:62
|
233 |
-
msgid "To Color"
|
234 |
-
msgstr "To Color"
|
235 |
-
|
236 |
-
#: ../classes/class-wpfront-notification-bar-options.php:63
|
237 |
-
msgid "Button Text Color"
|
238 |
-
msgstr "Button Text Color"
|
239 |
-
|
240 |
-
#: ../classes/class-wpfront-notification-bar-options.php:64
|
241 |
-
msgid "Display on Pages"
|
242 |
-
msgstr "Display on Pages"
|
243 |
-
|
244 |
-
#: ../classes/class-wpfront-notification-bar-options.php:67
|
245 |
-
msgid "Display Reopen Button"
|
246 |
-
msgstr "Display Reopen Button"
|
247 |
-
|
248 |
-
#: ../classes/class-wpfront-notification-bar-options.php:68
|
249 |
-
msgid "Reopen Button Color"
|
250 |
-
msgstr "Reopen Button Color"
|
251 |
-
|
252 |
-
#: ../classes/class-wpfront-notification-bar-options.php:69
|
253 |
-
msgid "Keep Closed"
|
254 |
-
msgstr "Keep Closed"
|
255 |
-
|
256 |
-
#: ../classes/class-wpfront-notification-bar-options.php:70
|
257 |
-
msgid "Keep Closed For"
|
258 |
-
msgstr "Keep Closed For"
|
259 |
-
|
260 |
-
#: ../classes/class-wpfront-notification-bar-options.php:71
|
261 |
-
msgid "Position Offset"
|
262 |
-
msgstr "Position Offset"
|
263 |
-
|
264 |
-
#: ../classes/class-wpfront-notification-bar-options.php:72
|
265 |
-
msgid "Custom CSS"
|
266 |
-
msgstr "Custom CSS"
|
267 |
-
|
268 |
-
#: ../classes/class-wpfront-notification-bar-options.php:73
|
269 |
-
msgid "Close Button Color"
|
270 |
-
msgstr "Close Button Color"
|
271 |
-
|
272 |
-
#: ../classes/class-wpfront-notification-bar-options.php:76
|
273 |
-
msgid "Display for User Roles"
|
274 |
-
msgstr "Display for User Roles"
|
275 |
-
|
276 |
-
#: ../classes/class-wpfront-notification-bar-options.php:78
|
277 |
-
msgid "Display on Scroll"
|
278 |
-
msgstr "Display on Scroll"
|
279 |
-
|
280 |
-
#: ../classes/class-wpfront-notification-bar-options.php:79
|
281 |
-
msgid "Scroll Offset"
|
282 |
-
msgstr "Scroll Offset"
|
283 |
-
|
284 |
-
#: ../classes/class-wpfront-notification-bar-options.php:80
|
285 |
-
msgid "Start Date"
|
286 |
-
msgstr "Start Date"
|
287 |
-
|
288 |
-
#: ../classes/class-wpfront-notification-bar-options.php:81
|
289 |
-
msgid "End Date"
|
290 |
-
msgstr "End Date"
|
291 |
-
|
292 |
-
#: ../classes/class-wpfront-notification-bar.php:62
|
293 |
-
msgid "WPFront Notification Bar"
|
294 |
-
msgstr "WPFront Notification Bar"
|
295 |
-
|
296 |
-
#: ../classes/class-wpfront-notification-bar.php:62
|
297 |
-
msgid "Notification Bar"
|
298 |
-
msgstr "Notification Bar"
|
299 |
-
|
300 |
-
#: ../classes/class-wpfront-notification-bar.php:176
|
301 |
-
#: ../classes/class-wpfront-notification-bar.php:180
|
302 |
-
msgid "[Page]"
|
303 |
-
msgstr "[Page]"
|
304 |
-
|
305 |
-
#: ../classes/class-wpfront-notification-bar.php:176
|
306 |
-
msgid "Home"
|
307 |
-
msgstr "Home"
|
308 |
-
|
309 |
-
#: ../classes/class-wpfront-notification-bar.php:185
|
310 |
-
msgid "[Post]"
|
311 |
-
msgstr "[Post]"
|
312 |
-
|
313 |
-
#: ../templates/options-template.php:32
|
314 |
-
msgid "WPFront Notification Bar Settings"
|
315 |
-
msgstr "WPFront Notification Bar Settings"
|
316 |
-
|
317 |
-
#: ../templates/options-template.php:34
|
318 |
-
msgid "Display"
|
319 |
-
msgstr "Display"
|
320 |
-
|
321 |
-
#: ../templates/options-template.php:50
|
322 |
-
msgid "Top"
|
323 |
-
msgstr "Top"
|
324 |
-
|
325 |
-
#: ../templates/options-template.php:51
|
326 |
-
msgid "Bottom"
|
327 |
-
msgstr "Bottom"
|
328 |
-
|
329 |
-
#: ../templates/options-template.php:60
|
330 |
-
msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
|
331 |
-
msgstr "[Sticky Bar, bar will stay at position regardless of scrolling.]"
|
332 |
-
|
333 |
-
#: ../templates/options-template.php:68
|
334 |
-
msgid "[Displays the bar on window scroll.]"
|
335 |
-
msgstr "[Displays the bar on window scroll.]"
|
336 |
-
|
337 |
-
#: ../templates/options-template.php:76 ../templates/options-template.php:84
|
338 |
-
#: ../templates/options-template.php:92
|
339 |
-
msgid "px"
|
340 |
-
msgstr "px"
|
341 |
-
|
342 |
-
#: ../templates/options-template.php:76
|
343 |
-
msgid "Number of pixels to be scrolled before the bar appears."
|
344 |
-
msgstr "Number of pixels to be scrolled before the bar appears."
|
345 |
-
|
346 |
-
#: ../templates/options-template.php:84
|
347 |
-
msgid "Set 0px to auto fit contents."
|
348 |
-
msgstr "Set 0px to auto fit contents."
|
349 |
-
|
350 |
-
#: ../templates/options-template.php:92
|
351 |
-
msgid ""
|
352 |
-
"(Top bar only) If you find the bar overlapping, try increasing this value. "
|
353 |
-
"(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
|
354 |
-
msgstr ""
|
355 |
-
"(Top bar only) If you find the bar overlapping, try increasing this value. "
|
356 |
-
"(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
|
357 |
-
|
358 |
-
#: ../templates/options-template.php:100 ../templates/options-template.php:108
|
359 |
-
#: ../templates/options-template.php:124
|
360 |
-
msgid "second(s)"
|
361 |
-
msgstr "second(s)"
|
362 |
-
|
363 |
-
#: ../templates/options-template.php:100
|
364 |
-
msgid ""
|
365 |
-
"Set 0 second(s) to display immediately. Do not work in \"Display on Scroll\" "
|
366 |
-
"mode."
|
367 |
-
msgstr ""
|
368 |
-
"Set 0 second(s) to display immediately. Do not work in \"Display on Scroll\" "
|
369 |
-
"mode."
|
370 |
-
|
371 |
-
#: ../templates/options-template.php:108
|
372 |
-
msgid "Set 0 second(s) for no animation."
|
373 |
-
msgstr "Set 0 second(s) for no animation."
|
374 |
-
|
375 |
-
#: ../templates/options-template.php:116
|
376 |
-
msgid "[Displays a close button at the top right corner of the bar.]"
|
377 |
-
msgstr "[Displays a close button at the top right corner of the bar.]"
|
378 |
-
|
379 |
-
#: ../templates/options-template.php:124
|
380 |
-
msgid ""
|
381 |
-
"Set 0 second(s) to disable auto close. Do not work in \"Display on Scroll\" "
|
382 |
-
"mode."
|
383 |
-
msgstr ""
|
384 |
-
"Set 0 second(s) to disable auto close. Do not work in \"Display on Scroll\" "
|
385 |
-
"mode."
|
386 |
-
|
387 |
-
#: ../templates/options-template.php:140
|
388 |
-
msgid "A reopen button will be displayed after the bar is closed."
|
389 |
-
msgstr "A reopen button will be displayed after the bar is closed."
|
390 |
-
|
391 |
-
#: ../templates/options-template.php:148
|
392 |
-
msgid "Once closed, bar will display closed on other pages."
|
393 |
-
msgstr "Once closed, bar will display closed on other pages."
|
394 |
-
|
395 |
-
#: ../templates/options-template.php:156
|
396 |
-
msgid "day(s)"
|
397 |
-
msgstr "day(s)"
|
398 |
-
|
399 |
-
#: ../templates/options-template.php:156
|
400 |
-
msgid ""
|
401 |
-
"Bar will be kept closed for the number of days specified from last closed "
|
402 |
-
"date."
|
403 |
-
msgstr ""
|
404 |
-
"Bar will be kept closed for the number of days specified from last closed "
|
405 |
-
"date."
|
406 |
-
|
407 |
-
#: ../templates/options-template.php:161
|
408 |
-
msgid "Content"
|
409 |
-
msgstr "Content"
|
410 |
-
|
411 |
-
#: ../templates/options-template.php:170
|
412 |
-
msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
|
413 |
-
msgstr "[HTML tags are allowed. e.g. Add <br /> for break.]"
|
414 |
-
|
415 |
-
#: ../templates/options-template.php:178
|
416 |
-
msgid "[Displays a button next to the message.]"
|
417 |
-
msgstr "[Displays a button next to the message.]"
|
418 |
-
|
419 |
-
#: ../templates/options-template.php:223
|
420 |
-
msgid "Filter"
|
421 |
-
msgstr "Filter"
|
422 |
-
|
423 |
-
#: ../templates/options-template.php:230 ../templates/options-template.php:238
|
424 |
-
msgid "[YYYY-MM-DD]"
|
425 |
-
msgstr "[YYYY-MM-DD]"
|
426 |
-
|
427 |
-
#: ../templates/options-template.php:248
|
428 |
-
msgid "All pages."
|
429 |
-
msgstr "All pages."
|
430 |
-
|
431 |
-
#: ../templates/options-template.php:253
|
432 |
-
msgid "Only in landing page."
|
433 |
-
msgstr "Only in landing page."
|
434 |
-
|
435 |
-
#: ../templates/options-template.php:253
|
436 |
-
msgid "[The first page they visit on your website.]"
|
437 |
-
msgstr "[The first page they visit on your website.]"
|
438 |
-
|
439 |
-
#: ../templates/options-template.php:258
|
440 |
-
msgid "Include in following pages"
|
441 |
-
msgstr "Include in following pages"
|
442 |
-
|
443 |
-
#: ../templates/options-template.php:278
|
444 |
-
msgid "Exclude in following pages"
|
445 |
-
msgstr "Exclude in following pages"
|
446 |
-
|
447 |
-
#: ../templates/options-template.php:305
|
448 |
-
msgid "All users."
|
449 |
-
msgstr "All users."
|
450 |
-
|
451 |
-
#: ../templates/options-template.php:310
|
452 |
-
msgid "All logged in users."
|
453 |
-
msgstr "All logged in users."
|
454 |
-
|
455 |
-
#: ../templates/options-template.php:315
|
456 |
-
msgid "Guest users. [Non-logged in users]"
|
457 |
-
msgstr "Guest users. [Non-logged in users]"
|
458 |
-
|
459 |
-
#: ../templates/options-template.php:320
|
460 |
-
msgid "For following user roles"
|
461 |
-
msgstr "For following user roles"
|
462 |
-
|
463 |
-
#: ../templates/options-template.php:340
|
464 |
-
msgid "[No Role]"
|
465 |
-
msgstr "[No Role]"
|
466 |
-
|
467 |
-
#: ../templates/options-template.php:346
|
468 |
-
msgid "[Guest]"
|
469 |
-
msgstr "[Guest]"
|
470 |
-
|
471 |
-
#: ../templates/options-template.php:354
|
472 |
-
msgid "Color"
|
473 |
-
msgstr "Color"
|
474 |
-
|
475 |
-
#: ../templates/options-template.php:358
|
476 |
-
msgid "Bar Color"
|
477 |
-
msgstr "Bar Color"
|
478 |
-
|
479 |
-
#: ../templates/options-template.php:369 ../templates/options-template.php:394
|
480 |
-
msgid "[Select two different colors to create a gradient.]"
|
481 |
-
msgstr "[Select two different colors to create a gradient.]"
|
482 |
-
|
483 |
-
#: ../templates/options-template.php:383
|
484 |
-
msgid "Button Color"
|
485 |
-
msgstr "Button Color"
|
486 |
-
|
487 |
-
#: ../templates/options-template.php:432
|
488 |
-
msgid "[Normal, Hover, X]"
|
489 |
-
msgstr "[Normal, Hover, X]"
|
490 |
-
|
491 |
-
#: ../templates/options-template.php:437
|
492 |
-
msgid "CSS"
|
493 |
-
msgstr "CSS"
|
494 |
-
|
495 |
-
#: ../templates/options-template.php:453
|
496 |
-
msgid "Plugin Ideas"
|
497 |
-
msgstr "Plugin Ideas"
|
498 |
-
|
499 |
-
#~ msgid "Animate Display"
|
500 |
-
#~ msgstr "Animate Display"
|
501 |
-
|
502 |
-
#~ msgid "Animate Display Delay"
|
503 |
-
#~ msgstr "Animate Display Delay"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ 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: 5.0
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 3.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -70,6 +70,11 @@ The new version(1.3) allows you to filter the bar based on user roles. In this c
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
|
|
73 |
= 3.1.0 =
|
74 |
* Max views configuration.
|
75 |
* Enqueue CSS in footer.
|
@@ -189,6 +194,9 @@ The new version(1.3) allows you to filter the bar based on user roles. In this c
|
|
189 |
|
190 |
== Upgrade Notice ==
|
191 |
|
|
|
|
|
|
|
192 |
= 3.1.0 =
|
193 |
* Bug fixes.
|
194 |
|
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: 5.0
|
6 |
+
Tested up to: 6.1
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 3.2.0
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 3.2.0 =
|
74 |
+
* Recurring schedule(PRO).
|
75 |
+
* New UI.
|
76 |
+
* Bug fixes.
|
77 |
+
|
78 |
= 3.1.0 =
|
79 |
* Max views configuration.
|
80 |
* Enqueue CSS in footer.
|
194 |
|
195 |
== Upgrade Notice ==
|
196 |
|
197 |
+
= 3.2.0 =
|
198 |
+
* Bug fixes.
|
199 |
+
|
200 |
= 3.1.0 =
|
201 |
* Bug fixes.
|
202 |
|
templates/template-wpfront-notification-bar-add-edit.php
CHANGED
@@ -47,14 +47,14 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
47 |
public function __construct($controller) {
|
48 |
$this->controller = $controller;
|
49 |
$this->options = $this->controller->get_options();
|
50 |
-
if (!empty($_POST['submit'])) {
|
51 |
$this->options->read_from_post();
|
52 |
}
|
53 |
}
|
54 |
|
55 |
public function view() {
|
56 |
?>
|
57 |
-
<div class="wrap">
|
58 |
<?php $this->title(); ?>
|
59 |
<div id="wpfront-notification-bar-options" class="inside">
|
60 |
<?php
|
@@ -75,16 +75,21 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
75 |
<?php
|
76 |
}
|
77 |
?>
|
78 |
-
<?php $this->
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
84 |
<?php $this->script(); ?>
|
85 |
<input type="hidden" name="<?php echo $this->options->last_saved_name(); ?>" value="<?php echo time(); ?>" />
|
86 |
<?php $this->nonce_field(); ?>
|
87 |
-
<?php submit_button(); ?>
|
88 |
</form>
|
89 |
</div>
|
90 |
</div>
|
@@ -107,11 +112,97 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
107 |
|
108 |
}
|
109 |
|
110 |
-
protected function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
?>
|
112 |
-
<h3><?php echo __('Display', 'wpfront-notification-bar');
|
113 |
-
?></h3>
|
114 |
<table class="form-table">
|
|
|
115 |
<tr>
|
116 |
<th scope="row">
|
117 |
<?php echo $this->options->enabled_label(); ?>
|
@@ -133,9 +224,8 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
133 |
<span class="description"><a target="_blank" rel="noopener" href="<?php echo $url; ?>"><?php echo $url; ?></a></span>
|
134 |
<?php
|
135 |
} else {
|
136 |
-
|
137 |
-
|
138 |
-
<?php
|
139 |
}
|
140 |
?>
|
141 |
</td>
|
@@ -146,9 +236,12 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
146 |
</th>
|
147 |
<td>
|
148 |
<input type="checkbox" name="<?php echo $this->options->debug_mode_name(); ?>" <?php echo $this->options->debug_mode() ? 'checked' : ''; ?> />
|
|
|
|
|
|
|
|
|
149 |
<span class="description">
|
150 |
-
|
151 |
-
<a target="_blank" rel="noopener" href="https://wpfront.com/wordpress-plugins/notification-bar-plugin/wpfront-notification-bar-troubleshooting/"><?php echo __('[How to?]', 'wpfront-notification-bar'); ?></a>
|
152 |
</span>
|
153 |
</td>
|
154 |
</tr>
|
@@ -168,7 +261,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
168 |
<?php echo $this->options->fixed_position_label(); ?>
|
169 |
</th>
|
170 |
<td>
|
171 |
-
<input type="checkbox" name="<?php echo $this->options->fixed_position_name(); ?>" <?php echo $this->options->fixed_position() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
172 |
</td>
|
173 |
</tr>
|
174 |
<tr>
|
@@ -177,7 +274,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
177 |
</th>
|
178 |
<td>
|
179 |
<input class="regular-text" type="text" name="<?php echo $this->options->theme_sticky_selector_name(); ?>" value="<?php echo esc_attr($this->options->theme_sticky_selector()); ?>" />
|
180 |
-
|
|
|
|
|
|
|
181 |
</td>
|
182 |
</tr>
|
183 |
<tr>
|
@@ -185,7 +285,12 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
185 |
<?php echo $this->options->display_scroll_label(); ?>
|
186 |
</th>
|
187 |
<td>
|
188 |
-
<input type="checkbox" name="<?php echo $this->options->display_scroll_name(); ?>" <?php echo $this->options->display_scroll() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
|
|
189 |
</td>
|
190 |
</tr>
|
191 |
<tr>
|
@@ -193,7 +298,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
193 |
<?php echo $this->options->display_scroll_offset_label(); ?>
|
194 |
</th>
|
195 |
<td>
|
196 |
-
<input class="seconds" name="<?php echo $this->options->display_scroll_offset_name(); ?>" value="<?php echo esc_attr($this->options->display_scroll_offset()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
197 |
</td>
|
198 |
</tr>
|
199 |
<tr>
|
@@ -201,7 +310,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
201 |
<?php echo $this->options->height_label(); ?>
|
202 |
</th>
|
203 |
<td>
|
204 |
-
<input class="seconds" name="<?php echo $this->options->height_name(); ?>" value="<?php echo esc_attr($this->options->height()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
205 |
</td>
|
206 |
</tr>
|
207 |
<tr>
|
@@ -209,7 +322,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
209 |
<?php echo $this->options->position_offset_label(); ?>
|
210 |
</th>
|
211 |
<td>
|
212 |
-
<input class="seconds" name="<?php echo $this->options->position_offset_name(); ?>" value="<?php echo esc_attr($this->options->position_offset()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
213 |
</td>
|
214 |
</tr>
|
215 |
<tr>
|
@@ -217,7 +334,12 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
217 |
<?php echo $this->options->display_after_label(); ?>
|
218 |
</th>
|
219 |
<td>
|
220 |
-
<input class="seconds" name="<?php echo $this->options->display_after_name(); ?>" value="<?php echo esc_attr($this->options->display_after()); ?>" /> 
|
|
|
|
|
|
|
|
|
|
|
221 |
</td>
|
222 |
</tr>
|
223 |
<tr>
|
@@ -225,7 +347,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
225 |
<?php echo $this->options->animate_delay_label(); ?>
|
226 |
</th>
|
227 |
<td>
|
228 |
-
<input class="seconds" name="<?php echo $this->options->animate_delay_name(); ?>" value="<?php echo esc_attr($this->options->animate_delay()); ?>" /> <?php echo __('second(s)', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
229 |
</td>
|
230 |
</tr>
|
231 |
<tr>
|
@@ -233,7 +359,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
233 |
<?php echo $this->options->close_button_label(); ?>
|
234 |
</th>
|
235 |
<td>
|
236 |
-
<input type="checkbox" name="<?php echo $this->options->close_button_name(); ?>" <?php echo $this->options->close_button() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
237 |
</td>
|
238 |
</tr>
|
239 |
<tr>
|
@@ -241,7 +371,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
241 |
<?php echo $this->options->auto_close_after_label(); ?>
|
242 |
</th>
|
243 |
<td>
|
244 |
-
<input class="seconds" name="<?php echo $this->options->auto_close_after_name(); ?>" value="<?php echo esc_attr($this->options->auto_close_after()); ?>" /> <?php echo __('second(s)', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
245 |
</td>
|
246 |
</tr>
|
247 |
<tr>
|
@@ -257,7 +391,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
257 |
<?php echo $this->options->display_open_button_label(); ?>
|
258 |
</th>
|
259 |
<td>
|
260 |
-
<input type="checkbox" name="<?php echo $this->options->display_open_button_name(); ?>" <?php echo $this->options->display_open_button() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
261 |
</td>
|
262 |
</tr>
|
263 |
<tr>
|
@@ -265,10 +403,12 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
265 |
<?php echo $this->options->reopen_button_image_url_label(); ?>
|
266 |
</th>
|
267 |
<td>
|
268 |
-
<input id="reopen-button-image-url" class="
|
269 |
<input type="button" id="media-library-button" class="button" value="<?php echo __('Media Library', 'wpfront-notification-bar'); ?>" />
|
270 |
-
|
271 |
-
|
|
|
|
|
272 |
</td>
|
273 |
</tr>
|
274 |
<tr>
|
@@ -276,7 +416,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
276 |
<?php echo $this->options->reopen_button_offset_label(); ?>
|
277 |
</th>
|
278 |
<td>
|
279 |
-
<input class="seconds" name="<?php echo $this->options->reopen_button_offset_name(); ?>" value="<?php echo esc_attr($this->options->reopen_button_offset()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
280 |
</td>
|
281 |
</tr>
|
282 |
<tr>
|
@@ -284,7 +428,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
284 |
<?php echo $this->options->keep_closed_label(); ?>
|
285 |
</th>
|
286 |
<td>
|
287 |
-
<input type="checkbox" name="<?php echo $this->options->keep_closed_name(); ?>" <?php echo $this->options->keep_closed() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
288 |
</td>
|
289 |
</tr>
|
290 |
<tr>
|
@@ -292,7 +440,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
292 |
<?php echo $this->options->keep_closed_for_label(); ?>
|
293 |
</th>
|
294 |
<td>
|
295 |
-
<input class="seconds" name="<?php echo $this->options->keep_closed_for_name(); ?>" value="<?php echo esc_attr($this->options->keep_closed_for()); ?>" /> <?php echo __('day(s)', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
296 |
</td>
|
297 |
</tr>
|
298 |
<tr>
|
@@ -300,8 +452,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
300 |
<?php echo $this->options->keep_closed_cookie_name_label(); ?>
|
301 |
</th>
|
302 |
<td>
|
303 |
-
<input class="
|
304 |
-
|
|
|
|
|
|
|
305 |
</td>
|
306 |
</tr>
|
307 |
<tr>
|
@@ -309,7 +464,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
309 |
<?php echo $this->options->set_max_views_label(); ?>
|
310 |
</th>
|
311 |
<td>
|
312 |
-
<input type="checkbox" name="<?php echo $this->options->set_max_views_name(); ?>" <?php echo $this->options->set_max_views() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
313 |
</td>
|
314 |
</tr>
|
315 |
<tr>
|
@@ -317,7 +476,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
317 |
<?php echo $this->options->max_views_label(); ?>
|
318 |
</th>
|
319 |
<td>
|
320 |
-
<input class="seconds" name="<?php echo $this->options->max_views_name(); ?>" value="<?php echo esc_attr($this->options->max_views()); ?>" /> <?php echo __('
|
|
|
|
|
|
|
|
|
321 |
</td>
|
322 |
</tr>
|
323 |
<tr>
|
@@ -325,16 +488,23 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
325 |
<?php echo $this->options->max_views_for_label(); ?>
|
326 |
</th>
|
327 |
<td>
|
328 |
-
<input class="seconds" name="<?php echo $this->options->max_views_for_name(); ?>" value="<?php echo esc_attr($this->options->max_views_for()); ?>" /> <?php echo __('day(s)', 'wpfront-notification-bar'); ?> 
|
|
|
|
|
|
|
|
|
329 |
</td>
|
330 |
</tr>
|
331 |
-
|
332 |
<th scope="row">
|
333 |
<?php echo $this->options->max_views_cookie_name_label(); ?>
|
334 |
</th>
|
335 |
<td>
|
336 |
-
<input class="
|
337 |
-
|
|
|
|
|
|
|
338 |
</td>
|
339 |
</tr>
|
340 |
<tr>
|
@@ -359,7 +529,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
359 |
</th>
|
360 |
<td>
|
361 |
<input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo esc_attr($this->options->small_device_width()); ?>" />px
|
362 |
-
|
|
|
|
|
|
|
363 |
</td>
|
364 |
</tr>
|
365 |
<tr>
|
@@ -368,7 +541,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
368 |
</th>
|
369 |
<td>
|
370 |
<input type="checkbox" name="<?php echo $this->options->hide_small_window_name(); ?>" <?php echo $this->options->hide_small_window() ? "checked" : ""; ?> />
|
371 |
-
|
|
|
|
|
|
|
372 |
</td>
|
373 |
</tr>
|
374 |
<tr>
|
@@ -377,7 +553,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
377 |
</th>
|
378 |
<td>
|
379 |
<input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo esc_attr($this->options->small_window_width()); ?>" />px
|
380 |
-
|
|
|
|
|
|
|
381 |
</td>
|
382 |
</tr>
|
383 |
<tr>
|
@@ -386,16 +565,18 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
386 |
</th>
|
387 |
<td>
|
388 |
<input type="checkbox" name="<?php echo $this->options->attach_on_shutdown_name(); ?>" <?php echo $this->options->attach_on_shutdown() ? 'checked' : ''; ?> />
|
389 |
-
|
|
|
|
|
|
|
390 |
</td>
|
391 |
</tr>
|
392 |
</table>
|
393 |
<?php
|
394 |
}
|
395 |
|
396 |
-
|
397 |
?>
|
398 |
-
<h3><?php echo __('Content', 'wpfront-notification-bar'); ?></h3>
|
399 |
<table class="form-table">
|
400 |
<tr>
|
401 |
<th scope="row">
|
@@ -419,7 +600,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
419 |
<?php echo $this->options->message_process_shortcode_label(); ?>
|
420 |
</th>
|
421 |
<td>
|
422 |
-
<input type="checkbox" name="<?php echo $this->options->message_process_shortcode_name(); ?>" <?php echo $this->options->message_process_shortcode() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
423 |
</td>
|
424 |
</tr>
|
425 |
<tr>
|
@@ -427,7 +612,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
427 |
<?php echo $this->options->display_button_label(); ?>
|
428 |
</th>
|
429 |
<td>
|
430 |
-
<input type="checkbox" name="<?php echo $this->options->display_button_name(); ?>" <?php echo $this->options->display_button() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
431 |
</td>
|
432 |
</tr>
|
433 |
<tr>
|
@@ -466,20 +655,29 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
466 |
<input type="checkbox" name="<?php echo $this->options->button_action_url_nofollow_name(); ?>" <?php echo $this->options->button_action_url_nofollow() ? 'checked' : ''; ?> />
|
467 |
<span><?php echo $this->options->button_action_url_nofollow_label() . '.'; ?></span>
|
468 |
</label>
|
469 |
-
|
|
|
|
|
|
|
470 |
<br />
|
471 |
<label>
|
472 |
<input type="checkbox" name="<?php echo $this->options->button_action_url_noreferrer_name(); ?>" <?php echo $this->options->button_action_url_noreferrer() ? 'checked' : ''; ?> />
|
473 |
<span><?php echo $this->options->button_action_url_noreferrer_label() . '.'; ?></span>
|
474 |
</label>
|
475 |
-
|
|
|
|
|
|
|
476 |
<br />
|
477 |
<label>
|
478 |
<input id="chk_button_action_url_noopener" type="checkbox" <?php echo $this->options->button_action_url_noopener() ? 'checked' : ''; ?> />
|
479 |
<input type="hidden" id="txt_button_action_url_noopener" name="<?php echo $this->options->button_action_url_noopener_name(); ?>" value="<?php echo $this->options->button_action_url_noopener() ? '1' : '0'; ?>" />
|
480 |
<span><?php echo $this->options->button_action_url_noopener_label() . '.'; ?></span>
|
481 |
</label>
|
482 |
-
|
|
|
|
|
|
|
483 |
<br />
|
484 |
<label>
|
485 |
<input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="2" <?php echo $this->options->button_action() == 2 ? 'checked' : ''; ?> />
|
@@ -501,11 +699,24 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
501 |
<?php
|
502 |
}
|
503 |
|
504 |
-
|
505 |
?>
|
506 |
-
<h3><?php echo __('Filter', 'wpfront-notification-bar'); ?></h3>
|
507 |
<table class="form-table">
|
508 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
<th scope="row">
|
510 |
<?php echo $this->options->start_date_label(); ?>
|
511 |
</th>
|
@@ -513,10 +724,13 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
513 |
<input class="date" name="<?php echo $this->options->start_date_name(); ?>" value="<?php echo esc_attr($this->options->start_date() == NULL ? '' : date('Y-m-d', $this->options->start_date())); ?>" />
|
514 |
<input class="time" name="<?php echo $this->options->start_time_name(); ?>" value="<?php echo esc_attr($this->options->start_time() == NULL ? '' : date('h:i a', $this->options->start_time())); ?>" />
|
515 |
 
|
516 |
-
|
|
|
|
|
|
|
517 |
</td>
|
518 |
</tr>
|
519 |
-
<tr>
|
520 |
<th scope="row">
|
521 |
<?php echo $this->options->end_date_label(); ?>
|
522 |
</th>
|
@@ -524,9 +738,15 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
524 |
<input class="date" name="<?php echo $this->options->end_date_name(); ?>" value="<?php echo esc_attr($this->options->end_date() == NULL ? '' : date('Y-m-d', $this->options->end_date())); ?>" />
|
525 |
<input class="time" name="<?php echo $this->options->end_time_name(); ?>" value="<?php echo esc_attr($this->options->end_time() == NULL ? '' : date('h:i a', $this->options->end_time())); ?>" />
|
526 |
 
|
527 |
-
|
|
|
|
|
|
|
528 |
</td>
|
529 |
</tr>
|
|
|
|
|
|
|
530 |
<tr>
|
531 |
<th scope="row">
|
532 |
<?php echo $this->options->display_pages_label(); ?>
|
@@ -539,13 +759,22 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
539 |
<br />
|
540 |
<label>
|
541 |
<input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
|
542 |
-
<span><?php echo __('Only in landing page.', 'wpfront-notification-bar'); ?></span> 
|
|
|
|
|
|
|
|
|
543 |
</label>
|
544 |
<br />
|
545 |
<label>
|
546 |
<input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
|
547 |
-
<span><?php echo __('Include in following pages
|
|
|
|
|
|
|
|
|
548 |
</label>
|
|
|
549 |
<input class="post-id-list" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo esc_attr($this->options->include_pages()); ?>" />
|
550 |
<div class="pages-selection">
|
551 |
<?php
|
@@ -564,8 +793,13 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
564 |
</div>
|
565 |
<label>
|
566 |
<input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="4" <?php echo $this->options->display_pages() == 4 ? 'checked' : ''; ?> />
|
567 |
-
<span><?php echo __('Exclude in following pages
|
|
|
|
|
|
|
|
|
568 |
</label>
|
|
|
569 |
<input class="post-id-list" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo esc_attr($this->options->exclude_pages()); ?>" />
|
570 |
<div class="pages-selection">
|
571 |
<?php
|
@@ -582,7 +816,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
582 |
}
|
583 |
?>
|
584 |
</div>
|
585 |
-
|
|
|
|
|
|
|
586 |
</td>
|
587 |
</tr>
|
588 |
<tr>
|
@@ -590,8 +827,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
590 |
<?php echo $this->options->landingpage_cookie_name_label(); ?>
|
591 |
</th>
|
592 |
<td>
|
593 |
-
<input class="
|
594 |
-
|
|
|
|
|
|
|
595 |
</td>
|
596 |
</tr>
|
597 |
<tr>
|
@@ -611,7 +851,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
611 |
<br />
|
612 |
<label>
|
613 |
<input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="3" <?php echo $this->options->display_roles() == 3 ? 'checked' : ''; ?> />
|
614 |
-
<span><?php echo __('Guest users.
|
|
|
|
|
|
|
|
|
615 |
</label>
|
616 |
<br />
|
617 |
<label>
|
@@ -656,9 +900,8 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
656 |
<?php
|
657 |
}
|
658 |
|
659 |
-
|
660 |
?>
|
661 |
-
<h3><?php echo __('Color', 'wpfront-notification-bar'); ?></h3>
|
662 |
<table class="form-table">
|
663 |
<tr>
|
664 |
<th scope="row">
|
@@ -673,7 +916,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
673 |
<div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div>
|
674 |
<input type="text" class="color-value" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo esc_attr($this->options->bar_to_color()); ?>" />
|
675 |
</div>
|
676 |
-
|
|
|
|
|
|
|
677 |
</td>
|
678 |
</tr>
|
679 |
<tr>
|
@@ -698,7 +944,10 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
698 |
<div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div>
|
699 |
<input type="text" class="color-value" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo esc_attr($this->options->button_to_color()); ?>" />
|
700 |
</div>
|
701 |
-
|
|
|
|
|
|
|
702 |
</td>
|
703 |
</tr>
|
704 |
<tr>
|
@@ -736,16 +985,18 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
736 |
<div class="color-selector" color="<?php echo $this->options->close_button_color_x(); ?>"></div>
|
737 |
<input type="text" class="color-value" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo esc_attr($this->options->close_button_color_x()); ?>" />
|
738 |
</div>
|
739 |
-
|
|
|
|
|
|
|
740 |
</td>
|
741 |
</tr>
|
742 |
</table>
|
743 |
<?php
|
744 |
}
|
745 |
|
746 |
-
|
747 |
?>
|
748 |
-
<h3><?php echo __('CSS', 'wpfront-notification-bar'); ?></h3>
|
749 |
<table class="form-table">
|
750 |
<tr>
|
751 |
<th scope="row">
|
@@ -753,7 +1004,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
753 |
</th>
|
754 |
<td>
|
755 |
<input type="checkbox" name="<?php echo $this->options->dynamic_css_use_url_name(); ?>" <?php echo $this->options->dynamic_css_use_url() ? 'checked' : ''; ?> />
|
756 |
-
|
|
|
|
|
|
|
|
|
757 |
</td>
|
758 |
</tr>
|
759 |
<tr>
|
@@ -777,7 +1032,11 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
777 |
<?php echo $this->options->css_enqueue_footer_label(); ?>
|
778 |
</th>
|
779 |
<td>
|
780 |
-
<input type="checkbox" name="<?php echo $this->options->css_enqueue_footer_name(); ?>" <?php echo $this->options->css_enqueue_footer() ? 'checked' : ''; ?> /> 
|
|
|
|
|
|
|
|
|
781 |
</td>
|
782 |
</tr>
|
783 |
</table>
|
@@ -801,22 +1060,65 @@ if (!class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar_Add_Edit_V
|
|
801 |
'default_editor' => 'html'
|
802 |
);
|
803 |
wp_editor($content, $id, $settings);
|
804 |
-
?>
|
805 |
-
|
|
|
|
|
|
|
806 |
</td>
|
807 |
</tr>
|
808 |
<?php
|
809 |
}
|
810 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
protected function script() {
|
812 |
?>
|
813 |
<script type="text/javascript">
|
814 |
(function () {
|
815 |
init_wpfront_notifiction_bar_options({
|
816 |
choose_image: '<?php echo __('Choose Image', 'wpfront-notification-bar'); ?>',
|
817 |
-
select_image: '<?php echo __('Select Image', 'wpfront-notification-bar'); ?>'
|
|
|
|
|
818 |
});
|
819 |
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
820 |
</script>
|
821 |
<?php
|
822 |
}
|
47 |
public function __construct($controller) {
|
48 |
$this->controller = $controller;
|
49 |
$this->options = $this->controller->get_options();
|
50 |
+
if (!empty($_POST['submit2']) || !empty($_POST['submit'])) {
|
51 |
$this->options->read_from_post();
|
52 |
}
|
53 |
}
|
54 |
|
55 |
public function view() {
|
56 |
?>
|
57 |
+
<div class="wrap notification-bar-add-edit">
|
58 |
<?php $this->title(); ?>
|
59 |
<div id="wpfront-notification-bar-options" class="inside">
|
60 |
<?php
|
75 |
<?php
|
76 |
}
|
77 |
?>
|
78 |
+
<?php $this->create_meta_boxes(); ?>
|
79 |
+
<div id="poststuff">
|
80 |
+
<div id="post-body" class="metabox-holder columns-2" style="display:flow-root">
|
81 |
+
<div id="post-body-content" style="position:relative">
|
82 |
+
<?php do_meta_boxes($this->controller->get_menu_slug(), 'normal', null); ?>
|
83 |
+
</div>
|
84 |
+
<div id="postbox-container-1" class="postbox-container" style="position: sticky; top: 40px;">
|
85 |
+
<?php do_meta_boxes($this->controller->get_menu_slug(), 'side', null); ?>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
<?php $this->script(); ?>
|
90 |
<input type="hidden" name="<?php echo $this->options->last_saved_name(); ?>" value="<?php echo time(); ?>" />
|
91 |
<?php $this->nonce_field(); ?>
|
92 |
+
<?php submit_button(null, 'primary', 'submit2', false); ?>
|
93 |
</form>
|
94 |
</div>
|
95 |
</div>
|
112 |
|
113 |
}
|
114 |
|
115 |
+
protected function get_meta_box_groups() {
|
116 |
+
return [
|
117 |
+
(object) [
|
118 |
+
'group_name' => 'Display_Settings',
|
119 |
+
'title' => __('Display', 'wpfront-notification-bar'),
|
120 |
+
'render' => 'postbox_notification_bar_display_settings'
|
121 |
+
],
|
122 |
+
(object) [
|
123 |
+
'group_name' => 'Content_Settings',
|
124 |
+
'title' => __('Content', 'wpfront-notification-bar'),
|
125 |
+
'render' => 'postbox_notification_bar_content_settings'
|
126 |
+
],
|
127 |
+
(object) [
|
128 |
+
'group_name' => 'Filter_Settings',
|
129 |
+
'title' => __('Filter', 'wpfront-notification-bar'),
|
130 |
+
'render' => 'postbox_notification_bar_filter_settings'
|
131 |
+
],
|
132 |
+
(object) [
|
133 |
+
'group_name' => 'Color_Settings',
|
134 |
+
'title' => __('Color', 'wpfront-notification-bar'),
|
135 |
+
'render' => 'postbox_notification_bar_color_settings'
|
136 |
+
],
|
137 |
+
(object) [
|
138 |
+
'group_name' => 'CSS_Settings',
|
139 |
+
'title' => __('CSS', 'wpfront-notification-bar'),
|
140 |
+
'render' => 'postbox_notification_bar_css_settings'
|
141 |
+
]
|
142 |
+
];
|
143 |
+
}
|
144 |
+
|
145 |
+
protected function create_meta_boxes() {
|
146 |
+
$groups = $this->get_meta_box_groups();
|
147 |
+
|
148 |
+
foreach ($groups as $group) {
|
149 |
+
add_meta_box("postbox-{$group->group_name}", $group->title, array($this, $group->render), $this->controller->get_menu_slug(), 'normal', 'default', $group);
|
150 |
+
}
|
151 |
+
add_meta_box("postbox-side-1", __('Action', 'wpfront-notification-bar'), array($this, 'action_buttons'), $this->controller->get_menu_slug(), 'side', 'default', $group);
|
152 |
+
$this->upgrade_to_pro_metabox($group);
|
153 |
+
|
154 |
+
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
|
155 |
+
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
156 |
+
}
|
157 |
+
|
158 |
+
public function upgrade_to_pro_metabox($group) {
|
159 |
+
add_meta_box("postbox-side-2", __('Upgrade to Pro', 'wpfront-notification-bar'), array($this, 'free_to_pro'), $this->controller->get_menu_slug(), 'side', 'default', $group);
|
160 |
+
}
|
161 |
+
|
162 |
+
public function action_buttons() {
|
163 |
+
submit_button();
|
164 |
+
}
|
165 |
+
|
166 |
+
public function free_to_pro() {
|
167 |
+
?>
|
168 |
+
<div class="free-to-pro">
|
169 |
+
<p>
|
170 |
+
<?php esc_html_e('PRO version offers the following features.', 'wpfront-notification-bar'); ?>
|
171 |
+
</p>
|
172 |
+
<ul>
|
173 |
+
<li><?php echo __('Create Multiple Bars', 'wpfront-notification-bar'); ?></li>
|
174 |
+
<li><?php echo __('Advanced Editor', 'wpfront-notification-bar'); ?></li>
|
175 |
+
<li><?php echo __('Recurring Schedule', 'wpfront-notification-bar'); ?></li>
|
176 |
+
<li><?php echo __('Custom Capabilities', 'wpfront-notification-bar'); ?></li>
|
177 |
+
<li><?php echo __('Premium Support', 'wpfront-notification-bar'); ?></li>
|
178 |
+
</ul>
|
179 |
+
<?php $this->discount_code(); ?>
|
180 |
+
<p class="upgrade-button">
|
181 |
+
<a class="button button-primary" href="https://wpfront.com/notification-bar-pro/" target="_blank" rel="noopener noreferrer"><?php echo __('Upgrade', 'wpfront-notification-bar'); ?></a>
|
182 |
+
</p>
|
183 |
+
</div>
|
184 |
+
<?php
|
185 |
+
}
|
186 |
+
|
187 |
+
private function discount_code() {
|
188 |
+
$now = time();
|
189 |
+
$until = strtotime("2022-01-31");
|
190 |
+
if ($now < $until) {
|
191 |
+
?>
|
192 |
+
<p class="discount-tip">
|
193 |
+
<?php esc_html_e('Use the following code to purchase the PRO version on a discount:', 'wpfront-notification-bar'); ?>
|
194 |
+
</p>
|
195 |
+
<p class="discount-code">
|
196 |
+
NBJANEP
|
197 |
+
</p>
|
198 |
+
<?php
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
public function postbox_notification_bar_display_settings() {
|
203 |
?>
|
|
|
|
|
204 |
<table class="form-table">
|
205 |
+
<?php $this->name_field(); ?>
|
206 |
<tr>
|
207 |
<th scope="row">
|
208 |
<?php echo $this->options->enabled_label(); ?>
|
224 |
<span class="description"><a target="_blank" rel="noopener" href="<?php echo $url; ?>"><?php echo $url; ?></a></span>
|
225 |
<?php
|
226 |
} else {
|
227 |
+
$description = __('You can test the notification bar without enabling it.', 'wpfront-notification-bar');
|
228 |
+
$this->echo_help_tooltip($description);
|
|
|
229 |
}
|
230 |
?>
|
231 |
</td>
|
236 |
</th>
|
237 |
<td>
|
238 |
<input type="checkbox" name="<?php echo $this->options->debug_mode_name(); ?>" <?php echo $this->options->debug_mode() ? 'checked' : ''; ?> />
|
239 |
+
<?php
|
240 |
+
$description = __('Enable to see logs in browser.', 'wpfront-notification-bar');
|
241 |
+
$this->echo_help_tooltip($description);
|
242 |
+
?>
|
243 |
<span class="description">
|
244 |
+
<a target="_blank" rel="noopener" href="https://wpfront.com/wordpress-plugins/notification-bar-plugin/wpfront-notification-bar-troubleshooting/"><?php echo __('How to?', 'wpfront-notification-bar'); ?></a>
|
|
|
245 |
</span>
|
246 |
</td>
|
247 |
</tr>
|
261 |
<?php echo $this->options->fixed_position_label(); ?>
|
262 |
</th>
|
263 |
<td>
|
264 |
+
<input type="checkbox" name="<?php echo $this->options->fixed_position_name(); ?>" <?php echo $this->options->fixed_position() ? 'checked' : ''; ?> /> 
|
265 |
+
<?php
|
266 |
+
$description = __('Sticky Bar, bar will stay at position regardless of scrolling.', 'wpfront-notification-bar');
|
267 |
+
$this->echo_help_tooltip($description);
|
268 |
+
?>
|
269 |
</td>
|
270 |
</tr>
|
271 |
<tr>
|
274 |
</th>
|
275 |
<td>
|
276 |
<input class="regular-text" type="text" name="<?php echo $this->options->theme_sticky_selector_name(); ?>" value="<?php echo esc_attr($this->options->theme_sticky_selector()); ?>" />
|
277 |
+
<?php
|
278 |
+
$description = __('If your page already has a sticky bar enter the element selector here. For example, for Avada theme it will be "<b>.fusion-is-sticky .fusion-header</b>".', 'wpfront-notification-bar');
|
279 |
+
$this->echo_help_tooltip($description);
|
280 |
+
?>
|
281 |
</td>
|
282 |
</tr>
|
283 |
<tr>
|
285 |
<?php echo $this->options->display_scroll_label(); ?>
|
286 |
</th>
|
287 |
<td>
|
288 |
+
<input type="checkbox" name="<?php echo $this->options->display_scroll_name(); ?>" <?php echo $this->options->display_scroll() ? 'checked' : ''; ?> /> 
|
289 |
+
|
290 |
+
<?php
|
291 |
+
$description = __('Displays the bar on window scroll.', 'wpfront-notification-bar');
|
292 |
+
$this->echo_help_tooltip($description);
|
293 |
+
?>
|
294 |
</td>
|
295 |
</tr>
|
296 |
<tr>
|
298 |
<?php echo $this->options->display_scroll_offset_label(); ?>
|
299 |
</th>
|
300 |
<td>
|
301 |
+
<input class="seconds" name="<?php echo $this->options->display_scroll_offset_name(); ?>" value="<?php echo esc_attr($this->options->display_scroll_offset()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
302 |
+
<?php
|
303 |
+
$description = __('Number of pixels to be scrolled before the bar appears.', 'wpfront-notification-bar');
|
304 |
+
$this->echo_help_tooltip($description);
|
305 |
+
?>
|
306 |
</td>
|
307 |
</tr>
|
308 |
<tr>
|
310 |
<?php echo $this->options->height_label(); ?>
|
311 |
</th>
|
312 |
<td>
|
313 |
+
<input class="seconds" name="<?php echo $this->options->height_name(); ?>" value="<?php echo esc_attr($this->options->height()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
314 |
+
<?php
|
315 |
+
$description = __('Set 0px to auto fit contents.', 'wpfront-notification-bar');
|
316 |
+
$this->echo_help_tooltip($description);
|
317 |
+
?>
|
318 |
</td>
|
319 |
</tr>
|
320 |
<tr>
|
322 |
<?php echo $this->options->position_offset_label(); ?>
|
323 |
</th>
|
324 |
<td>
|
325 |
+
<input class="seconds" name="<?php echo $this->options->position_offset_name(); ?>" value="<?php echo esc_attr($this->options->position_offset()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
326 |
+
<?php
|
327 |
+
$description = __('(Top bar only) If you find the bar overlapping, try increasing this value. (eg. WordPress 3.8 Twenty Fourteen theme, set 48px)', 'wpfront-notification-bar');
|
328 |
+
$this->echo_help_tooltip($description);
|
329 |
+
?>
|
330 |
</td>
|
331 |
</tr>
|
332 |
<tr>
|
334 |
<?php echo $this->options->display_after_label(); ?>
|
335 |
</th>
|
336 |
<td>
|
337 |
+
<input class="seconds" name="<?php echo $this->options->display_after_name(); ?>" value="<?php echo esc_attr($this->options->display_after()); ?>" /> 
|
338 |
+
<?php echo __('second(s)', 'wpfront-notification-bar'); ?> 
|
339 |
+
<?php
|
340 |
+
$description = __('Set 0 second(s) to display immediately. Does not work in "<b>Display on Scroll</b>" mode.', 'wpfront-notification-bar');
|
341 |
+
$this->echo_help_tooltip($description);
|
342 |
+
?>
|
343 |
</td>
|
344 |
</tr>
|
345 |
<tr>
|
347 |
<?php echo $this->options->animate_delay_label(); ?>
|
348 |
</th>
|
349 |
<td>
|
350 |
+
<input class="seconds" name="<?php echo $this->options->animate_delay_name(); ?>" value="<?php echo esc_attr($this->options->animate_delay()); ?>" /> <?php echo __('second(s)', 'wpfront-notification-bar'); ?> 
|
351 |
+
<?php
|
352 |
+
$description = __('Set 0 second(s) for no animation.', 'wpfront-notification-bar');
|
353 |
+
$this->echo_help_tooltip($description);
|
354 |
+
?>
|
355 |
</td>
|
356 |
</tr>
|
357 |
<tr>
|
359 |
<?php echo $this->options->close_button_label(); ?>
|
360 |
</th>
|
361 |
<td>
|
362 |
+
<input type="checkbox" name="<?php echo $this->options->close_button_name(); ?>" <?php echo $this->options->close_button() ? 'checked' : ''; ?> /> 
|
363 |
+
<?php
|
364 |
+
$description = __('Displays a close button at the top right corner of the bar.', 'wpfront-notification-bar');
|
365 |
+
$this->echo_help_tooltip($description);
|
366 |
+
?>
|
367 |
</td>
|
368 |
</tr>
|
369 |
<tr>
|
371 |
<?php echo $this->options->auto_close_after_label(); ?>
|
372 |
</th>
|
373 |
<td>
|
374 |
+
<input class="seconds" name="<?php echo $this->options->auto_close_after_name(); ?>" value="<?php echo esc_attr($this->options->auto_close_after()); ?>" /> <?php echo __('second(s)', 'wpfront-notification-bar'); ?> 
|
375 |
+
<?php
|
376 |
+
$description = __('Set 0 second(s) to disable auto close. Do not work in "<b>Display on Scroll</b>" mode.', 'wpfront-notification-bar');
|
377 |
+
$this->echo_help_tooltip($description);
|
378 |
+
?>
|
379 |
</td>
|
380 |
</tr>
|
381 |
<tr>
|
391 |
<?php echo $this->options->display_open_button_label(); ?>
|
392 |
</th>
|
393 |
<td>
|
394 |
+
<input type="checkbox" name="<?php echo $this->options->display_open_button_name(); ?>" <?php echo $this->options->display_open_button() ? 'checked' : ''; ?> /> 
|
395 |
+
<?php
|
396 |
+
$description = __('A reopen button will be displayed after the bar is closed.', 'wpfront-notification-bar');
|
397 |
+
$this->echo_help_tooltip($description);
|
398 |
+
?>
|
399 |
</td>
|
400 |
</tr>
|
401 |
<tr>
|
403 |
<?php echo $this->options->reopen_button_image_url_label(); ?>
|
404 |
</th>
|
405 |
<td>
|
406 |
+
<input id="reopen-button-image-url" class="URL" name="<?php echo $this->options->reopen_button_image_url_name(); ?>" value="<?php echo esc_attr($this->options->reopen_button_image_url()); ?>"/>
|
407 |
<input type="button" id="media-library-button" class="button" value="<?php echo __('Media Library', 'wpfront-notification-bar'); ?>" />
|
408 |
+
<?php
|
409 |
+
$description = __('Set empty value to use default images.');
|
410 |
+
$this->echo_help_tooltip($description);
|
411 |
+
?>
|
412 |
</td>
|
413 |
</tr>
|
414 |
<tr>
|
416 |
<?php echo $this->options->reopen_button_offset_label(); ?>
|
417 |
</th>
|
418 |
<td>
|
419 |
+
<input class="seconds" name="<?php echo $this->options->reopen_button_offset_name(); ?>" value="<?php echo esc_attr($this->options->reopen_button_offset()); ?>" /> <?php echo __('px', 'wpfront-notification-bar'); ?> 
|
420 |
+
<?php
|
421 |
+
$description = __('Moves the button more to the left.', 'wpfront-notification-bar');
|
422 |
+
$this->echo_help_tooltip($description);
|
423 |
+
?>
|
424 |
</td>
|
425 |
</tr>
|
426 |
<tr>
|
428 |
<?php echo $this->options->keep_closed_label(); ?>
|
429 |
</th>
|
430 |
<td>
|
431 |
+
<input type="checkbox" name="<?php echo $this->options->keep_closed_name(); ?>" <?php echo $this->options->keep_closed() ? 'checked' : ''; ?> /> 
|
432 |
+
<?php
|
433 |
+
$description = __('Once closed, bar will display closed on other pages.', 'wpfront-notification-bar');
|
434 |
+
$this->echo_help_tooltip($description);
|
435 |
+
?>
|
436 |
</td>
|
437 |
</tr>
|
438 |
<tr>
|
440 |
<?php echo $this->options->keep_closed_for_label(); ?>
|
441 |
</th>
|
442 |
<td>
|
443 |
+
<input class="seconds" name="<?php echo $this->options->keep_closed_for_name(); ?>" value="<?php echo esc_attr($this->options->keep_closed_for()); ?>" /> <?php echo __('day(s)', 'wpfront-notification-bar'); ?> 
|
444 |
+
<?php
|
445 |
+
$description = __('Bar will be kept closed for the number of days specified from last closed date.', 'wpfront-notification-bar');
|
446 |
+
$this->echo_help_tooltip($description);
|
447 |
+
?>
|
448 |
</td>
|
449 |
</tr>
|
450 |
<tr>
|
452 |
<?php echo $this->options->keep_closed_cookie_name_label(); ?>
|
453 |
</th>
|
454 |
<td>
|
455 |
+
<input class="regular-text" type="text" name="<?php echo $this->options->keep_closed_cookie_name_name(); ?>" value="<?php echo esc_attr($this->options->keep_closed_cookie_name()); ?>" />
|
456 |
+
<?php
|
457 |
+
$description = __('Cookie name used to mark keep closed days. Changing this value will allow you to bypass "<b>Keep Closed For</b>" days and show the notification again.', 'wpfront-notification-bar');
|
458 |
+
$this->echo_help_tooltip($description);
|
459 |
+
?>
|
460 |
</td>
|
461 |
</tr>
|
462 |
<tr>
|
464 |
<?php echo $this->options->set_max_views_label(); ?>
|
465 |
</th>
|
466 |
<td>
|
467 |
+
<input type="checkbox" name="<?php echo $this->options->set_max_views_name(); ?>" <?php echo $this->options->set_max_views() ? 'checked' : ''; ?> /> 
|
468 |
+
<?php
|
469 |
+
$description = __('Bar will be hidden after a certain number of views.', 'wpfront-notification-bar');
|
470 |
+
$this->echo_help_tooltip($description);
|
471 |
+
?>
|
472 |
</td>
|
473 |
</tr>
|
474 |
<tr>
|
476 |
<?php echo $this->options->max_views_label(); ?>
|
477 |
</th>
|
478 |
<td>
|
479 |
+
<input class="seconds" name="<?php echo $this->options->max_views_name(); ?>" value="<?php echo esc_attr($this->options->max_views()); ?>" /> <?php echo __('time(s)', 'wpfront-notification-bar'); ?> 
|
480 |
+
<?php
|
481 |
+
$description = __('Maximum number of views.', 'wpfront-notification-bar');
|
482 |
+
$this->echo_help_tooltip($description);
|
483 |
+
?>
|
484 |
</td>
|
485 |
</tr>
|
486 |
<tr>
|
488 |
<?php echo $this->options->max_views_for_label(); ?>
|
489 |
</th>
|
490 |
<td>
|
491 |
+
<input class="seconds" name="<?php echo $this->options->max_views_for_name(); ?>" value="<?php echo esc_attr($this->options->max_views_for()); ?>" /> <?php echo __('day(s)', 'wpfront-notification-bar'); ?> 
|
492 |
+
<?php
|
493 |
+
$description = __('Bar will be kept closed for the number of days specified. Zero means current session.', 'wpfront-notification-bar');
|
494 |
+
$this->echo_help_tooltip($description);
|
495 |
+
?>
|
496 |
</td>
|
497 |
</tr>
|
498 |
+
<tr>
|
499 |
<th scope="row">
|
500 |
<?php echo $this->options->max_views_cookie_name_label(); ?>
|
501 |
</th>
|
502 |
<td>
|
503 |
+
<input class="regular-text" type="text" name="<?php echo $this->options->max_views_cookie_name_name(); ?>" value="<?php echo esc_attr($this->options->max_views_cookie_name()); ?>" />
|
504 |
+
<?php
|
505 |
+
$description = __('Cookie name used to store view count.', 'wpfront-notification-bar');
|
506 |
+
$this->echo_help_tooltip($description);
|
507 |
+
?>
|
508 |
</td>
|
509 |
</tr>
|
510 |
<tr>
|
529 |
</th>
|
530 |
<td>
|
531 |
<input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo esc_attr($this->options->small_device_width()); ?>" />px
|
532 |
+
<?php
|
533 |
+
$description = __('Devices with width greater than the specified width will be considered as large devices.', 'wpfront-notification-bar');
|
534 |
+
$this->echo_help_tooltip($description);
|
535 |
+
?>
|
536 |
</td>
|
537 |
</tr>
|
538 |
<tr>
|
541 |
</th>
|
542 |
<td>
|
543 |
<input type="checkbox" name="<?php echo $this->options->hide_small_window_name(); ?>" <?php echo $this->options->hide_small_window() ? "checked" : ""; ?> />
|
544 |
+
<?php
|
545 |
+
$description = __('Notification bar will be hidden on broswer window when the width matches.', 'wpfront-notification-bar');
|
546 |
+
$this->echo_help_tooltip($description);
|
547 |
+
?>
|
548 |
</td>
|
549 |
</tr>
|
550 |
<tr>
|
553 |
</th>
|
554 |
<td>
|
555 |
<input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo esc_attr($this->options->small_window_width()); ?>" />px
|
556 |
+
<?php
|
557 |
+
$description = __('Notification bar will be hidden on browser window with lesser or equal width.', 'wpfront-notification-bar');
|
558 |
+
$this->echo_help_tooltip($description);
|
559 |
+
?>
|
560 |
</td>
|
561 |
</tr>
|
562 |
<tr>
|
565 |
</th>
|
566 |
<td>
|
567 |
<input type="checkbox" name="<?php echo $this->options->attach_on_shutdown_name(); ?>" <?php echo $this->options->attach_on_shutdown() ? 'checked' : ''; ?> />
|
568 |
+
<?php
|
569 |
+
$description = __('Enable as a last resort if the notification bar is not working. This could create compatibility issues.', 'wpfront-notification-bar');
|
570 |
+
$this->echo_help_tooltip($description);
|
571 |
+
?>
|
572 |
</td>
|
573 |
</tr>
|
574 |
</table>
|
575 |
<?php
|
576 |
}
|
577 |
|
578 |
+
public function postbox_notification_bar_content_settings() {
|
579 |
?>
|
|
|
580 |
<table class="form-table">
|
581 |
<tr>
|
582 |
<th scope="row">
|
600 |
<?php echo $this->options->message_process_shortcode_label(); ?>
|
601 |
</th>
|
602 |
<td>
|
603 |
+
<input type="checkbox" name="<?php echo $this->options->message_process_shortcode_name(); ?>" <?php echo $this->options->message_process_shortcode() ? 'checked' : ''; ?> /> 
|
604 |
+
<?php
|
605 |
+
$description = __('Processes shortcodes in message text.', 'wpfront-notification-bar');
|
606 |
+
$this->echo_help_tooltip($description);
|
607 |
+
?>
|
608 |
</td>
|
609 |
</tr>
|
610 |
<tr>
|
612 |
<?php echo $this->options->display_button_label(); ?>
|
613 |
</th>
|
614 |
<td>
|
615 |
+
<input type="checkbox" name="<?php echo $this->options->display_button_name(); ?>" <?php echo $this->options->display_button() ? 'checked' : ''; ?> /> 
|
616 |
+
<?php
|
617 |
+
$description = __('Displays a button next to the message.', 'wpfront-notification-bar');
|
618 |
+
$this->echo_help_tooltip($description);
|
619 |
+
?>
|
620 |
</td>
|
621 |
</tr>
|
622 |
<tr>
|
655 |
<input type="checkbox" name="<?php echo $this->options->button_action_url_nofollow_name(); ?>" <?php echo $this->options->button_action_url_nofollow() ? 'checked' : ''; ?> />
|
656 |
<span><?php echo $this->options->button_action_url_nofollow_label() . '.'; ?></span>
|
657 |
</label>
|
658 |
+
<?php
|
659 |
+
$description = __('rel="<b>nofollow</b>"', 'wpfront-notification-bar');
|
660 |
+
$this->echo_help_tooltip($description);
|
661 |
+
?>
|
662 |
<br />
|
663 |
<label>
|
664 |
<input type="checkbox" name="<?php echo $this->options->button_action_url_noreferrer_name(); ?>" <?php echo $this->options->button_action_url_noreferrer() ? 'checked' : ''; ?> />
|
665 |
<span><?php echo $this->options->button_action_url_noreferrer_label() . '.'; ?></span>
|
666 |
</label>
|
667 |
+
<?php
|
668 |
+
$description = __('rel="<b>noreferrer</b>"', 'wpfront-notification-bar');
|
669 |
+
$this->echo_help_tooltip($description);
|
670 |
+
?>
|
671 |
<br />
|
672 |
<label>
|
673 |
<input id="chk_button_action_url_noopener" type="checkbox" <?php echo $this->options->button_action_url_noopener() ? 'checked' : ''; ?> />
|
674 |
<input type="hidden" id="txt_button_action_url_noopener" name="<?php echo $this->options->button_action_url_noopener_name(); ?>" value="<?php echo $this->options->button_action_url_noopener() ? '1' : '0'; ?>" />
|
675 |
<span><?php echo $this->options->button_action_url_noopener_label() . '.'; ?></span>
|
676 |
</label>
|
677 |
+
<?php
|
678 |
+
$description = __('rel="<b>noopener</b>", used when URL opens in new tab/window. Recommended value is "<b>on</b>", unless it affects your functionality.', 'wpfront-notification-bar');
|
679 |
+
$this->echo_help_tooltip($description);
|
680 |
+
?>
|
681 |
<br />
|
682 |
<label>
|
683 |
<input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="2" <?php echo $this->options->button_action() == 2 ? 'checked' : ''; ?> />
|
699 |
<?php
|
700 |
}
|
701 |
|
702 |
+
public function postbox_notification_bar_filter_settings() {
|
703 |
?>
|
|
|
704 |
<table class="form-table">
|
705 |
<tr>
|
706 |
+
<th scope="row">
|
707 |
+
<?php echo $this->options->filter_date_type_label(); ?>
|
708 |
+
</th>
|
709 |
+
<td>
|
710 |
+
<div>
|
711 |
+
<label><input id="date-none" type="radio" class="date-type" name="<?php echo $this->options->filter_date_type_name(); ?>" value="none" <?php echo $this->options->filter_date_type() == 'none' ? 'checked' : ''; ?> /> <?php echo __('None', 'wpfront-notification-bar'); ?></label>
|
712 |
+
<br />
|
713 |
+
<label><input id="start-end-date" type="radio" class="date-type" name="<?php echo $this->options->filter_date_type_name(); ?>" value="start_end" <?php echo $this->options->filter_date_type() == 'start_end' ? 'checked' : ''; ?> /> <?php echo __('Start and End Date', 'wpfront-notification-bar'); ?></label>
|
714 |
+
<br />
|
715 |
+
<label><input id="schedule-date" type="radio" class="date-type" name="<?php echo $this->options->filter_date_type_name(); ?>" value="schedule" <?php echo $this->options->filter_date_type() == 'schedule' ? 'checked' : ''; ?> /> <?php echo __('Recurring Schedule', 'wpfront-notification-bar'); ?></label>
|
716 |
+
</div>
|
717 |
+
</td>
|
718 |
+
</tr>
|
719 |
+
<tr class="start-end-date">
|
720 |
<th scope="row">
|
721 |
<?php echo $this->options->start_date_label(); ?>
|
722 |
</th>
|
724 |
<input class="date" name="<?php echo $this->options->start_date_name(); ?>" value="<?php echo esc_attr($this->options->start_date() == NULL ? '' : date('Y-m-d', $this->options->start_date())); ?>" />
|
725 |
<input class="time" name="<?php echo $this->options->start_time_name(); ?>" value="<?php echo esc_attr($this->options->start_time() == NULL ? '' : date('h:i a', $this->options->start_time())); ?>" />
|
726 |
 
|
727 |
+
<?php
|
728 |
+
$description = __('YYYY-MM-DD hh:mm ap', 'wpfront-notification-bar');
|
729 |
+
$this->echo_help_tooltip($description);
|
730 |
+
?>
|
731 |
</td>
|
732 |
</tr>
|
733 |
+
<tr class="start-end-date">
|
734 |
<th scope="row">
|
735 |
<?php echo $this->options->end_date_label(); ?>
|
736 |
</th>
|
738 |
<input class="date" name="<?php echo $this->options->end_date_name(); ?>" value="<?php echo esc_attr($this->options->end_date() == NULL ? '' : date('Y-m-d', $this->options->end_date())); ?>" />
|
739 |
<input class="time" name="<?php echo $this->options->end_time_name(); ?>" value="<?php echo esc_attr($this->options->end_time() == NULL ? '' : date('h:i a', $this->options->end_time())); ?>" />
|
740 |
 
|
741 |
+
<?php
|
742 |
+
$description = __('YYYY-MM-DD hh:mm ap', 'wpfront-notification-bar');
|
743 |
+
$this->echo_help_tooltip($description);
|
744 |
+
?>
|
745 |
</td>
|
746 |
</tr>
|
747 |
+
<?php
|
748 |
+
$this->scheduled_date();
|
749 |
+
?>
|
750 |
<tr>
|
751 |
<th scope="row">
|
752 |
<?php echo $this->options->display_pages_label(); ?>
|
759 |
<br />
|
760 |
<label>
|
761 |
<input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
|
762 |
+
<span><?php echo __('Only in landing page.', 'wpfront-notification-bar'); ?></span> 
|
763 |
+
<?php
|
764 |
+
$description = __('The first page they visit on your website.', 'wpfront-notification-bar');
|
765 |
+
$this->echo_help_tooltip($description);
|
766 |
+
?>
|
767 |
</label>
|
768 |
<br />
|
769 |
<label>
|
770 |
<input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
|
771 |
+
<span><?php echo __('Include in following pages.', 'wpfront-notification-bar'); ?></span>
|
772 |
+
<?php
|
773 |
+
$description = __('Use the textbox below to specify the post IDs as a comma separated list.', 'wpfront-notification-bar');
|
774 |
+
$this->echo_help_tooltip($description);
|
775 |
+
?>
|
776 |
</label>
|
777 |
+
<br />
|
778 |
<input class="post-id-list" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo esc_attr($this->options->include_pages()); ?>" />
|
779 |
<div class="pages-selection">
|
780 |
<?php
|
793 |
</div>
|
794 |
<label>
|
795 |
<input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="4" <?php echo $this->options->display_pages() == 4 ? 'checked' : ''; ?> />
|
796 |
+
<span><?php echo __('Exclude in following pages.', 'wpfront-notification-bar'); ?></span>
|
797 |
+
<?php
|
798 |
+
$description = __('Use the textbox below to specify the post IDs as a comma separated list.', 'wpfront-notification-bar');
|
799 |
+
$this->echo_help_tooltip($description);
|
800 |
+
?>
|
801 |
</label>
|
802 |
+
<br />
|
803 |
<input class="post-id-list" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo esc_attr($this->options->exclude_pages()); ?>" />
|
804 |
<div class="pages-selection">
|
805 |
<?php
|
816 |
}
|
817 |
?>
|
818 |
</div>
|
819 |
+
<?php
|
820 |
+
$description = __('Will display only top 50 posts and 50 pages to reduce load. Use the PostIDs textbox to apply this setting on other Posts, Pages, CPTs and Taxonomies. Taxonomy terms start with a "t".', 'wpfront-notification-bar');
|
821 |
+
$this->echo_help_tooltip($description);
|
822 |
+
?>
|
823 |
</td>
|
824 |
</tr>
|
825 |
<tr>
|
827 |
<?php echo $this->options->landingpage_cookie_name_label(); ?>
|
828 |
</th>
|
829 |
<td>
|
830 |
+
<input class="regular-text" type="text" name="<?php echo $this->options->landingpage_cookie_name_name(); ?>" value="<?php echo esc_attr($this->options->landingpage_cookie_name()); ?>" />
|
831 |
+
<?php
|
832 |
+
$description = __('Cookie name used to mark landing page. Useful when you have multiple WordPress installs under same domain.', 'wpfront-notification-bar');
|
833 |
+
$this->echo_help_tooltip($description);
|
834 |
+
?>
|
835 |
</td>
|
836 |
</tr>
|
837 |
<tr>
|
851 |
<br />
|
852 |
<label>
|
853 |
<input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="3" <?php echo $this->options->display_roles() == 3 ? 'checked' : ''; ?> />
|
854 |
+
<span><?php echo __('Guest users.', 'wpfront-notification-bar'); ?></span>
|
855 |
+
<?php
|
856 |
+
$description = __('Non-logged in users', 'wpfront-notification-bar');
|
857 |
+
$this->echo_help_tooltip($description);
|
858 |
+
?>
|
859 |
</label>
|
860 |
<br />
|
861 |
<label>
|
900 |
<?php
|
901 |
}
|
902 |
|
903 |
+
public function postbox_notification_bar_color_settings() {
|
904 |
?>
|
|
|
905 |
<table class="form-table">
|
906 |
<tr>
|
907 |
<th scope="row">
|
916 |
<div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div>
|
917 |
<input type="text" class="color-value" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo esc_attr($this->options->bar_to_color()); ?>" />
|
918 |
</div>
|
919 |
+
<?php
|
920 |
+
$description = __('Select two different colors to create a gradient.', 'wpfront-notification-bar');
|
921 |
+
$this->echo_help_tooltip($description);
|
922 |
+
?>
|
923 |
</td>
|
924 |
</tr>
|
925 |
<tr>
|
944 |
<div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div>
|
945 |
<input type="text" class="color-value" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo esc_attr($this->options->button_to_color()); ?>" />
|
946 |
</div>
|
947 |
+
<?php
|
948 |
+
$description = __('Select two different colors to create a gradient.', 'wpfront-notification-bar');
|
949 |
+
$this->echo_help_tooltip($description);
|
950 |
+
?>
|
951 |
</td>
|
952 |
</tr>
|
953 |
<tr>
|
985 |
<div class="color-selector" color="<?php echo $this->options->close_button_color_x(); ?>"></div>
|
986 |
<input type="text" class="color-value" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo esc_attr($this->options->close_button_color_x()); ?>" />
|
987 |
</div>
|
988 |
+
<?php
|
989 |
+
$description = __('Normal, Hover, X', 'wpfront-notification-bar');
|
990 |
+
$this->echo_help_tooltip($description);
|
991 |
+
?>
|
992 |
</td>
|
993 |
</tr>
|
994 |
</table>
|
995 |
<?php
|
996 |
}
|
997 |
|
998 |
+
public function postbox_notification_bar_css_settings() {
|
999 |
?>
|
|
|
1000 |
<table class="form-table">
|
1001 |
<tr>
|
1002 |
<th scope="row">
|
1004 |
</th>
|
1005 |
<td>
|
1006 |
<input type="checkbox" name="<?php echo $this->options->dynamic_css_use_url_name(); ?>" <?php echo $this->options->dynamic_css_use_url() ? 'checked' : ''; ?> />
|
1007 |
+
 
|
1008 |
+
<?php
|
1009 |
+
$description = __('Custom and dynamic CSS will be added through a URL instead of writing to the document. Enabling this setting is recommened if there are no conflicts, so that caching can be leveraged.', 'wpfront-notification-bar');
|
1010 |
+
$this->echo_help_tooltip($description);
|
1011 |
+
?>
|
1012 |
</td>
|
1013 |
</tr>
|
1014 |
<tr>
|
1032 |
<?php echo $this->options->css_enqueue_footer_label(); ?>
|
1033 |
</th>
|
1034 |
<td>
|
1035 |
+
<input type="checkbox" name="<?php echo $this->options->css_enqueue_footer_name(); ?>" <?php echo $this->options->css_enqueue_footer() ? 'checked' : ''; ?> /> 
|
1036 |
+
<?php
|
1037 |
+
$description = __('Enqueue CSS in footer.', 'wpfront-notification-bar');
|
1038 |
+
$this->echo_help_tooltip($description);
|
1039 |
+
?>
|
1040 |
</td>
|
1041 |
</tr>
|
1042 |
</table>
|
1060 |
'default_editor' => 'html'
|
1061 |
);
|
1062 |
wp_editor($content, $id, $settings);
|
1063 |
+
?>
|
1064 |
+
<?php
|
1065 |
+
$description = __('Use the "<b>Preview</b>" field to see the output text.', 'wpfront-notification-bar');
|
1066 |
+
$this->echo_help_tooltip($description);
|
1067 |
+
?>
|
1068 |
</td>
|
1069 |
</tr>
|
1070 |
<?php
|
1071 |
}
|
1072 |
|
1073 |
+
protected function scheduled_date() {
|
1074 |
+
?>
|
1075 |
+
<tr class="schedule-date">
|
1076 |
+
<th scope="row">
|
1077 |
+
<?php echo $this->options->schedule_label(); ?>
|
1078 |
+
</th>
|
1079 |
+
<td style="color:red;">
|
1080 |
+
<p><?php echo __('Scheduling is not available in free version.', 'wpfront-notification-bar') . ' ' . sprintf('<a target="_blank" href="https://wpfront.com/notification-bar-pro/">%s</a>', __('Upgrade to Pro.', 'wpfront-notification-bar')); ?></p>
|
1081 |
+
</td>
|
1082 |
+
</tr>
|
1083 |
+
<?php
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
protected function echo_help_tooltip($description) {
|
1087 |
+
$description = esc_attr($description);
|
1088 |
+
?>
|
1089 |
+
<i class="fa fa-question-circle-o" title="<?php echo $description; ?>"></i>
|
1090 |
+
<?php
|
1091 |
+
}
|
1092 |
+
|
1093 |
protected function script() {
|
1094 |
?>
|
1095 |
<script type="text/javascript">
|
1096 |
(function () {
|
1097 |
init_wpfront_notifiction_bar_options({
|
1098 |
choose_image: '<?php echo __('Choose Image', 'wpfront-notification-bar'); ?>',
|
1099 |
+
select_image: '<?php echo __('Select Image', 'wpfront-notification-bar'); ?>',
|
1100 |
+
x_hours: '<?php echo __('%1$d hour(s)', 'wpfront-notification-bar'); ?>',
|
1101 |
+
x_hours_minutes: '<?php echo __('%1$d hour(s) and %2$d minute(s)', 'wpfront-notification-bar'); ?>'
|
1102 |
});
|
1103 |
})();
|
1104 |
+
(function ($) {
|
1105 |
+
var $div = $('div.wrap.notification-bar-add-edit');
|
1106 |
+
$(function () {
|
1107 |
+
$div.find('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
1108 |
+
postboxes.add_postbox_toggles('<?php echo $this->controller->get_menu_slug(); ?>');
|
1109 |
+
});
|
1110 |
+
|
1111 |
+
$(function () {
|
1112 |
+
$div.find('i').tooltip({
|
1113 |
+
tooltipClass: "notification-bar-tooltip",
|
1114 |
+
position: {my: "left+10 center", at: "right center"},
|
1115 |
+
content: function () {
|
1116 |
+
return $(this).prop('title');
|
1117 |
+
},
|
1118 |
+
hide: 50
|
1119 |
+
});
|
1120 |
+
});
|
1121 |
+
})(jQuery);
|
1122 |
</script>
|
1123 |
<?php
|
1124 |
}
|
uninstall.php
CHANGED
@@ -4,12 +4,15 @@ if (!defined('WP_UNINSTALL_PLUGIN')) {
|
|
4 |
exit();
|
5 |
}
|
6 |
|
|
|
7 |
if (file_exists(dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-entity-pro.php')) {
|
8 |
include_once dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-entity-pro.php';
|
|
|
9 |
}
|
10 |
|
11 |
if (file_exists(dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-settings-entity.php')) {
|
12 |
include_once dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-settings-entity.php';
|
|
|
13 |
}
|
14 |
|
15 |
if (is_multisite()) {
|
@@ -20,22 +23,25 @@ if (is_multisite()) {
|
|
20 |
foreach ($blog_ids as $blog_id) {
|
21 |
switch_to_blog($blog_id);
|
22 |
|
23 |
-
wpfront_notification_bar_uninstall();
|
24 |
}
|
25 |
|
26 |
switch_to_blog($current_blog_id);
|
27 |
} else {
|
28 |
-
wpfront_notification_bar_uninstall();
|
29 |
}
|
30 |
|
31 |
-
function wpfront_notification_bar_uninstall() {
|
32 |
$option_name = 'wpfront-notification-bar-options';
|
33 |
delete_option($option_name);
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
}
|
40 |
}
|
41 |
|
4 |
exit();
|
5 |
}
|
6 |
|
7 |
+
$is_pro = false;
|
8 |
if (file_exists(dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-entity-pro.php')) {
|
9 |
include_once dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-entity-pro.php';
|
10 |
+
$is_pro = true;
|
11 |
}
|
12 |
|
13 |
if (file_exists(dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-settings-entity.php')) {
|
14 |
include_once dirname(__FILE__) . '/pro/classes/class-wpfront-notification-bar-settings-entity.php';
|
15 |
+
$is_pro = true;
|
16 |
}
|
17 |
|
18 |
if (is_multisite()) {
|
23 |
foreach ($blog_ids as $blog_id) {
|
24 |
switch_to_blog($blog_id);
|
25 |
|
26 |
+
wpfront_notification_bar_uninstall($is_pro);
|
27 |
}
|
28 |
|
29 |
switch_to_blog($current_blog_id);
|
30 |
} else {
|
31 |
+
wpfront_notification_bar_uninstall($is_pro);
|
32 |
}
|
33 |
|
34 |
+
function wpfront_notification_bar_uninstall($is_pro) {
|
35 |
$option_name = 'wpfront-notification-bar-options';
|
36 |
delete_option($option_name);
|
37 |
+
|
38 |
+
if($is_pro) {
|
39 |
+
if (class_exists('\WPFront\Notification_Bar\Pro\WPFront_Notification_Bar_Entity_Pro')) {
|
40 |
+
\WPFront\Notification_Bar\Pro\WPFront_Notification_Bar_Entity_Pro::uninstall();
|
41 |
+
}
|
42 |
+
if (class_exists('\WPFront\Notification_Bar\Pro\WPFront_Notification_Bar_Settings_Entity')) {
|
43 |
+
\WPFront\Notification_Bar\Pro\WPFront_Notification_Bar_Settings_Entity::uninstall();
|
44 |
+
}
|
45 |
}
|
46 |
}
|
47 |
|
wpfront-notification-bar.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WPFront Notification Bar
|
4 |
* Plugin URI: http://wpfront.com/notification-bar-pro/
|
5 |
* Description: Easily lets you create a bar on top or bottom to display a notification.
|
6 |
-
* Version: 3.
|
7 |
* Requires at least: 5.0
|
8 |
* Requires PHP: 7.0
|
9 |
* Author: Syam Mohan
|
3 |
* Plugin Name: WPFront Notification Bar
|
4 |
* Plugin URI: http://wpfront.com/notification-bar-pro/
|
5 |
* Description: Easily lets you create a bar on top or bottom to display a notification.
|
6 |
+
* Version: 3.2.0
|
7 |
* Requires at least: 5.0
|
8 |
* Requires PHP: 7.0
|
9 |
* Author: Syam Mohan
|