WPFront Notification Bar - Version 1.8

Version Description

  • Preview mode.
  • Debug mode.
  • Hide in small devices and windows.
  • Change cookie names.
  • Edit include/exclude post IDs manually.
  • Edit colors manually.
  • More rel attributes. Thanks to jetxpert.
  • Accessibility and compatibility fixes.
  • Filters 'wpfront_notification_bar_message' and 'wpfront_notification_bar_button_text' added.
  • Bug fixes.
Download this release

Release Info

Developer syammohanm
Plugin Icon 128x128 WPFront Notification Bar
Version 1.8
Comparing to
See all releases

Code changes from version 1.7.1 to 1.8

Files changed (36) hide show
  1. classes/base/class-wpfront-base-menu.php +0 -256
  2. classes/base/class-wpfront-base.php +0 -212
  3. classes/base/class-wpfront-options-base.php +1 -1
  4. classes/base/class-wpfront-static.php +0 -68
  5. classes/class-wpfront-notification-bar-options.php +88 -43
  6. classes/class-wpfront-notification-bar.php +401 -127
  7. css/options.css +26 -2
  8. css/options.min.css +1 -0
  9. css/wpfront-notification-bar.css +10 -2
  10. css/wpfront-notification-bar.min.css +1 -0
  11. jquery-plugins/colorpicker/css/colorpicker.min.css +1 -0
  12. jquery-plugins/colorpicker/js/colorpicker.min.js +19 -0
  13. jquery-plugins/jquery.c.js +0 -117
  14. jquery-plugins/js-cookie.min.js +4 -0
  15. jquery-plugins/json2.min.js +0 -7
  16. js/options.js +63 -0
  17. js/options.min.js +3 -0
  18. js/wpfront-notification-bar.js +39 -9
  19. js/wpfront-notification-bar.min.js +6 -0
  20. languages/wpfront-notification-bar-de_DE.mo +0 -0
  21. languages/wpfront-notification-bar-de_DE/readme.txt +0 -1
  22. languages/wpfront-notification-bar-de_DE/wpfront-notification-bar-de_DE.mo +0 -0
  23. languages/wpfront-notification-bar-de_DE/wpfront-notification-bar-de_DE.po +0 -341
  24. languages/wpfront-notification-bar-de_DE/wpfront-notification-bar.pot +0 -337
  25. languages/wpfront-notification-bar-hu_HU.mo +0 -0
  26. languages/wpfront-notification-bar-hu_HU/readme.txt +0 -1
  27. languages/wpfront-notification-bar-hu_HU/wpfront-notification-bar-hu_HU.mo +0 -0
  28. languages/wpfront-notification-bar-hu_HU/wpfront-notification-bar-hu_HU.po +0 -503
  29. languages/wpfront-notification-bar-sr_RS.mo +0 -0
  30. languages/wpfront-notification-bar-sr_RS/readme.txt +0 -1
  31. languages/wpfront-notification-bar-sr_RS/wpfront-notification-bar-sr_RS.mo +0 -0
  32. languages/wpfront-notification-bar-sr_RS/wpfront-notification-bar-sr_RS.po +0 -502
  33. readme.txt +20 -4
  34. templates/notification-bar-template.php +40 -7
  35. templates/options-template.php +550 -488
  36. wpfront-notification-bar.php +4 -2
classes/base/class-wpfront-base-menu.php DELETED
@@ -1,256 +0,0 @@
1
- <?php
2
- /*
3
- WPFront Plugins Base Menu
4
- Copyright (C) 2013, WPFront.com
5
- Website: wpfront.com
6
- Contact: syam@wpfront.com
7
-
8
- WPFront Plugins are distributed under the GNU General Public License, Version 3,
9
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
10
- St, Fifth Floor, Boston, MA 02110, USA
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
13
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
16
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
17
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
- */
23
-
24
- if (!class_exists('WPFront_Base_Menu')) {
25
-
26
- class WPFront_Base_Menu {
27
-
28
- const MENU_SLUG = 'wpfront-plugins';
29
-
30
- private static $wpfrontBase = NULL;
31
- private static $wpfrontBaseMenu = NULL;
32
-
33
- function __construct($wpfrontBase) {
34
- if (self::$wpfrontBase == NULL) {
35
- self::$wpfrontBase = $wpfrontBase;
36
- self::$wpfrontBaseMenu = $this;
37
- } else {
38
- if (version_compare($this->version(), self::$wpfrontBaseMenu->version()) > 0) {
39
- self::$wpfrontBase = $wpfrontBase;
40
- self::$wpfrontBaseMenu = $this;
41
- }
42
- }
43
- }
44
-
45
- protected function version() {
46
- return '1.0';
47
- }
48
-
49
- protected function print_column_headers($tag = 'thead') {
50
- echo '<' . $tag . '><tr>'
51
- . '<th class="check-column"></th>'
52
- . '<th scope="col" id="name" class="manage-column column-name">' . $this->__('Name') . '</th>'
53
- . '<th scope="col" id="version" class="manage-column column-version">' . $this->__('Version') . '</th>'
54
- . '<th scope="col" id="rating" class="manage-column column-rating">' . $this->__('Rating') . '</th>'
55
- . '<th scope="col" id="description" class="manage-column column-description">' . $this->__('Description') . '</th>'
56
- . '</tr></' . $tag . '>';
57
- }
58
-
59
- protected function print_column_footers() {
60
- $this->print_column_headers('tfoot');
61
- }
62
-
63
- protected function wp_star_rating($args) {
64
- if (function_exists('wp_star_rating')) {
65
- echo wp_star_rating($args);
66
- return;
67
- }
68
-
69
- echo '<div class="star-holder" title="' . sprintf($this->__('based on %s rating(s)'), number_format_i18n($args['number'])) . '">'
70
- . '<div class="star star-rating" style="width:' . esc_attr(str_replace(',', '.', $args['rating'])) . 'px"></div>'
71
- . '</div>';
72
- }
73
-
74
- protected function create_plugin_list() {
75
- if (isset($_GET['action'])) {
76
- if ($_GET['action'] == 'activate') {
77
- if (isset($_GET['plugin'])) {
78
- activate_plugin($_GET['plugin'] . '/' . $_GET['plugin'] . '.php');
79
- // echo '<script type="text/javascript">window.location="' . WPFront_Static::self_admin_url('admin.php?page=' . self::MENU_SLUG) . '";</script>';
80
- // wp_die();
81
- // return;
82
- }
83
- }
84
- }
85
-
86
- $plugins_allowedtags = array(
87
- 'a' => array('href' => array(), 'title' => array(), 'target' => array()),
88
- 'abbr' => array('title' => array()), 'acronym' => array('title' => array()),
89
- 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),
90
- 'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
91
- );
92
-
93
- if (!function_exists('plugins_api'))
94
- require_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
95
- add_thickbox();
96
-
97
- $args = array();
98
- $args['page'] = 1;
99
- $args['per_page'] = 30;
100
- $args['author'] = 'syammohanm';
101
-
102
- $api = plugins_api('query_plugins', $args);
103
-
104
- if (is_wp_error($api)) {
105
- wp_die($this->__('Unable to communicate with WordPress.org'));
106
- return;
107
- }
108
- ?>
109
- <style type="text/css">
110
- div.wpfront-container table.plugins {
111
- margin-top: 16px;
112
- margin-bottom: 16px;
113
- }
114
- div.wpfront-container table.plugins th.check-column {
115
- width: 0px;
116
- }
117
- div.wpfront-container div.footer {
118
- text-align: center;
119
- }
120
- </style>
121
- <?php
122
- echo '<div class="wrap wpfront-container">';
123
- echo '<h2>' . $this->__('WPFront Plugins') . '</h2>';
124
- echo '<table class="wp-list-table widefat plugins plugin-install">';
125
- $this->print_column_headers();
126
-
127
- foreach ((array) $api->plugins as $plugin) {
128
- if (is_object($plugin))
129
- $plugin = (array) $plugin;
130
-
131
- $title = wp_kses($plugin['name'], $plugins_allowedtags);
132
- $description = strip_tags($plugin['description']);
133
- if (strlen($description) > 400)
134
- $description = mb_substr($description, 0, 400) . '&#8230;';
135
- //remove any trailing entities
136
- $description = preg_replace('/&[^;\s]{0,6}$/', '', $description);
137
- //strip leading/trailing & multiple consecutive lines
138
- $description = trim($description);
139
- $description = preg_replace("|(\r?\n)+|", "\n", $description);
140
- //\n => <br>
141
- $description = nl2br($description);
142
- $version = wp_kses($plugin['version'], $plugins_allowedtags);
143
-
144
- $name = strip_tags($title . ' ' . $version);
145
- $author = $plugin['author'];
146
- if (!empty($plugin['author']))
147
- $author = ' <cite>' . sprintf($this->__('By %s'), $author) . '.</cite>';
148
-
149
- $author = wp_kses($author, $plugins_allowedtags);
150
-
151
- $action_links = array();
152
- $action_links[] = '<a href="' . WPFront_Static::self_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] .
153
- '&amp;TB_iframe=true&amp;width=600&amp;height=550') . '" class="thickbox" title="' .
154
- esc_attr(sprintf($this->__('More information about %s'), $name)) . '">' . $this->__('Details') . '</a>';
155
-
156
- $class = 'inactive';
157
- if (current_user_can('install_plugins') || current_user_can('update_plugins')) {
158
- $status = install_plugin_install_status($plugin);
159
-
160
- switch ($status['status']) {
161
- case 'install':
162
- if ($status['url'])
163
- $action_links[] = '<a class="install-now" href="' . $status['url'] . '" title="' . esc_attr(sprintf($this->__('Install %s'), $name)) . '">' . $this->__('Install Now') . '</a>';
164
- $class = 'active';
165
- break;
166
- case 'update_available':
167
- if ($status['url'])
168
- $action_links[] = '<a href="' . $status['url'] . '" title="' . esc_attr(sprintf($this->__('Update to version %s'), $status['version'])) . '">' . sprintf($this->__('Update Now'), $status['version']) . '</a>';
169
- $class = 'active update';
170
- break;
171
- case 'latest_installed':
172
- case 'newer_installed':
173
- $action_links[] = '<span title="' . esc_attr__($this->__('This plugin is already installed and is up to date')) . ' ">' . $this->__('Installed') . '</span>';
174
- if (is_plugin_active($plugin['slug'] . '/' . $plugin['slug'] . '.php'))
175
- $action_links[] = '<a href="' . WPFront_Static::self_admin_url('admin.php?page=' . $plugin['slug']) . '">' . $this->__('Settings') . '</a>';
176
- else
177
- $action_links[] = '<a href="' . WPFront_Static::self_admin_url('admin.php?page=' . self::MENU_SLUG . '&action=activate&plugin=' . $plugin['slug']) . '">' . $this->__('Activate') . '</a>';
178
- break;
179
- }
180
- }
181
- $action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
182
- ?>
183
- <tr class="<?php echo $class; ?>">
184
- <th class="check-column"></th>
185
- <td class="name column-name"><strong><?php echo $title; ?></strong>
186
- <div class="action-links"><?php if (!empty($action_links)) echo implode(' | ', $action_links); ?></div>
187
- </td>
188
- <td class="vers column-version"><?php echo $version; ?></td>
189
- <td class="vers column-rating">
190
- <?php $this->wp_star_rating(array('rating' => $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'])); ?>
191
- </td>
192
- <td class="desc column-description"><?php echo $description, $author; ?></td>
193
- </tr>
194
- <?php
195
- }
196
-
197
- $this->print_column_footers();
198
- echo '</table>';
199
- echo '<div class="footer"><a href="http://wpfront.com/contact" target="_blank">' . $this->__('Feedback') . '</a> | <a href="http://wpfront.com" target="_blank">wpfront.com</a></div>';
200
- echo '</div>';
201
- }
202
-
203
- public static function plugin_list() {
204
- self::$wpfrontBaseMenu->create_plugin_list();
205
- }
206
-
207
- protected function __($key) {
208
- return self::$wpfrontBase->__($key);
209
- }
210
-
211
- protected function create_admin_menu($menu_data) {
212
- $menu_slug = self::MENU_SLUG;
213
-
214
- global $admin_page_hooks, $submenu;
215
- if (!isset($admin_page_hooks[$menu_slug])) {
216
- add_menu_page($this->__('WPFront'), $this->__('WPFront'), 'manage_options', $menu_slug, null, self::$wpfrontBase->pluginURL() . 'classes/base/images/wpfront_menu.png');
217
- add_submenu_page($menu_slug, $this->__('WPFront Plugins'), $this->__('All Plugins'), 'manage_options', $menu_slug, array('WPFront_Base_Menu', 'plugin_list'));
218
- }
219
-
220
- if (empty($submenu[$menu_slug])) {
221
- return;
222
- }
223
-
224
- //$extra_menu = array_pop($submenu[$menu_slug]);
225
-
226
- foreach ($menu_data as $value) {
227
- $flag = FALSE;
228
-
229
- foreach ($submenu[$menu_slug] as $s) {
230
- if ($s[2] == $value['slug']) {
231
- $flag = TRUE;
232
- break;
233
- }
234
- }
235
-
236
- if ($flag == TRUE)
237
- continue;
238
-
239
- $page_hook_suffix = add_submenu_page($menu_slug, $value['title'], $value['link'], 'manage_options', $value['slug'], array($value['this'], 'options_page'));
240
-
241
- add_action('admin_print_scripts-' . $page_hook_suffix, array($value['this'], 'enqueue_options_scripts'));
242
- add_action('admin_print_styles-' . $page_hook_suffix, array($value['this'], 'enqueue_options_styles'));
243
- }
244
-
245
- //usort($submenu[$menu_slug], array('WPFront_Base', 'submenu_compare'));
246
- //$submenu[$menu_slug][] = $extra_menu;
247
- }
248
-
249
- public static function admin_menu($menu_data) {
250
- self::$wpfrontBaseMenu->create_admin_menu($menu_data);
251
- }
252
-
253
- }
254
-
255
- }
256
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/base/class-wpfront-base.php DELETED
@@ -1,212 +0,0 @@
1
- <?php
2
-
3
- /*
4
- WPFront Plugins Base
5
- Copyright (C) 2013, WPFront.com
6
- Website: wpfront.com
7
- Contact: syam@wpfront.com
8
-
9
- WPFront Plugins are distributed under the GNU General Public License, Version 3,
10
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
11
- St, Fifth Floor, Boston, MA 02110, USA
12
-
13
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- */
24
-
25
- require_once("class-wpfront-static.php");
26
- require_once("class-wpfront-base-menu.php");
27
-
28
- if (!class_exists('WPFront_Base')) {
29
-
30
- /**
31
- * Plugin framework base class
32
- *
33
- * @author Syam Mohan <syam@wpfront.com>
34
- * @copyright 2013 WPFront.com
35
- */
36
- class WPFront_Base {
37
-
38
- private $plugin_slug;
39
- private $options_page_slug;
40
- protected $pluginURLRoot;
41
- protected $pluginDIRRoot;
42
- private static $menu_data = array();
43
-
44
- function __construct($file, $pluginSlug, $wpfrontBaseMenu = NULL) {
45
- $this->plugin_slug = $pluginSlug;
46
- $this->options_page_slug = $this->plugin_slug;
47
- if ($wpfrontBaseMenu == NULL)
48
- $wpfrontBaseMenu = new WPFront_Base_Menu($this);
49
-
50
- $this->pluginURLRoot = plugins_url() . '/' . $this->plugin_slug . '/';
51
- $this->pluginDIRRoot = dirname($file) . '/../';
52
-
53
- add_action('init', array(&$this, 'init'));
54
- add_action('plugins_loaded', array(&$this, 'plugins_loaded_base'));
55
-
56
- //register actions
57
- if (is_admin()) {
58
- add_action('admin_init', array(&$this, 'admin_init'));
59
- add_action('admin_menu', array(&$this, 'admin_menu'));
60
- add_filter('plugin_action_links', array(&$this, 'action_links'), 10, 2);
61
- } else {
62
- add_action('wp_enqueue_scripts', array(&$this, 'enqueue_styles'));
63
- add_action('wp_enqueue_scripts', array(&$this, 'enqueue_scripts'));
64
- }
65
- }
66
-
67
- protected function add_menu($title, $link) {
68
- self::$menu_data[] = array(
69
- 'title' => $title,
70
- 'link' => $link,
71
- 'this' => $this,
72
- 'slug' => $this->options_page_slug
73
- );
74
- }
75
-
76
- public function init() {
77
-
78
- }
79
-
80
- public function plugins_loaded_base() {
81
- //for localization
82
- load_plugin_textdomain($this->plugin_slug, FALSE, $this->plugin_slug . '/languages/');
83
-
84
- $this->plugins_loaded();
85
- }
86
-
87
- public function plugins_loaded() {
88
-
89
- }
90
-
91
- public function admin_init() {
92
-
93
- }
94
-
95
- public function admin_menu() {
96
- WPFront_Base_Menu::admin_menu(self::$menu_data);
97
- }
98
-
99
- public static function submenu_compare($a, $b) {
100
- return strcmp($a[0], $b[0]);
101
- }
102
-
103
- public function action_links($links, $file) {
104
- if ($file == $this->plugin_slug . '/' . $this->plugin_slug . '.php') {
105
- $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/options-general.php?page=' . $this->options_page_slug . '">' . $this->__('Settings') . '</a>';
106
- array_unshift($links, $settings_link);
107
- }
108
- return $links;
109
- }
110
-
111
- public function enqueue_styles() {
112
-
113
- }
114
-
115
- public function enqueue_scripts() {
116
-
117
- }
118
-
119
- public function enqueue_options_styles() {
120
-
121
- }
122
-
123
- public function enqueue_options_scripts() {
124
-
125
- }
126
-
127
- //creates options page
128
- public function options_page() {
129
- if (!current_user_can('manage_options')) {
130
- wp_die($this->__('You do not have sufficient permissions to access this page.'));
131
- return;
132
- }
133
-
134
- include($this->pluginDIRRoot . 'templates/options-template.php');
135
- }
136
-
137
- protected function options_page_header($title, $optionsGroupName) {
138
- echo '<div class="wrap">';
139
- @screen_icon($this->options_page_slug);
140
- echo '<h2>' . $title . '</h2>';
141
- echo '<div id="' . $this->options_page_slug . '-options" class="inside">';
142
- echo '<form method="post" action="options.php">';
143
- @settings_fields($optionsGroupName);
144
- @do_settings_sections($this->options_page_slug);
145
-
146
- if ((isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true') || (isset($_GET['updated']) && $_GET['updated'] == 'true')) {
147
- echo '
148
- <div class="updated">
149
- <p>
150
- <strong>' . $this->__('If you have a caching plugin, clear the cache for the new settings to take effect.') . '</strong>
151
- </p>
152
- </div>
153
- ';
154
- }
155
- }
156
-
157
- protected function options_page_footer($settingsLink, $FAQLink, $extraLinks = NULL) {
158
- @$this->submit_button();
159
-
160
- if ($extraLinks != NULL) {
161
- foreach ($extraLinks as $value) {
162
- echo '<a href="' . $value['href'] . '" target="' . $value['target'] . '">' . $value['text'] . '</a>';
163
- echo ' | ';
164
- }
165
- }
166
-
167
- echo '
168
- <a href="http://wpfront.com/' . $settingsLink . '" target="_blank">' . $this->__('Settings Description') . '</a>
169
- |
170
- <a href="http://wpfront.com/' . $FAQLink . '" target="_blank">' . $this->__('Plugin FAQ') . '</a>
171
- |
172
- <a href="http://wpfront.com/contact/" target="_blank">' . $this->__('Feature Request') . '</a>
173
- |
174
- <a href="http://wpfront.com/contact/" target="_blank">' . $this->__('Report Bug') . '</a>
175
- |
176
- <a href="http://wordpress.org/support/view/plugin-reviews/' . $this->plugin_slug . '" target="_blank">' . $this->__('Write Review') . '</a>
177
- |
178
- <a href="http://wpfront.com/contact/" target="_blank">' . $this->__('Contact Me') . '</a>
179
- |
180
- <a href="http://wpfront.com/donate/" target="_blank">' . $this->__('Buy me a Beer or Coffee') . '</a>
181
- ';
182
- echo '</form>';
183
- echo '</div>';
184
- echo '</div>';
185
- }
186
-
187
- //returns localized string
188
- public function __($key) {
189
- return __($key, $this->plugin_slug);
190
- }
191
-
192
- //for compatibility
193
- public function submit_button() {
194
- if (function_exists('submit_button')) {
195
- submit_button();
196
- } else {
197
- echo '<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="' . $this->__('Save Changes') . '" /></p>';
198
- }
199
- }
200
-
201
- public function pluginURL() {
202
- return $this->pluginURLRoot;
203
- }
204
-
205
- public function pluginDIR() {
206
- return $this->pluginDIRRoot;
207
- }
208
-
209
- }
210
-
211
- }
212
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/base/class-wpfront-options-base.php CHANGED
@@ -106,7 +106,7 @@ if (!class_exists('WPFront_Options_Base')) {
106
  }
107
 
108
  //sets the label of the option, for POEDIT compatibility
109
- protected function __($label) {
110
  $this->__data[$this->lastOptionName . '_label']['label'] = $label;
111
  }
112
 
106
  }
107
 
108
  //sets the label of the option, for POEDIT compatibility
109
+ protected function label($label) {
110
  $this->__data[$this->lastOptionName . '_label']['label'] = $label;
111
  }
112
 
classes/base/class-wpfront-static.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
-
3
- /*
4
- WPFront Plugins Static Helpers
5
- Copyright (C) 2013, WPFront.com
6
- Website: wpfront.com
7
- Contact: syam@wpfront.com
8
-
9
- WPFront Plugins are distributed under the GNU General Public License, Version 3,
10
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
11
- St, Fifth Floor, Boston, MA 02110, USA
12
-
13
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- */
24
-
25
- if (!class_exists('WPFront_Static')) {
26
-
27
- /**
28
- * Plugin framework static helpers
29
- *
30
- * @author Syam Mohan <syam@wpfront.com>
31
- * @copyright 2013 WPFront.com
32
- */
33
- class WPFront_Static {
34
-
35
- public static function is_admin_bar_showing() {
36
- if (function_exists('is_admin_bar_showing')) {
37
- return is_admin_bar_showing();
38
- }
39
-
40
- return FALSE;
41
- }
42
-
43
- public static function self_admin_url($path = '', $scheme = 'admin') {
44
- if (function_exists('self_admin_url'))
45
- return self_admin_url($path, $scheme);
46
-
47
- return admin_url($path, $scheme);
48
- }
49
-
50
- public static function doing_ajax() {
51
- if (defined('DOING_AJAX') && DOING_AJAX) {
52
- return TRUE;
53
- }
54
-
55
- if (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST) {
56
- return TRUE;
57
- }
58
-
59
- if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
60
- return TRUE;
61
- }
62
-
63
- return FALSE;
64
- }
65
-
66
- }
67
-
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class-wpfront-notification-bar-options.php CHANGED
@@ -38,52 +38,62 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
38
  parent::__construct($optionName, $pluginSlug);
39
 
40
  //add the options required for this plugin
41
- $this->addOption('enabled', 'bit', FALSE)->__('Enabled');
42
- $this->addOption('position', 'int', 1, array($this, 'validate_1or2'))->__('Position');
43
- $this->addOption('height', 'int', 0, array($this, 'validate_zero_positive'))->__('Bar Height');
44
- $this->addOption('message', 'string', '')->__('Message Text');
45
- $this->addOption('message_process_shortcode', 'bit', FALSE)->__('Process Shortcode');
46
- $this->addOption('display_after', 'int', 1, array($this, 'validate_zero_positive'))->__('Display After');
47
- $this->addOption('animate_delay', 'float', 0.5, array($this, 'validate_zero_positive'))->__('Animation Duration');
48
- $this->addOption('close_button', 'bool', FALSE)->__('Display Close Button');
49
- $this->addOption('auto_close_after', 'int', 0, array($this, 'validate_zero_positive'))->__('Auto Close After');
50
- $this->addOption('display_button', 'bool', FALSE)->__('Display Button');
51
- $this->addOption('button_text', 'string', '')->__('Button Text');
52
- $this->addOption('button_action', 'int', 1, array($this, 'validate_1or2'))->__('Button Action');
53
- $this->addOption('button_action_url', 'string', '')->__('Open URL:');
54
- $this->addOption('button_action_new_tab', 'bool', FALSE)->__('Open URL in new tab/window');
55
- $this->addOption('button_action_url_nofollow', 'bool', FALSE)->__('No follow link');
56
- $this->addOption('button_action_javascript', 'string', '')->__('Execute JavaScript');
57
- $this->addOption('button_action_close_bar', 'bit', FALSE)->__('Close Bar on Button Click');
58
- $this->addOption('display_shadow', 'bit', FALSE)->__('Display Shadow');
59
- $this->addOption('fixed_position', 'bit', FALSE)->__('Fixed at Position');
60
- $this->addOption('message_color', 'string', '#ffffff', array($this, 'validate_color'))->__('Message Text Color');
61
- $this->addOption('bar_from_color', 'string', '#888888', array($this, 'validate_color'))->__('From Color');
62
- $this->addOption('bar_to_color', 'string', '#000000', array($this, 'validate_color'))->__('To Color');
63
- $this->addOption('button_from_color', 'string', '#00b7ea', array($this, 'validate_color'))->__('From Color');
64
- $this->addOption('button_to_color', 'string', '#009ec3', array($this, 'validate_color'))->__('To Color');
65
- $this->addOption('button_text_color', 'string', '#ffffff', array($this, 'validate_color'))->__('Button Text Color');
66
- $this->addOption('display_pages', 'int', '1', array($this, 'validate_display_pages'))->__('Display on Pages');
67
- $this->addOption('include_pages', 'string', '');
68
- $this->addOption('exclude_pages', 'string', '');
69
- $this->addOption('display_open_button', 'bit', false)->__('Display Reopen Button');
70
- $this->addOption('open_button_color', 'string', '#00b7ea')->__('Reopen Button Color');
71
- $this->addOption('keep_closed', 'bit', FALSE)->__('Keep Closed');
72
- $this->addOption('keep_closed_for', 'int', 0, array($this, 'validate_zero_positive'))->__('Keep Closed For');
73
- $this->addOption('position_offset', 'int', 0)->__('Position Offset');
74
- $this->addOption('custom_css', 'string', '')->__('Custom CSS');
75
- $this->addOption('close_button_color', 'string', '#555555', array($this, 'validate_color'))->__('Close Button Color');
 
 
 
 
76
  $this->addOption('close_button_color_hover', 'string', '#aaaaaa', array($this, 'validate_color'));
77
  $this->addOption('close_button_color_x', 'string', '#000000', array($this, 'validate_color'));
78
- $this->addOption('display_roles', 'int', '1', array($this, 'validate_display_roles'))->__('Display for User Roles');
79
  $this->addOption('include_roles', 'string', array(), array($this, 'validate_include_roles'));
80
- $this->addOption('display_scroll', 'bit', false)->__('Display on Scroll');
81
- $this->addOption('display_scroll_offset', 'int', '100', array($this, 'validate_zero_positive'))->__('Scroll Offset');
82
- $this->addOption('start_date', 'string', '', array($this, 'validate_date_range'))->__('Start Date & Time');
83
- $this->addOption('end_date', 'string', '', array($this, 'validate_date_range'))->__('End Date & Time');
84
- $this->addOption('start_time', 'string', '', array($this, 'validate_date_range'))->__('Start Time');
85
- $this->addOption('end_time', 'string', '', array($this, 'validate_date_range'))->__('End Time');
86
- $this->addOption('wp_emember_integration', 'bit', FALSE);
 
 
 
 
 
 
87
  }
88
 
89
  //validation function
@@ -151,7 +161,42 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
151
 
152
  return $timestamp;
153
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  }
156
 
157
  }
38
  parent::__construct($optionName, $pluginSlug);
39
 
40
  //add the options required for this plugin
41
+ $this->addOption('enabled', 'bit', false)->label(__('Enabled', 'wpfront-notification-bar'));
42
+ $this->addOption('preview_mode', 'bit', false)->label(__('Preview Mode', 'wpfront-notification-bar'));
43
+ $this->addOption('debug_mode', 'bit', false)->label(__('Debug Mode', 'wpfront-notification-bar'));
44
+ $this->addOption('position', 'int', 1, array($this, 'validate_1or2'))->label(__('Position', 'wpfront-notification-bar'));
45
+ $this->addOption('height', 'int', 0, array($this, 'validate_zero_positive'))->label(__('Bar Height', 'wpfront-notification-bar'));
46
+ $this->addOption('message', 'string', '')->label(__('Message Text', 'wpfront-notification-bar'));
47
+ $this->addOption('message_process_shortcode', 'bit', false)->label(__('Process Shortcode', 'wpfront-notification-bar'));
48
+ $this->addOption('display_after', 'int', 1, array($this, 'validate_zero_positive'))->label(__('Display After', 'wpfront-notification-bar'));
49
+ $this->addOption('animate_delay', 'float', 0.5, array($this, 'validate_zero_positive'))->label(__('Animation Duration', 'wpfront-notification-bar'));
50
+ $this->addOption('close_button', 'bool', false)->label(__('Display Close Button', 'wpfront-notification-bar'));
51
+ $this->addOption('auto_close_after', 'int', 0, array($this, 'validate_zero_positive'))->label(__('Auto Close After', 'wpfront-notification-bar'));
52
+ $this->addOption('display_button', 'bool', false)->label(__('Display Button', 'wpfront-notification-bar'));
53
+ $this->addOption('button_text', 'string', '')->label(__('Button Text', 'wpfront-notification-bar'));
54
+ $this->addOption('button_action', 'int', 1, array($this, 'validate_1or2'))->label(__('Button Action', 'wpfront-notification-bar'));
55
+ $this->addOption('button_action_url', 'string', '')->label(__('Open URL:', 'wpfront-notification-bar'));
56
+ $this->addOption('button_action_new_tab', 'bool', false)->label(__('Open URL in new tab/window', 'wpfront-notification-bar'));
57
+ $this->addOption('button_action_url_nofollow', 'bool', false)->label(__('No follow link', 'wpfront-notification-bar'));
58
+ $this->addOption('button_action_url_noreferrer', 'bool', false)->label(__('No referrer link', 'wpfront-notification-bar'));
59
+ $this->addOption('button_action_url_noopener', 'bool', true)->label(__('No opener link', 'wpfront-notification-bar'));
60
+ $this->addOption('button_action_javascript', 'string', '')->label(__('Execute JavaScript', 'wpfront-notification-bar'));
61
+ $this->addOption('button_action_close_bar', 'bit', false)->label(__('Close Bar on Button Click', 'wpfront-notification-bar'));
62
+ $this->addOption('display_shadow', 'bit', false)->label(__('Display Shadow', 'wpfront-notification-bar'));
63
+ $this->addOption('fixed_position', 'bit', false)->label(__('Fixed at Position', 'wpfront-notification-bar'));
64
+ $this->addOption('message_color', 'string', '#ffffff', array($this, 'validate_color'))->label(__('Message Text Color', 'wpfront-notification-bar'));
65
+ $this->addOption('bar_from_color', 'string', '#888888', array($this, 'validate_color'))->label(__('From Color', 'wpfront-notification-bar'));
66
+ $this->addOption('bar_to_color', 'string', '#000000', array($this, 'validate_color'))->label(__('To Color', 'wpfront-notification-bar'));
67
+ $this->addOption('button_from_color', 'string', '#00b7ea', array($this, 'validate_color'))->label(__('From Color', 'wpfront-notification-bar'));
68
+ $this->addOption('button_to_color', 'string', '#009ec3', array($this, 'validate_color'))->label(__('To Color', 'wpfront-notification-bar'));
69
+ $this->addOption('button_text_color', 'string', '#ffffff', array($this, 'validate_color'))->label(__('Button Text Color', 'wpfront-notification-bar'));
70
+ $this->addOption('display_pages', 'int', '1', array($this, 'validate_display_pages'))->label(__('Display on Pages', 'wpfront-notification-bar'));
71
+ $this->addOption('include_pages', 'string', '', array($this, 'validate_include_exclude_pages'));
72
+ $this->addOption('exclude_pages', 'string', '', array($this, 'validate_include_exclude_pages'));
73
+ $this->addOption('display_open_button', 'bit', false)->label(__('Display Reopen Button', 'wpfront-notification-bar'));
74
+ $this->addOption('open_button_color', 'string', '#00b7ea')->label(__('Reopen Button Color', 'wpfront-notification-bar'));
75
+ $this->addOption('keep_closed', 'bit', false)->label(__('Keep Closed', 'wpfront-notification-bar'));
76
+ $this->addOption('keep_closed_for', 'int', 0, array($this, 'validate_zero_positive'))->label(__('Keep Closed For', 'wpfront-notification-bar'));
77
+ $this->addOption('position_offset', 'int', 0)->label(__('Position Offset', 'wpfront-notification-bar'));
78
+ $this->addOption('custom_css', 'string', '')->label(__('Custom CSS', 'wpfront-notification-bar'));
79
+ $this->addOption('close_button_color', 'string', '#555555', array($this, 'validate_color'))->label(__('Close Button Color', 'wpfront-notification-bar'));
80
  $this->addOption('close_button_color_hover', 'string', '#aaaaaa', array($this, 'validate_color'));
81
  $this->addOption('close_button_color_x', 'string', '#000000', array($this, 'validate_color'));
82
+ $this->addOption('display_roles', 'int', '1', array($this, 'validate_display_roles'))->label(__('Display for User Roles', 'wpfront-notification-bar'));
83
  $this->addOption('include_roles', 'string', array(), array($this, 'validate_include_roles'));
84
+ $this->addOption('display_scroll', 'bit', false)->label(__('Display on Scroll', 'wpfront-notification-bar'));
85
+ $this->addOption('display_scroll_offset', 'int', '100', array($this, 'validate_zero_positive'))->label(__('Scroll Offset', 'wpfront-notification-bar'));
86
+ $this->addOption('start_date', 'string', '', array($this, 'validate_date_range'))->label(__('Start Date & Time', 'wpfront-notification-bar'));
87
+ $this->addOption('end_date', 'string', '', array($this, 'validate_date_range'))->label(__('End Date & Time', 'wpfront-notification-bar'));
88
+ $this->addOption('start_time', 'string', '', array($this, 'validate_date_range'))->label(__('Start Time', 'wpfront-notification-bar'));
89
+ $this->addOption('end_time', 'string', '', array($this, 'validate_date_range'))->label(__('End Time', 'wpfront-notification-bar'));
90
+ $this->addOption('wp_emember_integration', 'bit', false);
91
+ $this->addOption('landingpage_cookie_name', 'string', 'wpfront-notification-bar-landingpage', array($this, 'validate_landingpage_cookie_name'))->label(__('Landing Page Cookie Name', 'wpfront-notification-bar'));
92
+ $this->addOption('keep_closed_cookie_name', 'string', 'wpfront-notification-bar-keep-closed', array($this, 'validate_keep_closed_cookie_name'))->label(__('Keep Closed Cookie Name', 'wpfront-notification-bar'));
93
+ $this->addOption('hide_small_device', 'bit', false)->label(__('Hide on Small Devices', 'wpfront-notification-bar'));
94
+ $this->addOption('small_device_width', 'int', 640, array($this, 'validate_zero_positive'))->label(__('Small Device Max Width', 'wpfront-notification-bar'));
95
+ $this->addOption('hide_small_window', 'bit', false)->label(__('Hide on Small Window', 'wpfront-notification-bar'));
96
+ $this->addOption('small_window_width', 'int', 640, array($this, 'validate_zero_positive'))->label(__('Small Window Max Width', 'wpfront-notification-bar'));
97
  }
98
 
99
  //validation function
161
 
162
  return $timestamp;
163
  }
164
+
165
+ protected function validate_landingpage_cookie_name($arg) {
166
+ if (trim($arg) == '') {
167
+ return 'wpfront-notification-bar-landingpage';
168
+ }
169
+
170
+ return $arg;
171
+ }
172
+
173
+ protected function validate_keep_closed_cookie_name($arg) {
174
+ if (trim($arg) == '') {
175
+ return 'wpfront-notification-bar-keep-closed';
176
+ }
177
+
178
+ return $arg;
179
+ }
180
+
181
+ protected function validate_include_exclude_pages($pages) {
182
+ if(strpos($pages, '.') === false) {
183
+ return $pages;
184
+ }
185
+
186
+ $pages = explode(',', $pages);
187
 
188
+ for($i = 0; $i < count($pages); $i++) {
189
+ $e = explode('.', $pages[$i]);
190
+ if(count($e) > 1) {
191
+ $pages[$i] = $e[1];
192
+ } else {
193
+ $pages[$i] = $e[0];
194
+ }
195
+ }
196
+
197
+ return implode(',', $pages);
198
+ }
199
+
200
  }
201
 
202
  }
classes/class-wpfront-notification-bar.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /*
4
  WPFront Notification Bar Plugin
5
  Copyright (C) 2013, WPFront.com
@@ -22,7 +21,6 @@
22
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
  */
24
 
25
- require_once("base/class-wpfront-base.php");
26
  require_once("class-wpfront-notification-bar-options.php");
27
 
28
  if (!class_exists('WPFront_Notification_Bar')) {
@@ -33,112 +31,222 @@ if (!class_exists('WPFront_Notification_Bar')) {
33
  * @author Syam Mohan <syam@wpfront.com>
34
  * @copyright 2013 WPFront.com
35
  */
36
- class WPFront_Notification_Bar extends WPFront_Base {
37
 
38
  //Constants
39
- const VERSION = '1.7.1';
40
  const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
41
  const OPTION_NAME = 'wpfront-notification-bar-options';
42
  const PLUGIN_SLUG = 'wpfront-notification-bar';
43
- //cookie names
44
- const COOKIE_LANDINGPAGE = 'wpfront-notification-bar-landingpage';
45
  //role consts
46
  const ROLE_NOROLE = 'wpfront-notification-bar-role-_norole_';
47
  const ROLE_GUEST = 'wpfront-notification-bar-role-_guest_';
48
 
49
  //Variables
50
- protected $options;
 
51
  private $markupLoaded;
52
  private $scriptLoaded;
 
 
 
 
 
 
 
 
 
53
 
54
- function __construct() {
55
- parent::__construct(__FILE__, self::PLUGIN_SLUG);
 
 
56
 
57
- $this->markupLoaded = FALSE;
58
  }
59
 
60
- public function init() {
61
- //for landing page tracking
62
- if (!isset($_COOKIE[self::COOKIE_LANDINGPAGE])) {
63
- setcookie(self::COOKIE_LANDINGPAGE, 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
  }
66
-
67
- public function admin_menu() {
68
- $page_hook_suffix = add_options_page($this->__('WPFront Notification Bar'), $this->__('Notification Bar'), 'manage_options', self::PLUGIN_SLUG, array($this, 'options_page'));
69
 
70
- add_action('admin_print_scripts-' . $page_hook_suffix, array($this, 'enqueue_options_scripts'));
71
- add_action('admin_print_styles-' . $page_hook_suffix, array($this, 'enqueue_options_styles'));
 
72
  }
73
 
74
- //add scripts
75
- public function enqueue_scripts() {
76
- if ($this->enabled() == FALSE)
77
  return;
 
78
 
79
- $jsRoot = $this->pluginURLRoot . 'js/';
 
 
80
 
81
- wp_enqueue_script('jquery');
82
- wp_enqueue_script('jquery.cookie', $this->pluginURLRoot . 'jquery-plugins/jquery.c.js', array('jquery'), '1.4.0');
83
- wp_enqueue_script('wpfront-notification-bar', $jsRoot . 'wpfront-notification-bar.js', array('jquery'), self::VERSION);
84
 
85
- $this->scriptLoaded = TRUE;
 
86
 
87
- add_action('wp_footer', array(&$this, 'write_markup'));
88
- add_action('shutdown', array(&$this, 'write_markup'));
 
 
 
 
 
 
 
89
  }
90
 
91
- //add styles
92
- public function enqueue_styles() {
93
- if ($this->enabled() == FALSE)
 
 
 
 
 
 
 
94
  return;
 
 
 
 
 
 
 
 
95
 
96
- $cssRoot = $this->pluginURLRoot . 'css/';
 
 
 
97
 
98
- wp_enqueue_style('wpfront-notification-bar', $cssRoot . 'wpfront-notification-bar.css', array(), self::VERSION);
 
 
 
 
99
  }
100
 
101
  public function admin_init() {
102
  register_setting(self::OPTIONS_GROUP_NAME, self::OPTION_NAME);
103
  }
104
 
 
 
 
 
 
 
 
105
  //options page scripts
106
  public function enqueue_options_scripts() {
107
  $this->enqueue_scripts();
108
 
109
- wp_enqueue_script('jquery-ui-datepicker', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js', array('jquery'), '1.8.16');
110
-
111
- wp_enqueue_script('jquery-ui-timepicker', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-timepicker/1.8.8/jquery.timepicker.min.js', array('jquery'), '1.8.8');
112
 
113
- $jsRoot = $this->pluginURLRoot . 'jquery-plugins/colorpicker/js/';
114
- wp_enqueue_script('jquery.eyecon.colorpicker', $jsRoot . 'colorpicker.js', array('jquery', 'jquery-ui-datepicker'), self::VERSION);
115
 
116
- $jsRoot = $this->pluginURLRoot . 'jquery-plugins/';
117
- wp_enqueue_script('json2', $jsRoot . 'json2.min.js', array('jquery'), self::VERSION);
118
 
119
- // $jsRoot = $this->pluginURLRoot . 'js/';
120
- // wp_enqueue_script('wpfront-notification-bar-options', $jsRoot . 'options.js', array(), self::VERSION);
121
  }
122
 
123
  //options page styles
124
  public function enqueue_options_styles() {
125
  $this->enqueue_styles();
126
 
127
- $styleRoot = $this->pluginURLRoot . 'jquery-plugins/jquery-ui/smoothness/';
128
- wp_enqueue_style('jquery.ui.smoothness.datepicker', $styleRoot . 'jquery-ui-1.10.4.custom.min.css', array(), self::VERSION);
129
 
130
- wp_enqueue_style('jquery.ui.timepicker', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-timepicker/1.8.8/jquery.timepicker.min.css', array(), '1.8.8');
131
 
132
- $styleRoot = $this->pluginURLRoot . 'jquery-plugins/colorpicker/css/';
133
- wp_enqueue_style('jquery.eyecon.colorpicker.colorpicker', $styleRoot . 'colorpicker.css', array(), self::VERSION);
134
 
135
- $styleRoot = $this->pluginURLRoot . 'css/';
136
- wp_enqueue_style('wpfront-notification-bar-options', $styleRoot . 'options.css', array(), self::VERSION);
137
  }
138
 
139
- public function plugins_loaded() {
140
- //load plugin options
141
- $this->options = new WPFront_Notification_Bar_Options(self::OPTION_NAME, self::PLUGIN_SLUG);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  }
143
 
144
  //writes the html and script for the bar
@@ -151,16 +259,16 @@ if (!class_exists('WPFront_Notification_Bar')) {
151
  return;
152
  }
153
 
154
- if(WPFront_Static::doing_ajax()) {
155
  return;
156
  }
157
-
158
  if ($this->enabled()) {
159
- include($this->pluginDIRRoot . 'templates/notification-bar-template.php');
 
 
160
 
161
- echo '<script type="text/javascript">';
162
- echo 'if(typeof wpfront_notification_bar == "function") ';
163
- echo 'wpfront_notification_bar(' . json_encode(array(
164
  'position' => $this->options->position(),
165
  'height' => $this->options->height(),
166
  'fixed_position' => $this->options->fixed_position(),
@@ -169,33 +277,99 @@ if (!class_exists('WPFront_Notification_Bar')) {
169
  'button_action_close_bar' => $this->options->button_action_close_bar(),
170
  'auto_close_after' => $this->options->auto_close_after(),
171
  'display_after' => $this->options->display_after(),
172
- 'is_admin_bar_showing' => WPFront_Static::is_admin_bar_showing(),
173
  'display_open_button' => $this->options->display_open_button(),
174
  'keep_closed' => $this->options->keep_closed(),
175
  'keep_closed_for' => $this->options->keep_closed_for(),
176
  'position_offset' => $this->options->position_offset(),
177
  'display_scroll' => $this->options->display_scroll(),
178
  'display_scroll_offset' => $this->options->display_scroll_offset(),
179
- )) . ');';
180
- echo '</script>';
 
 
 
181
  }
182
 
183
- $this->markupLoaded = TRUE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  }
185
 
186
  protected function get_message_text() {
187
  $message = $this->options->message();
188
 
 
 
189
  if ($this->options->message_process_shortcode()) {
190
  $message = do_shortcode($message);
191
  }
192
 
193
  return $message;
194
  }
195
-
196
  protected function get_button_text() {
197
  $text = $this->options->button_text();
198
 
 
 
199
  if ($this->options->message_process_shortcode()) {
200
  $text = do_shortcode($text);
201
  }
@@ -206,21 +380,21 @@ if (!class_exists('WPFront_Notification_Bar')) {
206
  protected function get_filter_objects() {
207
  $objects = array();
208
 
209
- $objects['1.home'] = $this->__('[Page]') . ' ' . $this->__('Home');
210
 
211
- $pages = get_pages();
212
  foreach ($pages as $page) {
213
- $objects['1.' . $page->ID] = $this->__('[Page]') . ' ' . $page->post_title;
214
  }
215
 
216
- $posts = get_posts();
217
  foreach ($posts as $post) {
218
- $objects['2.' . $post->ID] = $this->__('[Post]') . ' ' . $post->post_title;
219
  }
220
 
221
  // $categories = get_categories();
222
  // foreach ($categories as $category) {
223
- // $objects['3.' . $category->cat_ID] = $this->__('[Category]') . ' ' . $category->cat_name;
224
  // }
225
 
226
  return $objects;
@@ -239,57 +413,67 @@ if (!class_exists('WPFront_Notification_Bar')) {
239
  }
240
 
241
  protected function filter() {
242
- if (is_admin())
243
- return TRUE;
 
 
244
 
245
  $now = current_time('mysql');
246
  $now = strtotime($now);
247
- $now = date('Y-m-d h:i a', $now);
248
- $now = strtotime($now);
249
 
250
  $start_date = $this->options->start_date();
251
  if ($start_date != NULL) {
252
  $start_date = date('Y-m-d', $start_date);
253
  $start_time = $this->options->start_time();
254
- if($start_time == NULL) {
255
  $start_time = '12:00 am';
256
  } else {
257
  $start_time = date('h:i a', $start_time);
258
  }
259
- $start_date = $start_date . ' ' . $start_time;
260
- $start_date = strtotime($start_date);
261
-
262
- if ($start_date > $now)
263
- return FALSE;
 
 
264
  }
265
-
266
  $end_date = $this->options->end_date();
267
  if ($end_date != NULL) {
268
  $end_date = date('Y-m-d', $end_date);
269
  $end_time = $this->options->end_time();
270
- if($end_time == NULL) {
271
  $end_time = '11:59 pm';
272
  } else {
273
  $end_time = date('h:i a', $end_time);
274
  }
275
-
276
- $end_date = $end_date . ' ' . $end_time;
277
- $end_date = strtotime($end_date);
278
-
279
- if ($end_date < $now)
280
- return FALSE;
 
 
281
  }
282
-
283
  switch ($this->options->display_roles()) {
284
  case 1:
285
  break;
286
  case 2:
287
- if (!$this->is_user_logged_in())
288
- return FALSE;
 
 
289
  break;
290
  case 3:
291
- if ($this->is_user_logged_in())
292
- return FALSE;
 
 
293
  break;
294
  case 4:
295
  global $current_user;
@@ -297,66 +481,73 @@ if (!class_exists('WPFront_Notification_Bar')) {
297
  $role = self::ROLE_GUEST;
298
  if ($this->is_user_logged_in())
299
  $role = self::ROLE_NOROLE;
300
- if (!in_array($role, $this->options->include_roles()))
301
- return FALSE;
 
 
302
  } else {
303
- $display = FALSE;
304
  foreach ($current_user->roles as $role) {
305
  if (in_array($role, $this->options->include_roles())) {
306
- $display = TRUE;
307
  break;
308
  }
309
  }
310
- if (!$display)
311
- return FALSE;
 
 
312
  }
313
  break;
314
  }
315
 
316
  switch ($this->options->display_pages()) {
317
  case 1:
318
- return TRUE;
319
  case 2:
320
- return !isset($_COOKIE[self::COOKIE_LANDINGPAGE]);
 
 
 
 
 
321
  case 3:
322
  case 4:
323
  global $post;
324
- $ID = FALSE;
325
- $type = FALSE;
 
 
326
  if (is_home()) {
327
  $ID = 'home';
328
- $type = 1;
329
  } elseif (is_singular()) {
330
- $post_type = get_post_type();
331
- if ($post_type == 'page') {
332
- $ID = $post->ID;
333
- $type = 1;
334
- } elseif ($post_type == 'post') {
335
- $ID = $post->ID;
336
- $type = 2;
337
- }
338
  }
339
  if ($this->options->display_pages() == 3) {
340
- if ($ID !== FALSE && $type !== FALSE) {
341
- if ($this->filter_pages_contains($this->options->include_pages(), $type . '.' . $ID) === FALSE)
342
- return FALSE;
343
- else
344
- return TRUE;
 
 
345
  }
346
- return FALSE;
347
  }
348
  if ($this->options->display_pages() == 4) {
349
- if ($ID !== FALSE && $type !== FALSE) {
350
- if ($this->filter_pages_contains($this->options->exclude_pages(), $type . '.' . $ID) === FALSE)
351
- return TRUE;
352
- else
353
- return FALSE;
 
 
354
  }
355
- return TRUE;
356
  }
357
  }
358
 
359
- return TRUE;
360
  }
361
 
362
  protected function is_user_logged_in() {
@@ -374,11 +565,94 @@ if (!class_exists('WPFront_Notification_Bar')) {
374
  }
375
 
376
  protected function enabled() {
 
 
 
 
377
  if ($this->options->enabled()) {
378
- return $this->filter();
 
 
 
 
 
 
 
 
379
  }
380
 
381
- return FALSE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  }
383
 
384
  }
1
  <?php
 
2
  /*
3
  WPFront Notification Bar Plugin
4
  Copyright (C) 2013, WPFront.com
21
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
  */
23
 
 
24
  require_once("class-wpfront-notification-bar-options.php");
25
 
26
  if (!class_exists('WPFront_Notification_Bar')) {
31
  * @author Syam Mohan <syam@wpfront.com>
32
  * @copyright 2013 WPFront.com
33
  */
34
+ class WPFront_Notification_Bar {
35
 
36
  //Constants
37
+ const VERSION = '1.8';
38
  const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
39
  const OPTION_NAME = 'wpfront-notification-bar-options';
40
  const PLUGIN_SLUG = 'wpfront-notification-bar';
41
+ const PLUGIN_FILE = 'wpfront-notification-bar/wpfront-notification-bar.php';
42
+ const PREVIEW_MODE_NAME = 'wpfront-notification-bar-preview-mode';
43
  //role consts
44
  const ROLE_NOROLE = 'wpfront-notification-bar-role-_norole_';
45
  const ROLE_GUEST = 'wpfront-notification-bar-role-_guest_';
46
 
47
  //Variables
48
+ private $plugin_file;
49
+ private $options;
50
  private $markupLoaded;
51
  private $scriptLoaded;
52
+ private $enabled = null;
53
+
54
+ private $logs = array();
55
+ private static $instance = null;
56
+
57
+ protected function __construct() {
58
+ $this->markupLoaded = false;
59
+ $this->min_file_suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
60
+ }
61
 
62
+ public static function Instance() {
63
+ if (empty(self::$instance)) {
64
+ self::$instance = new WPFront_Notification_Bar();
65
+ }
66
 
67
+ return self::$instance;
68
  }
69
 
70
+ public function init($plugin_file) {
71
+ $this->plugin_file = $plugin_file;
72
+
73
+ add_action('plugins_loaded', array($this, 'plugins_loaded'));
74
+
75
+ if (is_admin()) {
76
+ add_action('admin_init', array($this, 'admin_init'));
77
+ add_action('admin_menu', array($this, 'admin_menu'));
78
+ add_filter('plugin_action_links', array($this, 'plugin_action_links'), 10, 2);
79
+
80
+ add_action('update_option_wpfront-notification-bar-options', array($this, 'settings_updated'), 10, 2);
81
+
82
+ $this->add_activation_redirect();
83
+ } else {
84
+ add_action('template_redirect', array($this, 'set_landingpage_cookie'));
85
+
86
+ add_action('wp_enqueue_scripts', array($this, 'enqueue_styles'));
87
+ add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
88
  }
89
  }
 
 
 
90
 
91
+ protected function add_activation_redirect() {
92
+ add_action('activated_plugin', array($this, 'activated_plugin_callback'));
93
+ add_action('admin_init', array($this, 'admin_init_callback'), 999999);
94
  }
95
 
96
+ public function activated_plugin_callback($plugin) {
97
+ if ($plugin !== self::PLUGIN_FILE) {
 
98
  return;
99
+ }
100
 
101
+ if (is_network_admin() || isset($_GET['activate-multi'])) {
102
+ return;
103
+ }
104
 
105
+ $key = self::PLUGIN_SLUG . '-activation-redirect';
106
+ add_option($key, true);
107
+ }
108
 
109
+ public function admin_init_callback() {
110
+ $key = self::PLUGIN_SLUG . '-activation-redirect';
111
 
112
+ if (get_option($key, false)) {
113
+ delete_option($key);
114
+
115
+ if (is_network_admin() || isset($_GET['activate-multi'])) {
116
+ return;
117
+ }
118
+
119
+ wp_safe_redirect(menu_page_url(self::PLUGIN_SLUG, FALSE));
120
+ }
121
  }
122
 
123
+ public function set_landingpage_cookie() {
124
+ if(headers_sent()) {
125
+ return;
126
+ }
127
+
128
+ if($this->doing_ajax()) {
129
+ return;
130
+ }
131
+
132
+ if(defined('WP_CLI') && WP_CLI) {
133
  return;
134
+ }
135
+
136
+ //for landing page tracking
137
+ $cookie_name = $this->options->landingpage_cookie_name();
138
+ if (!isset($_COOKIE[$cookie_name]) && !is_admin() && $this->options->display_pages() == 2 && $this->enabled()) {
139
+ setcookie($cookie_name, 1, 0, '/', '', false, true);
140
+ }
141
+ }
142
 
143
+ public function plugins_loaded() {
144
+ load_plugin_textdomain(self::PLUGIN_SLUG, false, self::PLUGIN_SLUG . '/languages/');
145
+
146
+ $this->options = new WPFront_Notification_Bar_Options(self::OPTION_NAME, self::PLUGIN_SLUG);
147
 
148
+ if ($this->options->preview_mode() && isset($_GET[self::PREVIEW_MODE_NAME])) {
149
+ $this->set_preview_mode();
150
+ wp_redirect(home_url());
151
+ exit;
152
+ }
153
  }
154
 
155
  public function admin_init() {
156
  register_setting(self::OPTIONS_GROUP_NAME, self::OPTION_NAME);
157
  }
158
 
159
+ public function admin_menu() {
160
+ $page_hook_suffix = add_options_page(__('WPFront Notification Bar', 'wpfront-notification-bar'), __('Notification Bar', 'wpfront-notification-bar'), 'manage_options', self::PLUGIN_SLUG, array($this, 'options_page'));
161
+
162
+ add_action('admin_print_scripts-' . $page_hook_suffix, array($this, 'enqueue_options_scripts'));
163
+ add_action('admin_print_styles-' . $page_hook_suffix, array($this, 'enqueue_options_styles'));
164
+ }
165
+
166
  //options page scripts
167
  public function enqueue_options_scripts() {
168
  $this->enqueue_scripts();
169
 
170
+ wp_enqueue_script('jquery');
171
+ wp_enqueue_script('jquery-ui-core');
172
+ wp_enqueue_script('jquery-ui-datepicker');
173
 
174
+ wp_enqueue_script('jquery-ui-timepicker', 'https://cdn.jsdelivr.net/npm/timepicker@1.13.14/jquery.timepicker.min.js', array('jquery', 'jquery-ui-core'), '1.13.14');
 
175
 
176
+ $js = 'jquery-plugins/colorpicker/js/colorpicker.min.js';
177
+ wp_enqueue_script('jquery.eyecon.colorpicker', plugins_url($js, $this->plugin_file), array('jquery', 'jquery-ui-core'), self::VERSION);
178
 
179
+ wp_enqueue_script('wpfront-notification-bar-options', plugins_url("js/options{$this->min_file_suffix}.js", $this->plugin_file), array(), self::VERSION);
 
180
  }
181
 
182
  //options page styles
183
  public function enqueue_options_styles() {
184
  $this->enqueue_styles();
185
 
186
+ $style = 'jquery-plugins/jquery-ui/smoothness/jquery-ui-1.10.4.custom.min.css';
187
+ wp_enqueue_style('jquery.ui.smoothness.datepicker', plugins_url($style, $this->plugin_file), array(), self::VERSION);
188
 
189
+ wp_enqueue_style('jquery.ui.timepicker', 'https://cdn.jsdelivr.net/npm/timepicker@1.13.14/jquery.timepicker.min.css', array(), '1.13.14');
190
 
191
+ $style = 'jquery-plugins/colorpicker/css/colorpicker.min.css';
192
+ wp_enqueue_style('jquery.eyecon.colorpicker.colorpicker', plugins_url($style, $this->plugin_file), array(), self::VERSION);
193
 
194
+ $style = "css/options{$this->min_file_suffix}.css";
195
+ wp_enqueue_style('wpfront-notification-bar-options', plugins_url($style, $this->plugin_file), array(), self::VERSION);
196
  }
197
 
198
+ public function plugin_action_links($links, $file) {
199
+ if ($file == self::PLUGIN_FILE) {
200
+ $settings_link = '<a href="' . menu_page_url(self::PLUGIN_SLUG, false) . '">' . __('Settings', 'wpfront-notification-bar') . '</a>';
201
+ array_unshift($links, $settings_link);
202
+ }
203
+ return $links;
204
+ }
205
+
206
+ //add scripts
207
+ public function enqueue_scripts() {
208
+ if($this->options->debug_mode()) {
209
+ add_action('wp_footer', array($this, 'write_debug_logs'), 99999);
210
+ add_action('shutdown', array($this, 'write_debug_logs'), 99999);
211
+ }
212
+
213
+ if ($this->enabled() == false) {
214
+ return;
215
+ }
216
+
217
+ wp_enqueue_script('jquery');
218
+
219
+ if($this->options->keep_closed()) {
220
+ wp_enqueue_script('js-cookie', plugins_url('jquery-plugins/js-cookie.min.js', $this->plugin_file), array(), '2.2.1');
221
+ }
222
+
223
+ wp_enqueue_script('wpfront-notification-bar', plugins_url("js/wpfront-notification-bar{$this->min_file_suffix}.js", $this->plugin_file), array('jquery'), self::VERSION);
224
+
225
+ add_action('wp_footer', array($this, 'write_markup'));
226
+ add_action('shutdown', array($this, 'write_markup'));
227
+
228
+ $this->scriptLoaded = true;
229
+ }
230
+
231
+ //add styles
232
+ public function enqueue_styles() {
233
+ if ($this->enabled() == false) {
234
+ return;
235
+ }
236
+
237
+ wp_enqueue_style('wpfront-notification-bar', plugins_url("css/wpfront-notification-bar{$this->min_file_suffix}.css", $this->plugin_file), array(), self::VERSION);
238
+ }
239
+
240
+ //creates options page
241
+ public function options_page() {
242
+ if (!current_user_can('manage_options')) {
243
+ wp_die(__('You do not have sufficient permissions to access this page.', 'wpfront-notification-bar'));
244
+ return;
245
+ }
246
+
247
+ include(dirname($this->plugin_file) . '/templates/options-template.php');
248
+
249
+ add_filter('admin_footer_text', array($this, 'admin_footer_text'));
250
  }
251
 
252
  //writes the html and script for the bar
259
  return;
260
  }
261
 
262
+ if ($this->doing_ajax()) {
263
  return;
264
  }
265
+
266
  if ($this->enabled()) {
267
+ $this->log('Writing HTML template.');
268
+
269
+ include(plugin_dir_path($this->plugin_file) . 'templates/notification-bar-template.php');
270
 
271
+ $json = json_encode(array(
 
 
272
  'position' => $this->options->position(),
273
  'height' => $this->options->height(),
274
  'fixed_position' => $this->options->fixed_position(),
277
  'button_action_close_bar' => $this->options->button_action_close_bar(),
278
  'auto_close_after' => $this->options->auto_close_after(),
279
  'display_after' => $this->options->display_after(),
280
+ 'is_admin_bar_showing' => is_admin_bar_showing(),
281
  'display_open_button' => $this->options->display_open_button(),
282
  'keep_closed' => $this->options->keep_closed(),
283
  'keep_closed_for' => $this->options->keep_closed_for(),
284
  'position_offset' => $this->options->position_offset(),
285
  'display_scroll' => $this->options->display_scroll(),
286
  'display_scroll_offset' => $this->options->display_scroll_offset(),
287
+ 'keep_closed_cookie' => $this->options->keep_closed_cookie_name(),
288
+ 'log' => $this->options->debug_mode()
289
+ ));
290
+
291
+ $this->write_load_script($json);
292
  }
293
 
294
+ $this->markupLoaded = true;
295
+ }
296
+
297
+ private function write_load_script($json) {
298
+ $this->log('Writing JS load script.');
299
+
300
+ $this->write_debug_logs();
301
+
302
+ if($this->options->debug_mode()) {
303
+ ?>
304
+ <script type="text/javascript">
305
+ console.log('[WPFront Notification Bar] Starting JS scripts execution.');
306
+ </script>
307
+ <?php
308
+ }
309
+ ?>
310
+ <script type="text/javascript">
311
+ function __load_wpfront_notification_bar() {
312
+ if (typeof wpfront_notification_bar === "function") {
313
+ wpfront_notification_bar(<?php echo $json; ?>);
314
+ } else {
315
+ <?php
316
+ if($this->options->debug_mode()) {
317
+ echo 'console.log("[WPFront Notification Bar] Waiting for JS function \"wpfront_notification_bar\".");';
318
+ }
319
+ ?>
320
+ setTimeout(__load_wpfront_notification_bar, 100);
321
+ }
322
+ }
323
+ __load_wpfront_notification_bar();
324
+ </script>
325
+ <?php
326
+ }
327
+
328
+ public function write_debug_logs() {
329
+ if(empty($this->logs)) {
330
+ return;
331
+ }
332
+
333
+ if(!$this->options->debug_mode()) {
334
+ return;
335
+ }
336
+
337
+ if ($this->doing_ajax()) {
338
+ return;
339
+ }
340
+
341
+ $now = current_time('mysql');
342
+ $now = strtotime($now);
343
+ $now_str = date('Y-m-d h:i:s a', $now);
344
+
345
+ echo "<!-- [WPFront Notification Bar] Page generated at $now_str. -->";
346
+ echo '<script type="text/javascript">';
347
+ echo "console.log('[WPFront Notification Bar] Page generated at $now_str.');";
348
+ foreach ($this->logs as $message => $args) {
349
+ vprintf("console.log('$message');", $args);
350
+ }
351
+ echo '</script>';
352
+
353
+ $this->logs = array();
354
  }
355
 
356
  protected function get_message_text() {
357
  $message = $this->options->message();
358
 
359
+ $message = apply_filters('wpfront_notification_bar_message', $message);
360
+
361
  if ($this->options->message_process_shortcode()) {
362
  $message = do_shortcode($message);
363
  }
364
 
365
  return $message;
366
  }
367
+
368
  protected function get_button_text() {
369
  $text = $this->options->button_text();
370
 
371
+ $text = apply_filters('wpfront_notification_bar_button_text', $text);
372
+
373
  if ($this->options->message_process_shortcode()) {
374
  $text = do_shortcode($text);
375
  }
380
  protected function get_filter_objects() {
381
  $objects = array();
382
 
383
+ $objects['home'] = __('[Home Page]', 'wpfront-notification-bar');
384
 
385
+ $pages = get_pages(array('number' => 50));
386
  foreach ($pages as $page) {
387
+ $objects[$page->ID] = __('[Page]', 'wpfront-notification-bar') . ' ' . $page->post_title;
388
  }
389
 
390
+ $posts = get_posts(array('number' => 50));
391
  foreach ($posts as $post) {
392
+ $objects[$post->ID] = __('[Post]', 'wpfront-notification-bar') . ' ' . $post->post_title;
393
  }
394
 
395
  // $categories = get_categories();
396
  // foreach ($categories as $category) {
397
+ // $objects['3.' . $category->cat_ID] = __('[Category]', 'wpfront-notification-bar') . ' ' . $category->cat_name;
398
  // }
399
 
400
  return $objects;
413
  }
414
 
415
  protected function filter() {
416
+ if (is_admin()) {
417
+ $this->log('Running in wp-admin, ignoring filters.');
418
+ return true;
419
+ }
420
 
421
  $now = current_time('mysql');
422
  $now = strtotime($now);
423
+ $now_str = date('Y-m-d h:i a', $now);
424
+ $now = strtotime($now_str);
425
 
426
  $start_date = $this->options->start_date();
427
  if ($start_date != NULL) {
428
  $start_date = date('Y-m-d', $start_date);
429
  $start_time = $this->options->start_time();
430
+ if ($start_time == NULL) {
431
  $start_time = '12:00 am';
432
  } else {
433
  $start_time = date('h:i a', $start_time);
434
  }
435
+ $start_date_str = $start_date . ' ' . $start_time;
436
+ $start_date = strtotime($start_date_str);
437
+
438
+ if ($start_date > $now) {
439
+ $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]);
440
+ return false;
441
+ }
442
  }
443
+
444
  $end_date = $this->options->end_date();
445
  if ($end_date != NULL) {
446
  $end_date = date('Y-m-d', $end_date);
447
  $end_time = $this->options->end_time();
448
+ if ($end_time == NULL) {
449
  $end_time = '11:59 pm';
450
  } else {
451
  $end_time = date('h:i a', $end_time);
452
  }
453
+
454
+ $end_date_str = $end_date . ' ' . $end_time;
455
+ $end_date = strtotime($end_date_str);
456
+
457
+ if ($end_date < $now) {
458
+ $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]);
459
+ return false;
460
+ }
461
  }
462
+
463
  switch ($this->options->display_roles()) {
464
  case 1:
465
  break;
466
  case 2:
467
+ if (!$this->is_user_logged_in()) {
468
+ $this->log('Filter: Display only for logged-in users. User is not logged-in, disabling notification.');
469
+ return false;
470
+ }
471
  break;
472
  case 3:
473
+ if ($this->is_user_logged_in()) {
474
+ $this->log('Filter: Display only for guest users. User is logged-in, disabling notification.');
475
+ return false;
476
+ }
477
  break;
478
  case 4:
479
  global $current_user;
481
  $role = self::ROLE_GUEST;
482
  if ($this->is_user_logged_in())
483
  $role = self::ROLE_NOROLE;
484
+ if (!in_array($role, $this->options->include_roles())) {
485
+ $this->log('Filter: Display set for user roles. Current user role is not allowed, disabling notification.');
486
+ return false;
487
+ }
488
  } else {
489
+ $display = false;
490
  foreach ($current_user->roles as $role) {
491
  if (in_array($role, $this->options->include_roles())) {
492
+ $display = true;
493
  break;
494
  }
495
  }
496
+ if (!$display) {
497
+ $this->log('Filter: Display set for user roles. Current user role is not allowed, disabling notification.');
498
+ return false;
499
+ }
500
  }
501
  break;
502
  }
503
 
504
  switch ($this->options->display_pages()) {
505
  case 1:
506
+ return true;
507
  case 2:
508
+ if(isset($_COOKIE[$this->options->landingpage_cookie_name()])) {
509
+ $this->log('Filter: Display only on landing page. This is not the landing page, disabling notification.');
510
+ return false;
511
+ }
512
+
513
+ return true;
514
  case 3:
515
  case 4:
516
  global $post;
517
+ if(empty($post)) {
518
+ $this->log('Filter: Global post object is empty.');
519
+ }
520
+ $ID = false;
521
  if (is_home()) {
522
  $ID = 'home';
 
523
  } elseif (is_singular()) {
524
+ $ID = $post->ID;
 
 
 
 
 
 
 
525
  }
526
  if ($this->options->display_pages() == 3) {
527
+ if ($ID !== false) {
528
+ if ($this->filter_pages_contains($this->options->include_pages(), $ID) === false) {
529
+ $this->log('Filter: Display is set to include in pages. Current page ID is "%s", which is not included, disabling notification.', array($ID));
530
+ return false;
531
+ } else {
532
+ return true;
533
+ }
534
  }
535
+ return false;
536
  }
537
  if ($this->options->display_pages() == 4) {
538
+ if ($ID !== false) {
539
+ if ($this->filter_pages_contains($this->options->exclude_pages(), $ID) === false) {
540
+ return true;
541
+ } else {
542
+ $this->log('Filter: Display is set to exclude in pages. Current page ID is "%s", which is excluded, disabling notification.', array($ID));
543
+ return false;
544
+ }
545
  }
546
+ return true;
547
  }
548
  }
549
 
550
+ return true;
551
  }
552
 
553
  protected function is_user_logged_in() {
565
  }
566
 
567
  protected function enabled() {
568
+ if($this->enabled !== null) {
569
+ return $this->enabled;
570
+ }
571
+
572
  if ($this->options->enabled()) {
573
+ $this->log('Notification bar is enabled.');
574
+ $this->enabled = $this->filter();
575
+ return $this->enabled;
576
+ }
577
+
578
+ if ($this->is_preview_mode()) {
579
+ $this->log('Notification bar is running in preview mode.');
580
+ $this->enabled = $this->filter();
581
+ return $this->enabled;
582
  }
583
 
584
+ $this->log('Notification bar is not enabled.');
585
+ $this->enabled = false;
586
+ return false;
587
+ }
588
+
589
+ public function admin_footer_text($text) {
590
+ $troubleshootingLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wpfront.com/wordpress-plugins/notification-bar-plugin/wpfront-notification-bar-troubleshooting/', __('Troubleshooting', 'wpfront-notification-bar'));
591
+ $settingsLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wpfront.com/notification-bar-plugin-settings/', __('Settings Description', 'wpfront-notification-bar'));
592
+ $reviewLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wordpress.org/support/plugin/' . self::PLUGIN_SLUG . '/reviews/', __('Write a Review', 'wpfront-notification-bar'));
593
+ $donateLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wpfront.com/donate/', __('Buy me a Beer or Coffee', 'wpfront-notification-bar'));
594
+
595
+ return sprintf('%s | %s | %s | %s | %s', $troubleshootingLink, $settingsLink, $reviewLink, $donateLink, $text);
596
+ }
597
+
598
+ protected function doing_ajax() {
599
+ if (defined('DOING_AJAX') && DOING_AJAX) {
600
+ return true;
601
+ }
602
+
603
+ if (wp_doing_ajax()) {
604
+ return true;
605
+ }
606
+
607
+ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
608
+ return true;
609
+ }
610
+
611
+ if (!empty($_SERVER['REQUEST_URI']) && strtolower($_SERVER['REQUEST_URI']) == '/wp-admin/async-upload.php') {
612
+ return true;
613
+ }
614
+
615
+ return false;
616
+ }
617
+
618
+ public function settings_updated($old_value, $value) {
619
+ if (empty($value['preview_mode'])) {
620
+ $this->remove_preview_mode();
621
+ } else {
622
+ $this->set_preview_mode();
623
+ }
624
+
625
+ if (function_exists('w3tc_flush_posts')) {
626
+ w3tc_flush_posts();
627
+ }
628
+ }
629
+
630
+ private function set_preview_mode() {
631
+ setcookie(self::PREVIEW_MODE_NAME, 1, 0, '/');
632
+ }
633
+
634
+ private function remove_preview_mode() {
635
+ setcookie(self::PREVIEW_MODE_NAME, '', time() - 3600, '/');
636
+ }
637
+
638
+ private function is_preview_mode() {
639
+ if($this->options->preview_mode()) {
640
+ $this->log('Preview mode is enabled.');
641
+
642
+ if(empty($_COOKIE[self::PREVIEW_MODE_NAME])) {
643
+ $this->log('Preview mode flag is not set. Disabling preview mode.');
644
+ return false;
645
+ }
646
+
647
+ return true;
648
+ }
649
+
650
+ $this->log('Preview mode is not enabled.');
651
+ return false;
652
+ }
653
+
654
+ private function log($message, $args = null) {
655
+ $this->logs["[WPFront Notification Bar] $message"] = $args;
656
  }
657
 
658
  }
css/options.css CHANGED
@@ -7,7 +7,8 @@
7
  {
8
  }
9
 
10
- #wpfront-notification-bar-options input.seconds
 
11
  {
12
  width: 40px;
13
  }
@@ -36,7 +37,7 @@
36
  #wpfront-notification-bar-options table.form-table .color-selector-div
37
  {
38
  display: inline-block;
39
- width: 100px;
40
  }
41
 
42
  #wpfront-notification-bar-options table.form-table .color-selector
@@ -44,6 +45,14 @@
44
  vertical-align: middle;
45
  }
46
 
 
 
 
 
 
 
 
 
47
  #wpfront-notification-bar-options table.form-table div.pages-selection, #wpfront-notification-bar-options table.form-table div.roles-selection
48
  {
49
  width: 70%;
@@ -65,4 +74,19 @@
65
  padding: 2px;
66
  white-space: nowrap;
67
  overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
7
  {
8
  }
9
 
10
+ #wpfront-notification-bar-options input.seconds,
11
+ #wpfront-notification-bar-options input.pixels
12
  {
13
  width: 40px;
14
  }
37
  #wpfront-notification-bar-options table.form-table .color-selector-div
38
  {
39
  display: inline-block;
40
+ width: 120px;
41
  }
42
 
43
  #wpfront-notification-bar-options table.form-table .color-selector
45
  vertical-align: middle;
46
  }
47
 
48
+ #wpfront-notification-bar-options table.form-table .color-value
49
+ {
50
+ width: 75px;
51
+ height: 24px;
52
+ min-height: 0px;
53
+ vertical-align: middle;
54
+ }
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: 70%;
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: 70%;
87
+ }
88
+
89
+ .colorpicker input
90
+ {
91
+ min-height: 0px;
92
  }
css/options.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #icon-wpfront-notification-bar{background:url("../images/settings32x32.png") no-repeat scroll 0 0 rgba(0,0,0,0)}#wpfront-notification-bar-options input.seconds,#wpfront-notification-bar-options input.pixels{width:40px}#wpfront-notification-bar-options input.date,#wpfront-notification-bar-options input.time{width:100px}#wpfront-notification-bar-options textArea{width:70%}#wpfront-notification-bar-options input.URL{width:50%}#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{width:75px;height:24px;min-height:0;vertical-align:middle}#wpfront-notification-bar-options table.form-table div.pages-selection,#wpfront-notification-bar-options table.form-table div.roles-selection{width:70%;height:150px;background-color:#fff;overflow:auto;border:1px solid #dfdfdf;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#wpfront-notification-bar-options table.form-table div.page-div,#wpfront-notification-bar-options table.form-table div.role-div{float:left;width:250px;padding:2px;white-space:nowrap;overflow:hidden}#wpfront-notification-bar-options input.cookie-name{width:30%}#wpfront-notification-bar-options input.post-id-list{width:70%}.colorpicker input{min-height:0}
css/wpfront-notification-bar.css CHANGED
@@ -101,7 +101,6 @@
101
 
102
  #wpfront-notification-bar-open-button
103
  {
104
- display: none;
105
  position: absolute;
106
  right: 10px;
107
  z-index: 9999;
@@ -120,6 +119,11 @@
120
  box-sizing: content-box;
121
  }
122
 
 
 
 
 
 
123
  #wpfront-notification-bar-open-button.top
124
  {
125
  top: 0px;
@@ -152,7 +156,11 @@
152
 
153
  #wpfront-notification-bar-spacer
154
  {
155
- display: none;
156
  position: relative;
157
  }
158
 
 
 
 
 
 
101
 
102
  #wpfront-notification-bar-open-button
103
  {
 
104
  position: absolute;
105
  right: 10px;
106
  z-index: 9999;
119
  box-sizing: content-box;
120
  }
121
 
122
+ #wpfront-notification-bar-open-button.hidden
123
+ {
124
+ display: none;
125
+ }
126
+
127
  #wpfront-notification-bar-open-button.top
128
  {
129
  top: 0px;
156
 
157
  #wpfront-notification-bar-spacer
158
  {
 
159
  position: relative;
160
  }
161
 
162
+ #wpfront-notification-bar-spacer.hidden
163
+ {
164
+ display: none;
165
+ }
166
+
css/wpfront-notification-bar.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #wpfront-notification-bar{visibility:hidden;position:fixed;overflow:hidden;left:0;right:0;color:#fff;background-color:#000}.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:9999;width:100%}#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:5px 0;line-height:1em}#wpfront-notification-bar div{text-align:center;display:inline-block;vertical-align:middle}#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:9999;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-image:url(../images/arrow_down.png);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-image:url(../images/arrow_up.png);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}#wpfront-notification-bar-spacer.hidden{display:none}
jquery-plugins/colorpicker/css/colorpicker.min.css ADDED
@@ -0,0 +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:#f00;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:#f00}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00}.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}
jquery-plugins/colorpicker/js/colorpicker.min.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(c){var e=function(){var e=65,H={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:!0,flat:!1},l=function(a,b){a=h(a);c(b).data("colorpicker").fields.eq(1).val(a.r).end().eq(2).val(a.g).end().eq(3).val(a.b).end()},r=function(a,b){c(b).data("colorpicker").fields.eq(4).val(a.h).end().eq(5).val(a.s).end().eq(6).val(a.b).end()},n=function(a,b){c(b).data("colorpicker").fields.eq(0).val(m(h(a))).end()},
2
+ t=function(a,b){c(b).data("colorpicker").selector.css("backgroundColor","#"+m(h({h:a.h,s:100,b:100})));c(b).data("colorpicker").selectorIndic.css({left:parseInt(150*a.s/100,10),top:parseInt(150*(100-a.b)/100,10)})},u=function(a,b){c(b).data("colorpicker").hue.css("top",parseInt(150-150*a.h/360,10))},w=function(a,b){c(b).data("colorpicker").currentColor.css("backgroundColor","#"+m(h(a)))},v=function(a,b){c(b).data("colorpicker").newColor.css("backgroundColor","#"+m(h(a)))},I=function(a){a=a.charCode||
3
+ a.keyCode||-1;if(a>e&&90>=a||32==a)return!1;!0===c(this).parent().parent().data("colorpicker").livePreview&&p.apply(this)},p=function(a){var b=c(this).parent().parent();if(0<this.parentNode.className.indexOf("_hex")){var d=b.data("colorpicker");var g=this.value,f=6-g.length;if(0<f){for(var k=[],e=0;e<f;e++)k.push("0");k.push(g);g=k.join("")}d.color=d=q(x(g))}else 0<this.parentNode.className.indexOf("_hsb")?b.data("colorpicker").color=d=y({h:parseInt(b.data("colorpicker").fields.eq(4).val(),10),s:parseInt(b.data("colorpicker").fields.eq(5).val(),
4
+ 10),b:parseInt(b.data("colorpicker").fields.eq(6).val(),10)}):(d=b.data("colorpicker"),g=parseInt(b.data("colorpicker").fields.eq(1).val(),10),f=parseInt(b.data("colorpicker").fields.eq(2).val(),10),k=parseInt(b.data("colorpicker").fields.eq(3).val(),10),d.color=d=q({r:Math.min(255,Math.max(0,g)),g:Math.min(255,Math.max(0,f)),b:Math.min(255,Math.max(0,k))}));a&&(l(d,b.get(0)),n(d,b.get(0)),r(d,b.get(0)));t(d,b.get(0));u(d,b.get(0));v(d,b.get(0));b.data("colorpicker").onChange.apply(b,[d,m(h(d)),h(d)])},
5
+ J=function(a){c(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus")},K=function(){e=0<this.parentNode.className.indexOf("_hex")?70:65;c(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");c(this).parent().addClass("colorpicker_focus")},L=function(a){var b=c(this).parent().find("input").focus();a={el:c(this).parent().addClass("colorpicker_slider"),max:0<this.parentNode.className.indexOf("_hsb_h")?360:0<this.parentNode.className.indexOf("_hsb")?
6
+ 100:255,y:a.pageY,field:b,val:parseInt(b.val(),10),preview:c(this).parent().parent().data("colorpicker").livePreview};c(document).bind("mouseup",a,z);c(document).bind("mousemove",a,A)},A=function(a){a.data.field.val(Math.max(0,Math.min(a.data.max,parseInt(a.data.val+a.pageY-a.data.y,10))));a.data.preview&&p.apply(a.data.field.get(0),[!0]);return!1},z=function(a){p.apply(a.data.field.get(0),[!0]);a.data.el.removeClass("colorpicker_slider").find("input").focus();c(document).unbind("mouseup",z);c(document).unbind("mousemove",
7
+ A);return!1},M=function(a){a={cal:c(this).parent(),y:c(this).offset().top};a.preview=a.cal.data("colorpicker").livePreview;c(document).bind("mouseup",a,B);c(document).bind("mousemove",a,C)},C=function(a){p.apply(a.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,a.pageY-a.data.y)))/150,10)).get(0),[a.data.preview]);return!1},B=function(a){l(a.data.cal.data("colorpicker").color,a.data.cal.get(0));n(a.data.cal.data("colorpicker").color,a.data.cal.get(0));c(document).unbind("mouseup",
8
+ B);c(document).unbind("mousemove",C);return!1},N=function(a){a={cal:c(this).parent(),pos:c(this).offset()};a.preview=a.cal.data("colorpicker").livePreview;c(document).bind("mouseup",a,D);c(document).bind("mousemove",a,E)},E=function(a){p.apply(a.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,a.pageY-a.data.pos.top)))/150,10)).end().eq(5).val(parseInt(100*Math.max(0,Math.min(150,a.pageX-a.data.pos.left))/150,10)).get(0),[a.data.preview]);return!1},D=function(a){l(a.data.cal.data("colorpicker").color,
9
+ a.data.cal.get(0));n(a.data.cal.data("colorpicker").color,a.data.cal.get(0));c(document).unbind("mouseup",D);c(document).unbind("mousemove",E);return!1},O=function(a){c(this).addClass("colorpicker_focus")},P=function(a){c(this).removeClass("colorpicker_focus")},Q=function(a){a=c(this).parent();var b=a.data("colorpicker").color;a.data("colorpicker").origColor=b;w(b,a.get(0));a.data("colorpicker").onSubmit(b,m(h(b)),h(b),a.data("colorpicker").el)},G=function(a){var b=c("#"+c(this).data("colorpickerId"));
10
+ b.data("colorpicker").onBeforeShow.apply(this,[b.get(0)]);var d=c(this).offset(),g="CSS1Compat"==document.compatMode;a=window.pageXOffset||(g?document.documentElement.scrollLeft:document.body.scrollLeft);var f=window.pageYOffset||(g?document.documentElement.scrollTop:document.body.scrollTop);var k=window.innerWidth||(g?document.documentElement.clientWidth:document.body.clientWidth);var e=d.top+this.offsetHeight;d=d.left;e+176>f+(window.innerHeight||(g?document.documentElement.clientHeight:document.body.clientHeight))&&
11
+ (e-=this.offsetHeight+176);d+356>a+k&&(d-=356);b.css({left:d+"px",top:e+"px"});0!=b.data("colorpicker").onShow.apply(this,[b.get(0)])&&b.show();c(document).bind("mousedown",{cal:b},F);return!1},F=function(a){R(a.data.cal.get(0),a.target,a.data.cal.get(0))||(0!=a.data.cal.data("colorpicker").onHide.apply(this,[a.data.cal.get(0)])&&a.data.cal.hide(),c(document).unbind("mousedown",F))},R=function(a,b,d){if(a==b)return!0;if(a.contains)return a.contains(b);if(a.compareDocumentPosition)return!!(a.compareDocumentPosition(b)&
12
+ 16);for(b=b.parentNode;b&&b!=d;){if(b==a)return!0;b=b.parentNode}return!1},y=function(a){return{h:Math.min(360,Math.max(0,a.h)),s:Math.min(100,Math.max(0,a.s)),b:Math.min(100,Math.max(0,a.b))}},x=function(a){a=parseInt(-1<a.indexOf("#")?a.substring(1):a,16);return{r:a>>16,g:(a&65280)>>8,b:a&255}},q=function(a){var b={h:0,s:0,b:0},d=Math.max(a.r,a.g,a.b),c=d-Math.min(a.r,a.g,a.b);b.b=d;b.s=0!=d?255*c/d:0;b.h=0!=b.s?a.r==d?(a.g-a.b)/c:a.g==d?2+(a.b-a.r)/c:4+(a.r-a.g)/c:-1;b.h*=60;0>b.h&&(b.h+=360);
13
+ b.s*=100/255;b.b*=100/255;return b},h=function(a){var b,d;var c=Math.round(a.h);var f=Math.round(255*a.s/100);a=Math.round(255*a.b/100);if(0==f)c=b=d=a;else{f=(255-f)*a/255;var e=c%60*(a-f)/60;360==c&&(c=0);60>c?(c=a,d=f,b=f+e):120>c?(b=a,d=f,c=a-e):180>c?(b=a,c=f,d=f+e):240>c?(d=a,c=f,b=a-e):300>c?(d=a,b=f,c=f+e):360>c?(c=a,b=f,d=a-e):d=b=c=0}return{r:Math.round(c),g:Math.round(b),b:Math.round(d)}},m=function(a){var b=[a.r.toString(16),a.g.toString(16),a.b.toString(16)];c.each(b,function(a,c){1==
14
+ c.length&&(b[a]="0"+c)});return b.join("")},S=function(){var a=c(this).parent(),b=a.data("colorpicker").origColor;a.data("colorpicker").color=b;l(b,a.get(0));n(b,a.get(0));r(b,a.get(0));t(b,a.get(0));u(b,a.get(0));v(b,a.get(0))};return{init:function(a){a=c.extend({},H,a||{});if("string"==typeof a.color)a.color=q(x(a.color));else if(void 0!=a.color.r&&void 0!=a.color.g&&void 0!=a.color.b)a.color=q(a.color);else if(void 0!=a.color.h&&void 0!=a.color.s&&void 0!=a.color.b)a.color=y(a.color);else return this;
15
+ return this.each(function(){if(!c(this).data("colorpickerId")){var b=c.extend({},a);b.origColor=a.color;var d="collorpicker_"+parseInt(1E3*Math.random());c(this).data("colorpickerId",d);d=c('<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>').attr("id",
16
+ d);b.flat?d.appendTo(this).show():d.appendTo(document.body);b.fields=d.find("input").bind("keyup",I).bind("change",p).bind("blur",J).bind("focus",K);d.find("span").bind("mousedown",L).end().find(">div.colorpicker_current_color").bind("click",S);b.selector=d.find("div.colorpicker_color").bind("mousedown",N);b.selectorIndic=b.selector.find("div div");b.el=this;b.hue=d.find("div.colorpicker_hue div");d.find("div.colorpicker_hue").bind("mousedown",M);b.newColor=d.find("div.colorpicker_new_color");b.currentColor=
17
+ d.find("div.colorpicker_current_color");d.data("colorpicker",b);d.find("div.colorpicker_submit").bind("mouseenter",O).bind("mouseleave",P).bind("click",Q);l(b.color,d.get(0));r(b.color,d.get(0));n(b.color,d.get(0));u(b.color,d.get(0));t(b.color,d.get(0));w(b.color,d.get(0));v(b.color,d.get(0));b.flat?d.css({position:"relative",display:"block"}):c(this).bind(b.eventName,G)}})},showPicker:function(){return this.each(function(){c(this).data("colorpickerId")&&G.apply(this)})},hidePicker:function(){return this.each(function(){c(this).data("colorpickerId")&&
18
+ c("#"+c(this).data("colorpickerId")).hide()})},setColor:function(a){if("string"==typeof a)a=q(x(a));else if(void 0!=a.r&&void 0!=a.g&&void 0!=a.b)a=q(a);else if(void 0!=a.h&&void 0!=a.s&&void 0!=a.b)a=y(a);else return this;return this.each(function(){if(c(this).data("colorpickerId")){var b=c("#"+c(this).data("colorpickerId"));b.data("colorpicker").color=a;b.data("colorpicker").origColor=a;l(a,b.get(0));r(a,b.get(0));n(a,b.get(0));u(a,b.get(0));t(a,b.get(0));w(a,b.get(0));v(a,b.get(0))}})}}}();c.fn.extend({ColorPicker:e.init,
19
+ ColorPickerHide:e.hidePicker,ColorPickerShow:e.showPicker,ColorPickerSetColor:e.setColor})})(jQuery);
jquery-plugins/jquery.c.js DELETED
@@ -1,117 +0,0 @@
1
- /*!
2
- * jQuery Cookie Plugin v1.4.0
3
- * https://github.com/carhartl/jquery-cookie
4
- *
5
- * Copyright 2013 Klaus Hartl
6
- * Released under the MIT license
7
- */
8
- (function (factory) {
9
- if (typeof define === 'function' && define.amd) {
10
- // AMD. Register as anonymous module.
11
- define(['jquery'], factory);
12
- } else {
13
- // Browser globals.
14
- factory(jQuery);
15
- }
16
- }(function ($) {
17
-
18
- var pluses = /\+/g;
19
-
20
- function encode(s) {
21
- return config.raw ? s : encodeURIComponent(s);
22
- }
23
-
24
- function decode(s) {
25
- return config.raw ? s : decodeURIComponent(s);
26
- }
27
-
28
- function stringifyCookieValue(value) {
29
- return encode(config.json ? JSON.stringify(value) : String(value));
30
- }
31
-
32
- function parseCookieValue(s) {
33
- if (s.indexOf('"') === 0) {
34
- // This is a quoted cookie as according to RFC2068, unescape...
35
- s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
36
- }
37
-
38
- try {
39
- // Replace server-side written pluses with spaces.
40
- // If we can't decode the cookie, ignore it, it's unusable.
41
- s = decodeURIComponent(s.replace(pluses, ' '));
42
- } catch(e) {
43
- return;
44
- }
45
-
46
- try {
47
- // If we can't parse the cookie, ignore it, it's unusable.
48
- return config.json ? JSON.parse(s) : s;
49
- } catch(e) {}
50
- }
51
-
52
- function read(s, converter) {
53
- var value = config.raw ? s : parseCookieValue(s);
54
- return $.isFunction(converter) ? converter(value) : value;
55
- }
56
-
57
- var config = $.cookie = function (key, value, options) {
58
-
59
- // Write
60
- if (value !== undefined && !$.isFunction(value)) {
61
- options = $.extend({}, config.defaults, options);
62
-
63
- if (typeof options.expires === 'number') {
64
- var days = options.expires, t = options.expires = new Date();
65
- t.setDate(t.getDate() + days);
66
- }
67
-
68
- return (document.cookie = [
69
- encode(key), '=', stringifyCookieValue(value),
70
- options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
71
- options.path ? '; path=' + options.path : '',
72
- options.domain ? '; domain=' + options.domain : '',
73
- options.secure ? '; secure' : ''
74
- ].join(''));
75
- }
76
-
77
- // Read
78
-
79
- var result = key ? undefined : {};
80
-
81
- // To prevent the for loop in the first place assign an empty array
82
- // in case there are no cookies at all. Also prevents odd result when
83
- // calling $.cookie().
84
- var cookies = document.cookie ? document.cookie.split('; ') : [];
85
-
86
- for (var i = 0, l = cookies.length; i < l; i++) {
87
- var parts = cookies[i].split('=');
88
- var name = decode(parts.shift());
89
- var cookie = parts.join('=');
90
-
91
- if (key && key === name) {
92
- // If second argument (value) is a function it's a converter...
93
- result = read(cookie, value);
94
- break;
95
- }
96
-
97
- // Prevent storing a cookie that we couldn't decode.
98
- if (!key && (cookie = read(cookie)) !== undefined) {
99
- result[name] = cookie;
100
- }
101
- }
102
-
103
- return result;
104
- };
105
-
106
- config.defaults = {};
107
-
108
- $.removeCookie = function (key, options) {
109
- if ($.cookie(key) !== undefined) {
110
- // Must not alter options, thus extending a fresh object...
111
- $.cookie(key, '', $.extend({}, options, { expires: -1 }));
112
- return true;
113
- }
114
- return false;
115
- };
116
-
117
- }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jquery-plugins/js-cookie.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /**
2
+ * Original file: /npm/js-cookie@2.2.1/src/js.cookie.js
3
+ */
4
+ !function(e){var n;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var t=window.Cookies,o=window.Cookies=e();o.noConflict=function(){return window.Cookies=t,o}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}function n(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function t(o){function r(){}function i(n,t,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(t);/^[\{\[]/.test(c)&&(t=c)}catch(e){}t=o.write?o.write(t,n):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var f="";for(var u in i)i[u]&&(f+="; "+u,!0!==i[u]&&(f+="="+i[u].split(";")[0]));return document.cookie=n+"="+t+f}}function c(e,t){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var f=i[c].split("="),u=f.slice(1).join("=");t||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var a=n(f[0]);if(u=(o.read||o)(u,a)||n(u),t)try{u=JSON.parse(u)}catch(e){}if(r[a]=u,e===a)break}catch(e){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return c(e,!1)},r.getJSON=function(e){return c(e,!0)},r.remove=function(n,t){i(n,"",e(t,{expires:-1}))},r.defaults={},r.withConverter=t,r}(function(){})});
jquery-plugins/json2.min.js DELETED
@@ -1,7 +0,0 @@
1
- var JSON;JSON||(JSON={});
2
- (function(){function k(a){return a<10?"0"+a:a}function o(a){p.lastIndex=0;return p.test(a)?'"'+a.replace(p,function(a){var c=r[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function l(a,j){var c,d,h,m,g=e,f,b=j[a];b&&typeof b==="object"&&typeof b.toJSON==="function"&&(b=b.toJSON(a));typeof i==="function"&&(b=i.call(j,a,b));switch(typeof b){case "string":return o(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b);case "object":if(!b)return"null";
3
- e+=n;f=[];if(Object.prototype.toString.apply(b)==="[object Array]"){m=b.length;for(c=0;c<m;c+=1)f[c]=l(c,b)||"null";h=f.length===0?"[]":e?"[\n"+e+f.join(",\n"+e)+"\n"+g+"]":"["+f.join(",")+"]";e=g;return h}if(i&&typeof i==="object"){m=i.length;for(c=0;c<m;c+=1)typeof i[c]==="string"&&(d=i[c],(h=l(d,b))&&f.push(o(d)+(e?": ":":")+h))}else for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(h=l(d,b))&&f.push(o(d)+(e?": ":":")+h);h=f.length===0?"{}":e?"{\n"+e+f.join(",\n"+e)+"\n"+g+"}":"{"+f.join(",")+
4
- "}";e=g;return h}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+k(this.getUTCMonth()+1)+"-"+k(this.getUTCDate())+"T"+k(this.getUTCHours())+":"+k(this.getUTCMinutes())+":"+k(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
5
- p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e,n,r={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},i;if(typeof JSON.stringify!=="function")JSON.stringify=function(a,j,c){var d;n=e="";if(typeof c==="number")for(d=0;d<c;d+=1)n+=" ";else typeof c==="string"&&(n=c);if((i=j)&&typeof j!=="function"&&(typeof j!=="object"||typeof j.length!=="number"))throw Error("JSON.stringify");return l("",
6
- {"":a})};if(typeof JSON.parse!=="function")JSON.parse=function(a,e){function c(a,d){var g,f,b=a[d];if(b&&typeof b==="object")for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(f=c(b,g),f!==void 0?b[g]=f:delete b[g]);return e.call(a,d,b)}var d,a=String(a);q.lastIndex=0;q.test(a)&&(a=a.replace(q,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
7
- "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return d=eval("("+a+")"),typeof e==="function"?c({"":d},""):d;throw new SyntaxError("JSON.parse");}})();
 
 
 
 
 
 
 
js/options.js CHANGED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function () {
2
+ var $ = jQuery;
3
+
4
+ $('#wpfront-notification-bar-options .pages-selection input[type="checkbox"]').change(function () {
5
+ var $this = $(this);
6
+ var $input = $this.parent().parent().parent().prev();
7
+ var $text = $input.val();
8
+
9
+ if ($this.prop('checked')) {
10
+ $text += ',' + $this.val();
11
+ } else {
12
+ $text = (',' + $text + ',').replace(',' + $this.val() + ',', ',');
13
+ }
14
+
15
+ $text = $text.replace(/(^[,\s]+)|([,\s]+$)/g, '');
16
+ $input.val($text);
17
+ });
18
+
19
+ $('#wpfront-notification-bar-options .roles-selection input[type="checkbox"]').change(function () {
20
+ var values = [];
21
+ var div = $(this).parent().parent().parent();
22
+ div.find('input:checked').each(function (i, e) {
23
+ values.push($(e).val());
24
+ });
25
+ div.children(":first").val(JSON.stringify(values));
26
+ });
27
+
28
+ $('#wpfront-notification-bar-options input.date').datepicker({
29
+ 'dateFormat': 'yy-mm-dd'
30
+ });
31
+
32
+ $('#wpfront-notification-bar-options input.time').timepicker({
33
+ 'timeFormat': 'h:i a'
34
+ });
35
+
36
+ $('#chk_button_action_url_noopener').change(function() {
37
+ $('#txt_button_action_url_noopener').val($(this).prop('checked') ? 1 : 0);
38
+ });
39
+
40
+ function setColorPicker(div) {
41
+ if(div.ColorPicker) {
42
+ div.ColorPicker({
43
+ color: div.attr('color'),
44
+ onShow: function (colpkr) {
45
+ $(colpkr).fadeIn(500);
46
+ return false;
47
+ }, onHide: function (colpkr) {
48
+ $(colpkr).fadeOut(500);
49
+ return false;
50
+ },
51
+ onChange: function (hsb, hex, rgb) {
52
+ div.css('backgroundColor', '#' + hex);
53
+ div.next().val('#' + hex);
54
+ }
55
+ }).css('backgroundColor', div.attr('color'));
56
+ }
57
+ }
58
+
59
+ $('#wpfront-notification-bar-options').find(".color-selector").each(function (i, e) {
60
+ setColorPicker($(e));
61
+ });
62
+
63
+ });
js/options.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ jQuery(document).ready(function(){function e(a){a.ColorPicker&&a.ColorPicker({color:a.attr("color"),onShow:function(a){b(a).fadeIn(500);return!1},onHide:function(a){b(a).fadeOut(500);return!1},onChange:function(b,c,f){a.css("backgroundColor","#"+c);a.next().val("#"+c)}}).css("backgroundColor",a.attr("color"))}var b=jQuery;b('#wpfront-notification-bar-options .pages-selection input[type="checkbox"]').change(function(){var a=b(this),d=a.parent().parent().parent().prev(),c=d.val();c=a.prop("checked")?
2
+ c+(","+a.val()):(","+c+",").replace(","+a.val()+",",",");c=c.replace(/(^[,\s]+)|([,\s]+$)/g,"");d.val(c)});b('#wpfront-notification-bar-options .roles-selection input[type="checkbox"]').change(function(){var a=[],d=b(this).parent().parent().parent();d.find("input:checked").each(function(c,d){a.push(b(d).val())});d.children(":first").val(JSON.stringify(a))});b("#wpfront-notification-bar-options input.date").datepicker({dateFormat:"yy-mm-dd"});b("#wpfront-notification-bar-options input.time").timepicker({timeFormat:"h:i a"});
3
+ b("#chk_button_action_url_noopener").change(function(){b("#txt_button_action_url_noopener").val(b(this).prop("checked")?1:0)});b("#wpfront-notification-bar-options").find(".color-selector").each(function(a,d){e(b(d))})});
js/wpfront-notification-bar.js CHANGED
@@ -11,18 +11,32 @@
11
  */
12
 
13
  (function() {
14
- var $ = jQuery;
15
-
16
  //displays the notification bar
17
  window.wpfront_notification_bar = function(data) {
18
- var keep_closed_cookie = "wpfront-notification-bar-keep-closed";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- var spacer = $("#wpfront-notification-bar-spacer").show();
21
  var bar = $("#wpfront-notification-bar");
22
  var open_button = $("#wpfront-notification-bar-open-button");
23
 
24
  //set the position
25
  if (data.position == 1) {
 
26
  var top = 0;
27
  if (data.fixed_position && data.is_admin_bar_showing) {
28
  top = $("html").css("margin-top");
@@ -39,6 +53,7 @@
39
  spacer.css("top", data.position_offset + "px");
40
  }
41
  else {
 
42
  $("body").append(spacer);
43
  bar.css("bottom", "0px");
44
  }
@@ -79,21 +94,32 @@
79
  //set height to auto if in case content wraps on resize
80
  if (data.height == 0)
81
  bar.height("auto");
82
- open_button.hide();
 
 
 
 
 
83
  closed = false;
84
  }
85
  if (height == 0 && data.display_open_button) {
86
- open_button.show();
 
87
  }
88
  if (height == 0 && data.keep_closed && userclosed) {
89
  if (data.keep_closed_for > 0)
90
- $.cookie(keep_closed_cookie, 1, {path: "/", expires: data.keep_closed_for});
91
  else
92
- $.cookie(keep_closed_cookie, 1, {path: "/"});
93
  }
94
  };
95
 
96
  //set animation
 
 
 
 
 
97
  if (data.animate_delay > 0) {
98
  bar.stop().animate({"height": height + "px"}, data.animate_delay * 1000, "swing", callback);
99
  if (data.fixed_position)
@@ -128,7 +154,8 @@
128
  }
129
 
130
  if (data.keep_closed) {
131
- if ($.cookie(keep_closed_cookie)) {
 
132
  setHeight(0);
133
  return;
134
  }
@@ -137,6 +164,7 @@
137
  closed = true;
138
 
139
  if (data.display_scroll) {
 
140
  setHeight(0);
141
 
142
  $(window).scroll(function() {
@@ -153,9 +181,11 @@
153
  }
154
  else {
155
  //set open after seconds and auto close seconds.
 
156
  setTimeout(function() {
157
  setHeight(height, function() {
158
  if (data.auto_close_after > 0) {
 
159
  setTimeout(function() {
160
  setHeight(0, null, true);
161
  }, data.auto_close_after * 1000);
11
  */
12
 
13
  (function() {
 
 
14
  //displays the notification bar
15
  window.wpfront_notification_bar = function(data) {
16
+ var log = function(msg) {
17
+ if(data.log)
18
+ console.log('[WPFront Notification Bar] ' + msg);
19
+ };
20
+
21
+ if(typeof jQuery !== "function" || (data.keep_closed && typeof Cookies !== "function")) {
22
+ log('Waiting for ' + (typeof jQuery !== "function" ? 'jQuery.' : 'Cookies.'));
23
+ setTimeout(function(){
24
+ wpfront_notification_bar(data);
25
+ }, 100);
26
+ return;
27
+ }
28
+
29
+ var $ = jQuery;
30
+
31
+ var keep_closed_cookie = data.keep_closed_cookie;
32
 
33
+ var spacer = $("#wpfront-notification-bar-spacer").removeClass('hidden');
34
  var bar = $("#wpfront-notification-bar");
35
  var open_button = $("#wpfront-notification-bar-open-button");
36
 
37
  //set the position
38
  if (data.position == 1) {
39
+ log('Setting notification bar at top.');
40
  var top = 0;
41
  if (data.fixed_position && data.is_admin_bar_showing) {
42
  top = $("html").css("margin-top");
53
  spacer.css("top", data.position_offset + "px");
54
  }
55
  else {
56
+ log('Setting notification bar at bottom.');
57
  $("body").append(spacer);
58
  bar.css("bottom", "0px");
59
  }
94
  //set height to auto if in case content wraps on resize
95
  if (data.height == 0)
96
  bar.height("auto");
97
+
98
+ if(data.display_open_button) {
99
+ log('Setting reopen button state to hidden.');
100
+ open_button.addClass('hidden');
101
+ }
102
+
103
  closed = false;
104
  }
105
  if (height == 0 && data.display_open_button) {
106
+ log('Setting reopen button state to visible.');
107
+ open_button.removeClass('hidden');
108
  }
109
  if (height == 0 && data.keep_closed && userclosed) {
110
  if (data.keep_closed_for > 0)
111
+ Cookies.set(keep_closed_cookie, 1, {path: "/", expires: data.keep_closed_for});
112
  else
113
+ Cookies.set(keep_closed_cookie, 1, {path: "/"});
114
  }
115
  };
116
 
117
  //set animation
118
+ if(height > 0)
119
+ log('Setting notification bar state to visible.');
120
+ else
121
+ log('Setting notification bar state to hidden.');
122
+
123
  if (data.animate_delay > 0) {
124
  bar.stop().animate({"height": height + "px"}, data.animate_delay * 1000, "swing", callback);
125
  if (data.fixed_position)
154
  }
155
 
156
  if (data.keep_closed) {
157
+ if (Cookies.get(keep_closed_cookie)) {
158
+ log('Keep closed enabled and keep closed cookie exists. Hiding notification bar.');
159
  setHeight(0);
160
  return;
161
  }
164
  closed = true;
165
 
166
  if (data.display_scroll) {
167
+ log('Display on scroll enabled. Hiding notification bar.');
168
  setHeight(0);
169
 
170
  $(window).scroll(function() {
181
  }
182
  else {
183
  //set open after seconds and auto close seconds.
184
+ log('Setting notification bar open event after ' + data.display_after + ' second(s).');
185
  setTimeout(function() {
186
  setHeight(height, function() {
187
  if (data.auto_close_after > 0) {
188
+ log('Setting notification bar auto close event after ' + data.auto_close_after + ' second(s).');
189
  setTimeout(function() {
190
  setHeight(0, null, true);
191
  }, data.auto_close_after * 1000);
js/wpfront-notification-bar.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ (function(){window.wpfront_notification_bar=function(a){function b(g,b,d){b=b||e.noop;d&&(p=!0);if(0==g){if(h)return;h=!0}else{if(!h)return;h=!1}var k=b;b=function(){k();0<g&&(0==a.height&&f.height("auto"),a.display_open_button&&(c("Setting reopen button state to hidden."),l.addClass("hidden")),h=!1);0==g&&a.display_open_button&&(c("Setting reopen button state to visible."),l.removeClass("hidden"));0==g&&a.keep_closed&&d&&(0<a.keep_closed_for?Cookies.set(n,1,{path:"/",expires:a.keep_closed_for}):
2
+ Cookies.set(n,1,{path:"/"}))};0<g?c("Setting notification bar state to visible."):c("Setting notification bar state to hidden.");0<a.animate_delay?(f.stop().animate({height:g+"px"},1E3*a.animate_delay,"swing",b),a.fixed_position&&m.stop().animate({height:g+"px"},1E3*a.animate_delay)):(f.height(g),a.fixed_position&&m.height(g),b())}var c=function(b){a.log&&console.log("[WPFront Notification Bar] "+b)};if("function"!==typeof jQuery||a.keep_closed&&"function"!==typeof Cookies)c("Waiting for "+("function"!==
3
+ typeof jQuery?"jQuery.":"Cookies.")),setTimeout(function(){wpfront_notification_bar(a)},100);else{var e=jQuery,n=a.keep_closed_cookie,m=e("#wpfront-notification-bar-spacer").removeClass("hidden"),f=e("#wpfront-notification-bar"),l=e("#wpfront-notification-bar-open-button");if(1==a.position){c("Setting notification bar at top.");var d=0;a.fixed_position&&a.is_admin_bar_showing&&(d=e("html").css("margin-top"),"0px"==d&&(d=e("html").css("padding-top")),d=parseInt(d));a.fixed_position&&(d+=a.position_offset);
4
+ f.css("top",d+"px");l.css("top",d+"px");e("body").prepend(m);m.css("top",a.position_offset+"px")}else c("Setting notification bar at bottom."),e("body").append(m),f.css("bottom","0px");var k=f.height();0<a.height&&(k=a.height,f.find("table, tbody, tr").css("height","100%"));f.height(0).css({position:a.fixed_position?"fixed":"relative",visibility:"visible"});l.css({position:a.fixed_position?"fixed":"absolute"});var h=!1,p=!1;a.close_button&&f.find(".wpfront-close").click(function(){b(0,null,!0)});
5
+ a.button_action_close_bar&&f.find(".wpfront-button").click(function(){b(0,null,!0)});a.display_open_button&&l.click(function(){b(k)});a.keep_closed&&Cookies.get(n)?(c("Keep closed enabled and keep closed cookie exists. Hiding notification bar."),b(0)):(h=!0,a.display_scroll?(c("Display on scroll enabled. Hiding notification bar."),b(0),e(window).scroll(function(){p||(e(this).scrollTop()>a.display_scroll_offset?b(k):b(0))})):(c("Setting notification bar open event after "+a.display_after+" second(s)."),
6
+ setTimeout(function(){b(k,function(){0<a.auto_close_after&&(c("Setting notification bar auto close event after "+a.auto_close_after+" second(s)."),setTimeout(function(){b(0,null,!0)},1E3*a.auto_close_after))})},1E3*a.display_after)))}}})();
languages/wpfront-notification-bar-de_DE.mo DELETED
Binary file
languages/wpfront-notification-bar-de_DE/readme.txt DELETED
@@ -1 +0,0 @@
1
- Contributor: Anders Lind <erding-mallards.de>
 
languages/wpfront-notification-bar-de_DE/wpfront-notification-bar-de_DE.mo DELETED
Binary file
languages/wpfront-notification-bar-de_DE/wpfront-notification-bar-de_DE.po DELETED
@@ -1,341 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: WPFront Notification Bar\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: Tue Feb 11 2014 22:14:28 GMT+0100 (Mitteleuropäische Zeit)\n"
6
- "PO-Revision-Date: Tue Feb 11 2014 22:22:23 GMT+0100 (Mitteleuropäische Zeit)\n"
7
- "Last-Translator: Anders Lind <lind@erding-mallards.de>\n"
8
- "Language-Team: \n"
9
- "Language: German\n"
10
- "Plural-Forms: nplurals=2; plural=(n != 1)\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;"
18
- "_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;"
19
- "_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;esc_attr__:1;"
20
- "esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c;"
21
- "comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
22
- "X-Loco-Target-Locale: de_DE\n"
23
- "X-Generator: Loco - https://localise.biz/"
24
-
25
- #: ../templates/options-template.php:34
26
- msgid "WPFront Notification Bar Settings"
27
- msgstr "Einstellungen für WPFront Notification Bar"
28
-
29
- #: ../templates/options-template.php:44
30
- msgid ""
31
- "If you have a caching plugin, clear the cache for the new settings to take "
32
- "effect."
33
- msgstr ""
34
- "Falls Du ein Caching-Plugin verwendest, lösche bitte den Cache um die "
35
- "Änderungen zu sehen."
36
-
37
- #: ../templates/options-template.php:49
38
- msgid "Display"
39
- msgstr "Darstellung"
40
-
41
- #: ../templates/options-template.php:65
42
- msgid "Top"
43
- msgstr "Oben"
44
-
45
- #: ../templates/options-template.php:66
46
- msgid "Bottom"
47
- msgstr "Unten"
48
-
49
- #: ../templates/options-template.php:75
50
- msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
51
- msgstr "[Sticky Bar, die Leiste bleibt am oberen Fensterrand egal wie gescrolled wird.]"
52
-
53
- #: ../templates/options-template.php:83 ../templates/options-template.php:91
54
- msgid "px"
55
- msgstr "px"
56
-
57
- #: ../templates/options-template.php:83
58
- msgid "Set 0px to auto fit contents."
59
- msgstr "Setze auf 0px um den Inhalt automatisch einzupassen."
60
-
61
- #: ../templates/options-template.php:91
62
- msgid ""
63
- "(Top bar only) If you find the bar overlapping, try increasing this value. (eg. "
64
- "WordPress 3.8 Twenty Fourteen theme, set 48px)"
65
- msgstr ""
66
- "(Nur Top Bar) Falls die Leiste überlappt, versuche diesen Wert zu erhöhen. (z.B."
67
- " verwende 48px für das Wordpress 3.8 Twenty Fourteen Thema)"
68
-
69
- #: ../templates/options-template.php:99 ../templates/options-template.php:107 ../templates/options-template.php:123
70
- msgid "second(s)"
71
- msgstr "sekunde(n)"
72
-
73
- #: ../templates/options-template.php:99
74
- msgid "Set 0 second(s) to display immediately."
75
- msgstr "Setze auf 0 Sekunde(n) damit die Leiste sofort gezeigt wird."
76
-
77
- #: ../templates/options-template.php:107
78
- msgid "Set 0 second(s) for no animation."
79
- msgstr "Setze auf 0 Sekunde(n) für keine Animation."
80
-
81
- #: ../templates/options-template.php:115
82
- msgid "[Displays a close button at the top right corner of the bar.]"
83
- msgstr "[Zeigt einen Schließen-Knopf oben rechts in der Leiste.]"
84
-
85
- #: ../templates/options-template.php:123
86
- msgid "Set 0 second(s) to disable auto close."
87
- msgstr "Setze auf 0 Sekunde(n) um das automatische Schließen auszuschalten."
88
-
89
- #: ../templates/options-template.php:139
90
- msgid "A reopen button will be displayed after the bar is closed."
91
- msgstr "Ein Wieder Öffnen-Knopf wird gezeigt, wenn die Leiste geschlossen wird."
92
-
93
- #: ../templates/options-template.php:147
94
- msgid "Once closed, bar will display closed on other pages."
95
- msgstr "Einmal geschlossen, bleibt die Leiste auf allen Seiten geschlossen."
96
-
97
- #: ../templates/options-template.php:155
98
- msgid "day(s)"
99
- msgstr "Tag(e)"
100
-
101
- #: ../templates/options-template.php:155
102
- msgid "Bar will be kept closed for the number of days specified from last closed date."
103
- msgstr ""
104
- "Die Leiste bleibt für die festelegte Anzahl Tage geschlossen, gezählt vom "
105
- "letzten Tag wenn sie geschlossen wurde."
106
-
107
- #: ../templates/options-template.php:160
108
- msgid "Content"
109
- msgstr "Inhalt"
110
-
111
- #: ../templates/options-template.php:169
112
- msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
113
- msgstr "[HTML-Tags sind erlaubt, z.B. <br /> für neue Zeile.]"
114
-
115
- #: ../templates/options-template.php:177
116
- msgid "[Displays a button next to the message.]"
117
- msgstr "[Zeige einen Knopf neben die Mitteilung.]"
118
-
119
- #: ../templates/options-template.php:222
120
- msgid "Filter"
121
- msgstr "Filter"
122
-
123
- #: ../templates/options-template.php:231
124
- msgid "All pages."
125
- msgstr "Alle Seiten."
126
-
127
- #: ../templates/options-template.php:236
128
- msgid "Only in landing page."
129
- msgstr "Nur auf die Startseite."
130
-
131
- #: ../templates/options-template.php:236
132
- msgid "[The first page they visit on your website.]"
133
- msgstr "[Die erste Seite einen Besucher sieht.]"
134
-
135
- #: ../templates/options-template.php:241
136
- msgid "Include in following pages"
137
- msgstr "Zeige auf die folgenden Seiten"
138
-
139
- #: ../templates/options-template.php:259
140
- msgid "Exclude in following pages"
141
- msgstr "Zeige nicht auf die folgenden Seiten"
142
-
143
- #: ../templates/options-template.php:279
144
- msgid "Color"
145
- msgstr "Farbe"
146
-
147
- #: ../templates/options-template.php:283
148
- msgid "Bar Color"
149
- msgstr "Leistenfarbe"
150
-
151
- #: ../templates/options-template.php:294 ../templates/options-template.php:319
152
- msgid "[Select two different colors to create a gradient.]"
153
- msgstr "[Wähle zwei Farben aus, um einen Farbverlauf zu erzeugen.]"
154
-
155
- #: ../templates/options-template.php:308
156
- msgid "Button Color"
157
- msgstr "Knopffarbe"
158
-
159
- #: ../templates/options-template.php:357
160
- msgid "[Normal, Hover, X]"
161
- msgstr "[Normal, Hover, X]"
162
-
163
- #: ../templates/options-template.php:362
164
- msgid "CSS"
165
- msgstr "CSS"
166
-
167
- #: ../templates/options-template.php:376
168
- msgid "Plugin Ideas"
169
- msgstr "Ideen für das Plugin"
170
-
171
- #: ../templates/options-template.php:378
172
- msgid "Settings Description"
173
- msgstr "Beschreibung der Einstellungen"
174
-
175
- #: ../templates/options-template.php:380
176
- msgid "Plugin FAQ"
177
- msgstr "Plugin FAQ"
178
-
179
- #: ../templates/options-template.php:382
180
- msgid "Feature Request"
181
- msgstr "Neue Funktionalität vorschlagen"
182
-
183
- #: ../templates/options-template.php:384
184
- msgid "Report Bug"
185
- msgstr "Fehler melden"
186
-
187
- #: ../templates/options-template.php:386
188
- msgid "Write Review"
189
- msgstr "Bewertung abgeben"
190
-
191
- #: ../templates/options-template.php:388
192
- msgid "Contact Me (syam@wpfront.com)"
193
- msgstr "Mich kontaktieren (syam@wpfront.com)"
194
-
195
- #: ../classes/class-wpfront-notification-bar.php:114
196
- msgid "WPFront Notification Bar"
197
- msgstr "WPFront Notification Bar"
198
-
199
- #: ../classes/class-wpfront-notification-bar.php:114
200
- msgid "Notification Bar"
201
- msgstr "Mitteilungsleiste"
202
-
203
- #: ../classes/class-wpfront-notification-bar.php:146
204
- msgid "You do not have sufficient permissions to access this page."
205
- msgstr "Du besitzt nicht die erforderliche Rechte, um diese Seite anzuzeigen."
206
-
207
- #: ../classes/class-wpfront-notification-bar.php:156
208
- msgid "Settings"
209
- msgstr "Einstellungen"
210
-
211
- #: ../classes/class-wpfront-notification-bar.php:216
212
- msgid "Save Changes"
213
- msgstr "Einstellungen speichern"
214
-
215
- #: ../classes/class-wpfront-notification-bar.php:231 ../classes/class-wpfront-notification-bar.php:235
216
- msgid "[Page]"
217
- msgstr "[Seite]"
218
-
219
- #: ../classes/class-wpfront-notification-bar.php:231
220
- msgid "Home"
221
- msgstr "Home"
222
-
223
- #: ../classes/class-wpfront-notification-bar.php:240
224
- msgid "[Post]"
225
- msgstr "[Beitrag]"
226
-
227
- #: ../classes/class-wpfront-notification-bar-options.php:41
228
- msgid "Enabled"
229
- msgstr "Aktiviert"
230
-
231
- #: ../classes/class-wpfront-notification-bar-options.php:42
232
- msgid "Position"
233
- msgstr "Position"
234
-
235
- #: ../classes/class-wpfront-notification-bar-options.php:43
236
- msgid "Bar Height"
237
- msgstr "Leistenhöhe"
238
-
239
- #: ../classes/class-wpfront-notification-bar-options.php:44
240
- msgid "Message Text"
241
- msgstr "Mitteilungstext"
242
-
243
- #: ../classes/class-wpfront-notification-bar-options.php:45
244
- msgid "Display After"
245
- msgstr "Zeige nach"
246
-
247
- #: ../classes/class-wpfront-notification-bar-options.php:46
248
- msgid "Animation Duration"
249
- msgstr "Animationsdauer"
250
-
251
- #: ../classes/class-wpfront-notification-bar-options.php:47
252
- msgid "Display Close Button"
253
- msgstr "Schließen-Knopf zeigen"
254
-
255
- #: ../classes/class-wpfront-notification-bar-options.php:48
256
- msgid "Auto Close After"
257
- msgstr "Schließe automatisch nach"
258
-
259
- #: ../classes/class-wpfront-notification-bar-options.php:49
260
- msgid "Display Button"
261
- msgstr "Knopf zeigen"
262
-
263
- #: ../classes/class-wpfront-notification-bar-options.php:50
264
- msgid "Button Text"
265
- msgstr "Knopfbeschriftung"
266
-
267
- #: ../classes/class-wpfront-notification-bar-options.php:51
268
- msgid "Button Action"
269
- msgstr "Knopfaktion"
270
-
271
- #: ../classes/class-wpfront-notification-bar-options.php:52
272
- msgid "Open URL:"
273
- msgstr "Öffne URL:"
274
-
275
- #: ../classes/class-wpfront-notification-bar-options.php:53
276
- msgid "Open URL in new tab/window"
277
- msgstr "Öffne URL in neues Fenster/neuen Tab"
278
-
279
- #: ../classes/class-wpfront-notification-bar-options.php:54
280
- msgid "Execute JavaScript"
281
- msgstr "JavaScript ausführen"
282
-
283
- #: ../classes/class-wpfront-notification-bar-options.php:55
284
- msgid "Close Bar on Button Click"
285
- msgstr "Leiste beim Knopfdruck schließen"
286
-
287
- #: ../classes/class-wpfront-notification-bar-options.php:56
288
- msgid "Display Shadow"
289
- msgstr "Schatten zeigen"
290
-
291
- #: ../classes/class-wpfront-notification-bar-options.php:57
292
- msgid "Fixed at Position"
293
- msgstr "An bestimmten Position fixieren"
294
-
295
- #: ../classes/class-wpfront-notification-bar-options.php:58
296
- msgid "Message Text Color"
297
- msgstr "Textfarbe"
298
-
299
- #: ../classes/class-wpfront-notification-bar-options.php:59 ../classes/class-wpfront-notification-bar-options.php:61
300
- msgid "From Color"
301
- msgstr "Von Farbe"
302
-
303
- #: ../classes/class-wpfront-notification-bar-options.php:60 ../classes/class-wpfront-notification-bar-options.php:62
304
- msgid "To Color"
305
- msgstr "Zu Farbe"
306
-
307
- #: ../classes/class-wpfront-notification-bar-options.php:63
308
- msgid "Button Text Color"
309
- msgstr "Knopftext-Farbe"
310
-
311
- #: ../classes/class-wpfront-notification-bar-options.php:64
312
- msgid "Display on Pages"
313
- msgstr "Zeige auf Seiten"
314
-
315
- #: ../classes/class-wpfront-notification-bar-options.php:67
316
- msgid "Display Reopen Button"
317
- msgstr "Wiederöffnen-Knopf zeigen"
318
-
319
- #: ../classes/class-wpfront-notification-bar-options.php:68
320
- msgid "Reopen Button Color"
321
- msgstr "Wiederöffnen-Knopf-Farbe"
322
-
323
- #: ../classes/class-wpfront-notification-bar-options.php:69
324
- msgid "Keep Closed"
325
- msgstr "Geschlossen lassen"
326
-
327
- #: ../classes/class-wpfront-notification-bar-options.php:70
328
- msgid "Keep Closed For"
329
- msgstr "Geschlossen lassen für"
330
-
331
- #: ../classes/class-wpfront-notification-bar-options.php:71
332
- msgid "Position Offset"
333
- msgstr "Positionsabstand"
334
-
335
- #: ../classes/class-wpfront-notification-bar-options.php:72
336
- msgid "Custom CSS"
337
- msgstr "Spezifisches CSS"
338
-
339
- #: ../classes/class-wpfront-notification-bar-options.php:73
340
- msgid "Close Button Color"
341
- msgstr "Schließen-Knopf-Farbe"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/wpfront-notification-bar-de_DE/wpfront-notification-bar.pot DELETED
@@ -1,337 +0,0 @@
1
- #. Loco Gettext template
2
- #, fuzzy
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: WPFront Notification Bar\n"
6
- "Report-Msgid-Bugs-To: \n"
7
- "POT-Creation-Date: Tue Feb 11 2014 22:14:28 GMT+0100 (Mitteleuropäische Zeit)\n"
8
- "POT-Revision-Date: Tue Feb 11 2014 22:22:52 GMT+0100 (Mitteleuropäische Zeit)\n"
9
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
- "Last-Translator: \n"
11
- "Language-Team: \n"
12
- "Language: \n"
13
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n"
14
- "MIME-Version: 1.0\n"
15
- "Content-Type: text/plain; charset=UTF-8\n"
16
- "Content-Transfer-Encoding: 8bit\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-Basepath: .\n"
19
- "X-Poedit-SearchPath-0: ..\n"
20
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;"
21
- "_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;"
22
- "_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;esc_attr__:1;"
23
- "esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c;"
24
- "comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
25
- "X-Generator: Loco - https://localise.biz/"
26
-
27
- #: ../templates/options-template.php:34
28
- msgid "WPFront Notification Bar Settings"
29
- msgstr ""
30
-
31
- #: ../templates/options-template.php:44
32
- msgid ""
33
- "If you have a caching plugin, clear the cache for the new settings to take "
34
- "effect."
35
- msgstr ""
36
-
37
- #: ../templates/options-template.php:49
38
- msgid "Display"
39
- msgstr ""
40
-
41
- #: ../templates/options-template.php:65
42
- msgid "Top"
43
- msgstr ""
44
-
45
- #: ../templates/options-template.php:66
46
- msgid "Bottom"
47
- msgstr ""
48
-
49
- #: ../templates/options-template.php:75
50
- msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
51
- msgstr ""
52
-
53
- #: ../templates/options-template.php:83 ../templates/options-template.php:91
54
- msgid "px"
55
- msgstr ""
56
-
57
- #: ../templates/options-template.php:83
58
- msgid "Set 0px to auto fit contents."
59
- msgstr ""
60
-
61
- #: ../templates/options-template.php:91
62
- msgid ""
63
- "(Top bar only) If you find the bar overlapping, try increasing this value. (eg. "
64
- "WordPress 3.8 Twenty Fourteen theme, set 48px)"
65
- msgstr ""
66
-
67
- #: ../templates/options-template.php:99 ../templates/options-template.php:107 ../templates/options-template.php:123
68
- msgid "second(s)"
69
- msgstr ""
70
-
71
- #: ../templates/options-template.php:99
72
- msgid "Set 0 second(s) to display immediately."
73
- msgstr ""
74
-
75
- #: ../templates/options-template.php:107
76
- msgid "Set 0 second(s) for no animation."
77
- msgstr ""
78
-
79
- #: ../templates/options-template.php:115
80
- msgid "[Displays a close button at the top right corner of the bar.]"
81
- msgstr ""
82
-
83
- #: ../templates/options-template.php:123
84
- msgid "Set 0 second(s) to disable auto close."
85
- msgstr ""
86
-
87
- #: ../templates/options-template.php:139
88
- msgid "A reopen button will be displayed after the bar is closed."
89
- msgstr ""
90
-
91
- #: ../templates/options-template.php:147
92
- msgid "Once closed, bar will display closed on other pages."
93
- msgstr ""
94
-
95
- #: ../templates/options-template.php:155
96
- msgid "day(s)"
97
- msgstr ""
98
-
99
- #: ../templates/options-template.php:155
100
- msgid "Bar will be kept closed for the number of days specified from last closed date."
101
- msgstr ""
102
-
103
- #: ../templates/options-template.php:160
104
- msgid "Content"
105
- msgstr ""
106
-
107
- #: ../templates/options-template.php:169
108
- msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
109
- msgstr ""
110
-
111
- #: ../templates/options-template.php:177
112
- msgid "[Displays a button next to the message.]"
113
- msgstr ""
114
-
115
- #: ../templates/options-template.php:222
116
- msgid "Filter"
117
- msgstr ""
118
-
119
- #: ../templates/options-template.php:231
120
- msgid "All pages."
121
- msgstr ""
122
-
123
- #: ../templates/options-template.php:236
124
- msgid "Only in landing page."
125
- msgstr ""
126
-
127
- #: ../templates/options-template.php:236
128
- msgid "[The first page they visit on your website.]"
129
- msgstr ""
130
-
131
- #: ../templates/options-template.php:241
132
- msgid "Include in following pages"
133
- msgstr ""
134
-
135
- #: ../templates/options-template.php:259
136
- msgid "Exclude in following pages"
137
- msgstr ""
138
-
139
- #: ../templates/options-template.php:279
140
- msgid "Color"
141
- msgstr ""
142
-
143
- #: ../templates/options-template.php:283
144
- msgid "Bar Color"
145
- msgstr ""
146
-
147
- #: ../templates/options-template.php:294 ../templates/options-template.php:319
148
- msgid "[Select two different colors to create a gradient.]"
149
- msgstr ""
150
-
151
- #: ../templates/options-template.php:308
152
- msgid "Button Color"
153
- msgstr ""
154
-
155
- #: ../templates/options-template.php:357
156
- msgid "[Normal, Hover, X]"
157
- msgstr ""
158
-
159
- #: ../templates/options-template.php:362
160
- msgid "CSS"
161
- msgstr ""
162
-
163
- #: ../templates/options-template.php:376
164
- msgid "Plugin Ideas"
165
- msgstr ""
166
-
167
- #: ../templates/options-template.php:378
168
- msgid "Settings Description"
169
- msgstr ""
170
-
171
- #: ../templates/options-template.php:380
172
- msgid "Plugin FAQ"
173
- msgstr ""
174
-
175
- #: ../templates/options-template.php:382
176
- msgid "Feature Request"
177
- msgstr ""
178
-
179
- #: ../templates/options-template.php:384
180
- msgid "Report Bug"
181
- msgstr ""
182
-
183
- #: ../templates/options-template.php:386
184
- msgid "Write Review"
185
- msgstr ""
186
-
187
- #: ../templates/options-template.php:388
188
- msgid "Contact Me (syam@wpfront.com)"
189
- msgstr ""
190
-
191
- #: ../classes/class-wpfront-notification-bar.php:114
192
- msgid "WPFront Notification Bar"
193
- msgstr ""
194
-
195
- #: ../classes/class-wpfront-notification-bar.php:114
196
- msgid "Notification Bar"
197
- msgstr ""
198
-
199
- #: ../classes/class-wpfront-notification-bar.php:146
200
- msgid "You do not have sufficient permissions to access this page."
201
- msgstr ""
202
-
203
- #: ../classes/class-wpfront-notification-bar.php:156
204
- msgid "Settings"
205
- msgstr ""
206
-
207
- #: ../classes/class-wpfront-notification-bar.php:216
208
- msgid "Save Changes"
209
- msgstr ""
210
-
211
- #: ../classes/class-wpfront-notification-bar.php:231 ../classes/class-wpfront-notification-bar.php:235
212
- msgid "[Page]"
213
- msgstr ""
214
-
215
- #: ../classes/class-wpfront-notification-bar.php:231
216
- msgid "Home"
217
- msgstr ""
218
-
219
- #: ../classes/class-wpfront-notification-bar.php:240
220
- msgid "[Post]"
221
- msgstr ""
222
-
223
- #: ../classes/class-wpfront-notification-bar-options.php:41
224
- msgid "Enabled"
225
- msgstr ""
226
-
227
- #: ../classes/class-wpfront-notification-bar-options.php:42
228
- msgid "Position"
229
- msgstr ""
230
-
231
- #: ../classes/class-wpfront-notification-bar-options.php:43
232
- msgid "Bar Height"
233
- msgstr ""
234
-
235
- #: ../classes/class-wpfront-notification-bar-options.php:44
236
- msgid "Message Text"
237
- msgstr ""
238
-
239
- #: ../classes/class-wpfront-notification-bar-options.php:45
240
- msgid "Display After"
241
- msgstr ""
242
-
243
- #: ../classes/class-wpfront-notification-bar-options.php:46
244
- msgid "Animation Duration"
245
- msgstr ""
246
-
247
- #: ../classes/class-wpfront-notification-bar-options.php:47
248
- msgid "Display Close Button"
249
- msgstr ""
250
-
251
- #: ../classes/class-wpfront-notification-bar-options.php:48
252
- msgid "Auto Close After"
253
- msgstr ""
254
-
255
- #: ../classes/class-wpfront-notification-bar-options.php:49
256
- msgid "Display Button"
257
- msgstr ""
258
-
259
- #: ../classes/class-wpfront-notification-bar-options.php:50
260
- msgid "Button Text"
261
- msgstr ""
262
-
263
- #: ../classes/class-wpfront-notification-bar-options.php:51
264
- msgid "Button Action"
265
- msgstr ""
266
-
267
- #: ../classes/class-wpfront-notification-bar-options.php:52
268
- msgid "Open URL:"
269
- msgstr ""
270
-
271
- #: ../classes/class-wpfront-notification-bar-options.php:53
272
- msgid "Open URL in new tab/window"
273
- msgstr ""
274
-
275
- #: ../classes/class-wpfront-notification-bar-options.php:54
276
- msgid "Execute JavaScript"
277
- msgstr ""
278
-
279
- #: ../classes/class-wpfront-notification-bar-options.php:55
280
- msgid "Close Bar on Button Click"
281
- msgstr ""
282
-
283
- #: ../classes/class-wpfront-notification-bar-options.php:56
284
- msgid "Display Shadow"
285
- msgstr ""
286
-
287
- #: ../classes/class-wpfront-notification-bar-options.php:57
288
- msgid "Fixed at Position"
289
- msgstr ""
290
-
291
- #: ../classes/class-wpfront-notification-bar-options.php:58
292
- msgid "Message Text Color"
293
- msgstr ""
294
-
295
- #: ../classes/class-wpfront-notification-bar-options.php:59 ../classes/class-wpfront-notification-bar-options.php:61
296
- msgid "From Color"
297
- msgstr ""
298
-
299
- #: ../classes/class-wpfront-notification-bar-options.php:60 ../classes/class-wpfront-notification-bar-options.php:62
300
- msgid "To Color"
301
- msgstr ""
302
-
303
- #: ../classes/class-wpfront-notification-bar-options.php:63
304
- msgid "Button Text Color"
305
- msgstr ""
306
-
307
- #: ../classes/class-wpfront-notification-bar-options.php:64
308
- msgid "Display on Pages"
309
- msgstr ""
310
-
311
- #: ../classes/class-wpfront-notification-bar-options.php:67
312
- msgid "Display Reopen Button"
313
- msgstr ""
314
-
315
- #: ../classes/class-wpfront-notification-bar-options.php:68
316
- msgid "Reopen Button Color"
317
- msgstr ""
318
-
319
- #: ../classes/class-wpfront-notification-bar-options.php:69
320
- msgid "Keep Closed"
321
- msgstr ""
322
-
323
- #: ../classes/class-wpfront-notification-bar-options.php:70
324
- msgid "Keep Closed For"
325
- msgstr ""
326
-
327
- #: ../classes/class-wpfront-notification-bar-options.php:71
328
- msgid "Position Offset"
329
- msgstr ""
330
-
331
- #: ../classes/class-wpfront-notification-bar-options.php:72
332
- msgid "Custom CSS"
333
- msgstr ""
334
-
335
- #: ../classes/class-wpfront-notification-bar-options.php:73
336
- msgid "Close Button Color"
337
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/wpfront-notification-bar-hu_HU.mo DELETED
Binary file
languages/wpfront-notification-bar-hu_HU/readme.txt DELETED
@@ -1 +0,0 @@
1
- Contributor: Botfai Tibor <gidano.hu>
 
languages/wpfront-notification-bar-hu_HU/wpfront-notification-bar-hu_HU.mo DELETED
Binary file
languages/wpfront-notification-bar-hu_HU/wpfront-notification-bar-hu_HU.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-06-09 11:12+0100\n"
6
- "Last-Translator: gidano <gidano@gmail.com>\n"
7
- "Language-Team: WPFront <contact@wpfront.com>\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.6.5\n"
12
- "X-Poedit-Basepath: .\n"
13
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Poedit-KeywordsList: __;_e\n"
16
- "Language: hu_HU\n"
17
- "X-Poedit-SearchPath-0: ..\n"
18
-
19
- #: ../classes/base/class-wpfront-base-menu.php:52
20
- msgid "Name"
21
- msgstr "Név"
22
-
23
- #: ../classes/base/class-wpfront-base-menu.php:53
24
- msgid "Version"
25
- msgstr "Verzió"
26
-
27
- #: ../classes/base/class-wpfront-base-menu.php:54
28
- msgid "Rating"
29
- msgstr "Értékelés"
30
-
31
- #: ../classes/base/class-wpfront-base-menu.php:55
32
- msgid "Description"
33
- msgstr "Leírás"
34
-
35
- #: ../classes/base/class-wpfront-base-menu.php:69
36
- #, php-format
37
- msgid "based on %s rating(s)"
38
- msgstr "%s értékelés alapján"
39
-
40
- #: ../classes/base/class-wpfront-base-menu.php:105
41
- msgid "Unable to communicate with WordPress.org"
42
- msgstr "Nem lehet kommunikálni a WordPress.org-al"
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 "Szerző %s"
53
-
54
- #: ../classes/base/class-wpfront-base-menu.php:154
55
- #, php-format
56
- msgid "More information about %s"
57
- msgstr "További információ: %s"
58
-
59
- #: ../classes/base/class-wpfront-base-menu.php:154
60
- msgid "Details"
61
- msgstr "Részletek"
62
-
63
- #: ../classes/base/class-wpfront-base-menu.php:163
64
- #, php-format
65
- msgid "Install %s"
66
- msgstr "%s telepítése"
67
-
68
- #: ../classes/base/class-wpfront-base-menu.php:163
69
- msgid "Install Now"
70
- msgstr "Telepítés most"
71
-
72
- #: ../classes/base/class-wpfront-base-menu.php:168
73
- #, php-format
74
- msgid "Update to version %s"
75
- msgstr "Frissítés %s verzióra"
76
-
77
- #: ../classes/base/class-wpfront-base-menu.php:168
78
- msgid "Update Now"
79
- msgstr "Frissítés most"
80
-
81
- #: ../classes/base/class-wpfront-base-menu.php:173
82
- msgid "This plugin is already installed and is up to date"
83
- msgstr "Ez a plugin már telepítve van, és naprakész"
84
-
85
- #: ../classes/base/class-wpfront-base-menu.php:173
86
- msgid "Installed"
87
- msgstr "Telepítve"
88
-
89
- #: ../classes/base/class-wpfront-base-menu.php:175
90
- #: ../classes/base/class-wpfront-base.php:105
91
- msgid "Settings"
92
- msgstr "Beállítások"
93
-
94
- #: ../classes/base/class-wpfront-base-menu.php:177
95
- msgid "Activate"
96
- msgstr "Aktiválás"
97
-
98
- #: ../classes/base/class-wpfront-base-menu.php:199
99
- msgid "Feedback"
100
- msgstr "Visszajelzés"
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 "Összes Plugin"
109
-
110
- #: ../classes/base/class-wpfront-base.php:130
111
- msgid "You do not have sufficient permissions to access this page."
112
- msgstr "Nem megfelelő a jogosultsága az oldal megtekintéséhez."
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
- "Ha van egy gyorsítótárazási pluginod, töröld a gyorsítótárat az új "
120
- "beállítások életbe léptetéséhez."
121
-
122
- #: ../classes/base/class-wpfront-base.php:168
123
- msgid "Settings Description"
124
- msgstr "Beállítások ismertetése"
125
-
126
- #: ../classes/base/class-wpfront-base.php:170
127
- msgid "Plugin FAQ"
128
- msgstr "Plugin GyIK"
129
-
130
- #: ../classes/base/class-wpfront-base.php:172
131
- msgid "Feature Request"
132
- msgstr "Szolgáltatás kérése"
133
-
134
- #: ../classes/base/class-wpfront-base.php:174
135
- msgid "Report Bug"
136
- msgstr "Hibajelentés"
137
-
138
- #: ../classes/base/class-wpfront-base.php:176
139
- msgid "Write Review"
140
- msgstr "Írja meg véleményét!"
141
-
142
- #: ../classes/base/class-wpfront-base.php:178
143
- msgid "Contact Me (syam@wpfront.com)"
144
- msgstr "Elérésem, (syam@wpfront.com)"
145
-
146
- #: ../classes/base/class-wpfront-base.php:180
147
- msgid "Buy me a Beer or Coffee"
148
- msgstr "Hívj meg egy kv-ra vagy sörre!"
149
-
150
- #: ../classes/base/class-wpfront-base.php:197
151
- msgid "Save Changes"
152
- msgstr "Változások mentése"
153
-
154
- #: ../classes/class-wpfront-notification-bar-options.php:41
155
- msgid "Enabled"
156
- msgstr "Engedélyezve"
157
-
158
- #: ../classes/class-wpfront-notification-bar-options.php:42
159
- msgid "Position"
160
- msgstr "Elhelyezkedés"
161
-
162
- #: ../classes/class-wpfront-notification-bar-options.php:43
163
- msgid "Bar Height"
164
- msgstr "Sáv magassága"
165
-
166
- #: ../classes/class-wpfront-notification-bar-options.php:44
167
- msgid "Message Text"
168
- msgstr "Üzenet szövege"
169
-
170
- #: ../classes/class-wpfront-notification-bar-options.php:45
171
- msgid "Display After"
172
- msgstr "Megjelenés"
173
-
174
- #: ../classes/class-wpfront-notification-bar-options.php:46
175
- msgid "Animation Duration"
176
- msgstr "Animáció időtartama"
177
-
178
- #: ../classes/class-wpfront-notification-bar-options.php:47
179
- msgid "Display Close Button"
180
- msgstr "Bezárés gomb jelenjen meg"
181
-
182
- #: ../classes/class-wpfront-notification-bar-options.php:48
183
- msgid "Auto Close After"
184
- msgstr "Auto bezárás"
185
-
186
- #: ../classes/class-wpfront-notification-bar-options.php:49
187
- msgid "Display Button"
188
- msgstr "Gomb megjelenítés"
189
-
190
- #: ../classes/class-wpfront-notification-bar-options.php:50
191
- msgid "Button Text"
192
- msgstr "Gomb szöveg"
193
-
194
- #: ../classes/class-wpfront-notification-bar-options.php:51
195
- msgid "Button Action"
196
- msgstr "Gomb művelet"
197
-
198
- #: ../classes/class-wpfront-notification-bar-options.php:52
199
- msgid "Open URL:"
200
- msgstr "URL megnyitás"
201
-
202
- #: ../classes/class-wpfront-notification-bar-options.php:53
203
- msgid "Open URL in new tab/window"
204
- msgstr "URL megnyitás új fülön/ablakban"
205
-
206
- #: ../classes/class-wpfront-notification-bar-options.php:54
207
- msgid "Execute JavaScript"
208
- msgstr "JavaScript végrehajtása"
209
-
210
- #: ../classes/class-wpfront-notification-bar-options.php:55
211
- msgid "Close Bar on Button Click"
212
- msgstr "Sáv bezárása gombra kattintás"
213
-
214
- #: ../classes/class-wpfront-notification-bar-options.php:56
215
- msgid "Display Shadow"
216
- msgstr "Árnyék megjelenés"
217
-
218
- #: ../classes/class-wpfront-notification-bar-options.php:57
219
- msgid "Fixed at Position"
220
- msgstr "Rögzített pozíció"
221
-
222
- #: ../classes/class-wpfront-notification-bar-options.php:58
223
- msgid "Message Text Color"
224
- msgstr "Üzenet szöveg szín"
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 "Kezdő szín"
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 "Befejező szín"
235
-
236
- #: ../classes/class-wpfront-notification-bar-options.php:63
237
- msgid "Button Text Color"
238
- msgstr "Gomb szöveg szín"
239
-
240
- #: ../classes/class-wpfront-notification-bar-options.php:64
241
- msgid "Display on Pages"
242
- msgstr "Hol jelenjen meg"
243
-
244
- #: ../classes/class-wpfront-notification-bar-options.php:67
245
- msgid "Display Reopen Button"
246
- msgstr "Újranyitó gomb megjelenítése"
247
-
248
- #: ../classes/class-wpfront-notification-bar-options.php:68
249
- msgid "Reopen Button Color"
250
- msgstr "Újranyitó gomb színe"
251
-
252
- #: ../classes/class-wpfront-notification-bar-options.php:69
253
- msgid "Keep Closed"
254
- msgstr "Tartsa bezárva"
255
-
256
- #: ../classes/class-wpfront-notification-bar-options.php:70
257
- msgid "Keep Closed For"
258
- msgstr "Bezárva tartás"
259
-
260
- #: ../classes/class-wpfront-notification-bar-options.php:71
261
- msgid "Position Offset"
262
- msgstr "Pozíció eltolás"
263
-
264
- #: ../classes/class-wpfront-notification-bar-options.php:72
265
- msgid "Custom CSS"
266
- msgstr "Egyedi CSS"
267
-
268
- #: ../classes/class-wpfront-notification-bar-options.php:73
269
- msgid "Close Button Color"
270
- msgstr "Bezárás gomb színe"
271
-
272
- #: ../classes/class-wpfront-notification-bar-options.php:76
273
- msgid "Display for User Roles"
274
- msgstr "Ki számára látható"
275
-
276
- #: ../classes/class-wpfront-notification-bar-options.php:78
277
- msgid "Display on Scroll"
278
- msgstr "Megjelenés görgetéskor"
279
-
280
- #: ../classes/class-wpfront-notification-bar-options.php:79
281
- msgid "Scroll Offset"
282
- msgstr "Görgetés eltolás"
283
-
284
- #: ../classes/class-wpfront-notification-bar-options.php:80
285
- msgid "Start Date"
286
- msgstr "Indítás dátuma"
287
-
288
- #: ../classes/class-wpfront-notification-bar-options.php:81
289
- msgid "End Date"
290
- msgstr "Leállás dátuma"
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 "Értesítési sáv"
299
-
300
- #: ../classes/class-wpfront-notification-bar.php:176
301
- #: ../classes/class-wpfront-notification-bar.php:180
302
- msgid "[Page]"
303
- msgstr "[Oldal]"
304
-
305
- #: ../classes/class-wpfront-notification-bar.php:176
306
- msgid "Home"
307
- msgstr "Kezdőlap"
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 Beállítások"
316
-
317
- #: ../templates/options-template.php:34
318
- msgid "Display"
319
- msgstr "Megjelenés"
320
-
321
- #: ../templates/options-template.php:50
322
- msgid "Top"
323
- msgstr "Felül"
324
-
325
- #: ../templates/options-template.php:51
326
- msgid "Bottom"
327
- msgstr "Alul"
328
-
329
- #: ../templates/options-template.php:60
330
- msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
331
- msgstr "[Ragadós sáv, a sáv pozícióban marad a görgetéstől függetlenül.]"
332
-
333
- #: ../templates/options-template.php:68
334
- msgid "[Displays the bar on window scroll.]"
335
- msgstr "[Megjeleníti a sávot az ablak görgetésekor.]"
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 "Görgetett pixelek száma, mielőtt a sáv megjelenik."
345
-
346
- #: ../templates/options-template.php:84
347
- msgid "Set 0px to auto fit contents."
348
- msgstr "0px-re állítva a tartalom auto méretezése"
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 esetén) Ha úgy látja, a sávok egymást átfedik, próbálja meg növelni "
356
- "ezt az értéket. (pl. WordPress 3.8: Twenty Fourteen téma, állítsa 48px-re)"
357
-
358
- #: ../templates/options-template.php:100 ../templates/options-template.php:108
359
- #: ../templates/options-template.php:124
360
- msgid "second(s)"
361
- msgstr "mp"
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
- "0 mp-re állítva azonnal megjelenik. Nem működik \"Megjelenés görgetéskor\" "
369
- "módban."
370
-
371
- #: ../templates/options-template.php:108
372
- msgid "Set 0 second(s) for no animation."
373
- msgstr "Állítsa 0 mp-re és nincs animálás"
374
-
375
- #: ../templates/options-template.php:116
376
- msgid "[Displays a close button at the top right corner of the bar.]"
377
- msgstr "[Megjelenít egy bezárás gombot a sáv jobb felső sarkában]"
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
- "0 mp-re állítva letiltja az automatikus bezárást. Ne működik \"Megjelenés "
385
- "görgetéskor\" módban."
386
-
387
- #: ../templates/options-template.php:140
388
- msgid "A reopen button will be displayed after the bar is closed."
389
- msgstr "Az újranyitás gomb megjelenítése miután a sáv bezárul."
390
-
391
- #: ../templates/options-template.php:148
392
- msgid "Once closed, bar will display closed on other pages."
393
- msgstr "Ha bezárja, a sáv más oldalakon is zártan jelenik meg."
394
-
395
- #: ../templates/options-template.php:156
396
- msgid "day(s)"
397
- msgstr "nap"
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
- "A sávot bezárva tarja meghatározott számú napig az autolsó bezárás "
405
- "időpontjától."
406
-
407
- #: ../templates/options-template.php:161
408
- msgid "Content"
409
- msgstr "Tartalom"
410
-
411
- #: ../templates/options-template.php:170
412
- msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
413
- msgstr "[HTML tagek használata megengedett. például <br /> a sortöréshez.]"
414
-
415
- #: ../templates/options-template.php:178
416
- msgid "[Displays a button next to the message.]"
417
- msgstr "[Gomb megjelenés a következő szöveggel.]"
418
-
419
- #: ../templates/options-template.php:223
420
- msgid "Filter"
421
- msgstr "Szűrés"
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 "Összes oldal."
430
-
431
- #: ../templates/options-template.php:253
432
- msgid "Only in landing page."
433
- msgstr "Csak nyitóoldal."
434
-
435
- #: ../templates/options-template.php:253
436
- msgid "[The first page they visit on your website.]"
437
- msgstr "[Csak a honlap első meglátogatott oldalán.]"
438
-
439
- #: ../templates/options-template.php:258
440
- msgid "Include in following pages"
441
- msgstr "Beleértve a következő oldalakat"
442
-
443
- #: ../templates/options-template.php:278
444
- msgid "Exclude in following pages"
445
- msgstr "Kivéve a következő oldalakon"
446
-
447
- #: ../templates/options-template.php:305
448
- msgid "All users."
449
- msgstr "Minden felhasználó."
450
-
451
- #: ../templates/options-template.php:310
452
- msgid "All logged in users."
453
- msgstr "Minden bejelentkezett felhasználó."
454
-
455
- #: ../templates/options-template.php:315
456
- msgid "Guest users. [Non-logged in users]"
457
- msgstr "Vendég [Nem bejelentkezett] felhasználók."
458
-
459
- #: ../templates/options-template.php:320
460
- msgid "For following user roles"
461
- msgstr "A következő felhasználói körök"
462
-
463
- #: ../templates/options-template.php:340
464
- msgid "[No Role]"
465
- msgstr "[Szerep nélküli]"
466
-
467
- #: ../templates/options-template.php:346
468
- msgid "[Guest]"
469
- msgstr "[Vendég]"
470
-
471
- #: ../templates/options-template.php:354
472
- msgid "Color"
473
- msgstr "Szín"
474
-
475
- #: ../templates/options-template.php:358
476
- msgid "Bar Color"
477
- msgstr "Sáv színe"
478
-
479
- #: ../templates/options-template.php:369 ../templates/options-template.php:394
480
- msgid "[Select two different colors to create a gradient.]"
481
- msgstr "[Válasszon ki két eltérő színt színátmenet létrehozásához.]"
482
-
483
- #: ../templates/options-template.php:383
484
- msgid "Button Color"
485
- msgstr "Gomb szín"
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 ötletek"
498
-
499
- msgid "Animate Display"
500
- msgstr "Animate Display"
501
-
502
- msgid "Animate Display Delay"
503
- msgstr "Animate Display Delay"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/wpfront-notification-bar-sr_RS.mo DELETED
Binary file
languages/wpfront-notification-bar-sr_RS/readme.txt DELETED
@@ -1 +0,0 @@
1
- Contributor: Borisa Djuraskovic <webhostinghub.com>
 
languages/wpfront-notification-bar-sr_RS/wpfront-notification-bar-sr_RS.mo DELETED
Binary file
languages/wpfront-notification-bar-sr_RS/wpfront-notification-bar-sr_RS.po DELETED
@@ -1,502 +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-10-06 10:51+0100\n"
6
- "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\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.5.7\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 "Naziv"
22
-
23
- #: ../classes/base/class-wpfront-base-menu.php:53
24
- msgid "Version"
25
- msgstr "Verzija"
26
-
27
- #: ../classes/base/class-wpfront-base-menu.php:54
28
- msgid "Rating"
29
- msgstr "Ocene"
30
-
31
- #: ../classes/base/class-wpfront-base-menu.php:55
32
- msgid "Description"
33
- msgstr "Opis"
34
-
35
- #: ../classes/base/class-wpfront-base-menu.php:69
36
- #, php-format
37
- msgid "based on %s rating(s)"
38
- msgstr "Na osnovu %s ocena(s)"
39
-
40
- #: ../classes/base/class-wpfront-base-menu.php:105
41
- msgid "Unable to communicate with WordPress.org"
42
- msgstr "Ne može da ostvari komunikaciju sa 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 "Autori: %s"
53
-
54
- #: ../classes/base/class-wpfront-base-menu.php:154
55
- #, php-format
56
- msgid "More information about %s"
57
- msgstr "Više informacija o:%s"
58
-
59
- #: ../classes/base/class-wpfront-base-menu.php:154
60
- msgid "Details"
61
- msgstr "Detalji"
62
-
63
- #: ../classes/base/class-wpfront-base-menu.php:163
64
- #, php-format
65
- msgid "Install %s"
66
- msgstr "Instaliraj %s"
67
-
68
- #: ../classes/base/class-wpfront-base-menu.php:163
69
- msgid "Install Now"
70
- msgstr "Instaliraj sada"
71
-
72
- #: ../classes/base/class-wpfront-base-menu.php:168
73
- #, php-format
74
- msgid "Update to version %s"
75
- msgstr "Ažuriraj na %s verziju"
76
-
77
- #: ../classes/base/class-wpfront-base-menu.php:168
78
- msgid "Update Now"
79
- msgstr "Ažuriraj sada"
80
-
81
- #: ../classes/base/class-wpfront-base-menu.php:173
82
- msgid "This plugin is already installed and is up to date"
83
- msgstr "Ovaj plugin već je instaliran i ažuriran "
84
-
85
- #: ../classes/base/class-wpfront-base-menu.php:173
86
- msgid "Installed"
87
- msgstr "Instaliran"
88
-
89
- #: ../classes/base/class-wpfront-base-menu.php:175
90
- #: ../classes/base/class-wpfront-base.php:105
91
- msgid "Settings"
92
- msgstr "Podešavanja"
93
-
94
- #: ../classes/base/class-wpfront-base-menu.php:177
95
- msgid "Activate"
96
- msgstr "Aktiviraj"
97
-
98
- #: ../classes/base/class-wpfront-base-menu.php:199
99
- msgid "Feedback"
100
- msgstr "Povratne informacije"
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 "Svi plugin-i"
109
-
110
- #: ../classes/base/class-wpfront-base.php:130
111
- msgid "You do not have sufficient permissions to access this page."
112
- msgstr "Nemate odgovarajuće dozvole za pristup ovoj stranici."
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
- "Ako imate keširan plugin, očistite keš da bi nova podešavanja imala efekta."
120
-
121
- #: ../classes/base/class-wpfront-base.php:168
122
- msgid "Settings Description"
123
- msgstr "Opis podešavanja"
124
-
125
- #: ../classes/base/class-wpfront-base.php:170
126
- msgid "Plugin FAQ"
127
- msgstr "Često postavljana pitanja o plugin-u"
128
-
129
- #: ../classes/base/class-wpfront-base.php:172
130
- msgid "Feature Request"
131
- msgstr "Zahtev za funkcijama"
132
-
133
- #: ../classes/base/class-wpfront-base.php:174
134
- msgid "Report Bug"
135
- msgstr "Obavestite nas o greškama"
136
-
137
- #: ../classes/base/class-wpfront-base.php:176
138
- msgid "Write Review"
139
- msgstr "Napišite pregled"
140
-
141
- #: ../classes/base/class-wpfront-base.php:178
142
- msgid "Contact Me (syam@wpfront.com)"
143
- msgstr "Pišite mi (syam@wpfront.com)"
144
-
145
- #: ../classes/base/class-wpfront-base.php:180
146
- msgid "Buy me a Beer or Coffee"
147
- msgstr "Častite me pivom ili kafom"
148
-
149
- #: ../classes/base/class-wpfront-base.php:197
150
- msgid "Save Changes"
151
- msgstr "Sačuvaj izmene"
152
-
153
- #: ../classes/class-wpfront-notification-bar-options.php:41
154
- msgid "Enabled"
155
- msgstr "Štikliran"
156
-
157
- #: ../classes/class-wpfront-notification-bar-options.php:42
158
- msgid "Position"
159
- msgstr "Pozicija"
160
-
161
- #: ../classes/class-wpfront-notification-bar-options.php:43
162
- msgid "Bar Height"
163
- msgstr "Visina trake sa menijem"
164
-
165
- #: ../classes/class-wpfront-notification-bar-options.php:44
166
- msgid "Message Text"
167
- msgstr "Tekst poruke"
168
-
169
- #: ../classes/class-wpfront-notification-bar-options.php:45
170
- msgid "Display After"
171
- msgstr "Prikaži posle"
172
-
173
- #: ../classes/class-wpfront-notification-bar-options.php:46
174
- msgid "Animation Duration"
175
- msgstr "Trajanje animacije"
176
-
177
- #: ../classes/class-wpfront-notification-bar-options.php:47
178
- msgid "Display Close Button"
179
- msgstr "Prikaži taster “Zatvori”"
180
-
181
- #: ../classes/class-wpfront-notification-bar-options.php:48
182
- msgid "Auto Close After"
183
- msgstr "Automatski zatvori posle"
184
-
185
- #: ../classes/class-wpfront-notification-bar-options.php:49
186
- msgid "Display Button"
187
- msgstr "Prikaži taster"
188
-
189
- #: ../classes/class-wpfront-notification-bar-options.php:50
190
- msgid "Button Text"
191
- msgstr "Tekst tastera"
192
-
193
- #: ../classes/class-wpfront-notification-bar-options.php:51
194
- msgid "Button Action"
195
- msgstr "Aktivnost tastera"
196
-
197
- #: ../classes/class-wpfront-notification-bar-options.php:52
198
- msgid "Open URL:"
199
- msgstr "Otvori URL:"
200
-
201
- #: ../classes/class-wpfront-notification-bar-options.php:53
202
- msgid "Open URL in new tab/window"
203
- msgstr "Otvori URL u novom tabulatoru/prozoru"
204
-
205
- #: ../classes/class-wpfront-notification-bar-options.php:54
206
- msgid "Execute JavaScript"
207
- msgstr "Izvrši JavaScript"
208
-
209
- #: ../classes/class-wpfront-notification-bar-options.php:55
210
- msgid "Close Bar on Button Click"
211
- msgstr "Zatvori traku sa menijem klikom na taster"
212
-
213
- #: ../classes/class-wpfront-notification-bar-options.php:56
214
- msgid "Display Shadow"
215
- msgstr "Prikaži senku"
216
-
217
- #: ../classes/class-wpfront-notification-bar-options.php:57
218
- msgid "Fixed at Position"
219
- msgstr "Fiksiranu na položaju"
220
-
221
- #: ../classes/class-wpfront-notification-bar-options.php:58
222
- msgid "Message Text Color"
223
- msgstr "Boja teksta poruke"
224
-
225
- #: ../classes/class-wpfront-notification-bar-options.php:59
226
- #: ../classes/class-wpfront-notification-bar-options.php:61
227
- msgid "From Color"
228
- msgstr "Od boje"
229
-
230
- #: ../classes/class-wpfront-notification-bar-options.php:60
231
- #: ../classes/class-wpfront-notification-bar-options.php:62
232
- msgid "To Color"
233
- msgstr "Do boje"
234
-
235
- #: ../classes/class-wpfront-notification-bar-options.php:63
236
- msgid "Button Text Color"
237
- msgstr "Boja teksta tastera"
238
-
239
- #: ../classes/class-wpfront-notification-bar-options.php:64
240
- msgid "Display on Pages"
241
- msgstr "Prikaži na stranicama"
242
-
243
- #: ../classes/class-wpfront-notification-bar-options.php:67
244
- msgid "Display Reopen Button"
245
- msgstr "Prikaži taster “Ponovo otvori”"
246
-
247
- #: ../classes/class-wpfront-notification-bar-options.php:68
248
- msgid "Reopen Button Color"
249
- msgstr "Boja tastera “Ponovo otvori”"
250
-
251
- #: ../classes/class-wpfront-notification-bar-options.php:69
252
- msgid "Keep Closed"
253
- msgstr "Neka ostane zatvoren "
254
-
255
- #: ../classes/class-wpfront-notification-bar-options.php:70
256
- msgid "Keep Closed For"
257
- msgstr "Neka ostane zatvoren za"
258
-
259
- #: ../classes/class-wpfront-notification-bar-options.php:71
260
- msgid "Position Offset"
261
- msgstr "Offset pozicija"
262
-
263
- #: ../classes/class-wpfront-notification-bar-options.php:72
264
- msgid "Custom CSS"
265
- msgstr "Prilagođeni CSS"
266
-
267
- #: ../classes/class-wpfront-notification-bar-options.php:73
268
- msgid "Close Button Color"
269
- msgstr "Boja tastera “Zatvori”"
270
-
271
- #: ../classes/class-wpfront-notification-bar-options.php:76
272
- msgid "Display for User Roles"
273
- msgstr "Prikaži za korisničke uloge"
274
-
275
- #: ../classes/class-wpfront-notification-bar-options.php:78
276
- msgid "Display on Scroll"
277
- msgstr "Prikaži skrolovanjem "
278
-
279
- #: ../classes/class-wpfront-notification-bar-options.php:79
280
- msgid "Scroll Offset"
281
- msgstr "Skroluj offset"
282
-
283
- #: ../classes/class-wpfront-notification-bar-options.php:80
284
- msgid "Start Date"
285
- msgstr "Početni datum"
286
-
287
- #: ../classes/class-wpfront-notification-bar-options.php:81
288
- msgid "End Date"
289
- msgstr "Završni datum"
290
-
291
- #: ../classes/class-wpfront-notification-bar.php:62
292
- msgid "WPFront Notification Bar"
293
- msgstr "WPFront Notification Bar"
294
-
295
- #: ../classes/class-wpfront-notification-bar.php:62
296
- msgid "Notification Bar"
297
- msgstr "Notification Bar"
298
-
299
- #: ../classes/class-wpfront-notification-bar.php:176
300
- #: ../classes/class-wpfront-notification-bar.php:180
301
- msgid "[Page]"
302
- msgstr "[Stranica]"
303
-
304
- #: ../classes/class-wpfront-notification-bar.php:176
305
- msgid "Home"
306
- msgstr "Početna"
307
-
308
- #: ../classes/class-wpfront-notification-bar.php:185
309
- msgid "[Post]"
310
- msgstr "[Post]"
311
-
312
- #: ../templates/options-template.php:32
313
- msgid "WPFront Notification Bar Settings"
314
- msgstr "Podešavanja WPFront trake za obaveštenja"
315
-
316
- #: ../templates/options-template.php:34
317
- msgid "Display"
318
- msgstr "Prikaži"
319
-
320
- #: ../templates/options-template.php:50
321
- msgid "Top"
322
- msgstr "Vrh"
323
-
324
- #: ../templates/options-template.php:51
325
- msgid "Bottom"
326
- msgstr "Dno"
327
-
328
- #: ../templates/options-template.php:60
329
- msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
330
- msgstr "[Sticky Bar traka će ostati na istom mestu bez obzira na skrolovanje.]"
331
-
332
- #: ../templates/options-template.php:68
333
- msgid "[Displays the bar on window scroll.]"
334
- msgstr "[Prikazuje traku prilikom skrolovanja prozora.]"
335
-
336
- #: ../templates/options-template.php:76 ../templates/options-template.php:84
337
- #: ../templates/options-template.php:92
338
- msgid "px"
339
- msgstr "px"
340
-
341
- #: ../templates/options-template.php:76
342
- msgid "Number of pixels to be scrolled before the bar appears."
343
- msgstr "Broj piksela za skrolovanje pre nego što se traka pojavi."
344
-
345
- #: ../templates/options-template.php:84
346
- msgid "Set 0px to auto fit contents."
347
- msgstr "Podesite na 0px da biste automatski uklopili sadržaj."
348
-
349
- #: ../templates/options-template.php:92
350
- msgid ""
351
- "(Top bar only) If you find the bar overlapping, try increasing this value. "
352
- "(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
353
- msgstr ""
354
- "(Traka samo na vrhu) Ako vam se traka preklapa, pokušajte da povećate ovu "
355
- "vrednost. (Npr. WordPress 3.8 Twenty Fourteen temu podesite na 48px)"
356
-
357
- #: ../templates/options-template.php:100 ../templates/options-template.php:108
358
- #: ../templates/options-template.php:124
359
- msgid "second(s)"
360
- msgstr "sekund(e)"
361
-
362
- #: ../templates/options-template.php:100
363
- msgid ""
364
- "Set 0 second(s) to display immediately. Do not work in \"Display on Scroll\" "
365
- "mode."
366
- msgstr ""
367
- "Podesite na 0 sekundi da biste odmah prikazali. Nemojte raditi u režimu "
368
- "\"Prikaži skrolovanjem\" "
369
-
370
- #: ../templates/options-template.php:108
371
- msgid "Set 0 second(s) for no animation."
372
- msgstr "Podesite vrednost na 0 sekundi ako nećete animaciju."
373
-
374
- #: ../templates/options-template.php:116
375
- msgid "[Displays a close button at the top right corner of the bar.]"
376
- msgstr "[Prikazuje taster “Zatvori” u gornjem desnom uglu trake.]"
377
-
378
- #: ../templates/options-template.php:124
379
- msgid ""
380
- "Set 0 second(s) to disable auto close. Do not work in \"Display on Scroll\" "
381
- "mode."
382
- msgstr ""
383
- "Podesite vrednost na 0 sekundi da biste deaktivirali automatsko zatvaranje. "
384
- "Nemojte raditi u režimu \"Prikaži skrolovanjem\" "
385
-
386
- #: ../templates/options-template.php:140
387
- msgid "A reopen button will be displayed after the bar is closed."
388
- msgstr "Kad se traka zatvori, prikazaće se taster “Ponovo otvori”."
389
-
390
- #: ../templates/options-template.php:148
391
- msgid "Once closed, bar will display closed on other pages."
392
- msgstr "Kad se zatvori, traka će ostati zatvorena i na drugim stranicama."
393
-
394
- #: ../templates/options-template.php:156
395
- msgid "day(s)"
396
- msgstr "dan(i)"
397
-
398
- #: ../templates/options-template.php:156
399
- msgid ""
400
- "Bar will be kept closed for the number of days specified from last closed "
401
- "date."
402
- msgstr ""
403
- "Traka će ostati zatvorena onoliko dana koliko ste naveli od poslednjeg "
404
- "datuma zatvaranja."
405
-
406
- #: ../templates/options-template.php:161
407
- msgid "Content"
408
- msgstr "Sadržaj"
409
-
410
- #: ../templates/options-template.php:170
411
- msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
412
- msgstr "[Dozvoljene su HTML oznake. npr. Dodajte <br /> za pauzu.]"
413
-
414
- #: ../templates/options-template.php:178
415
- msgid "[Displays a button next to the message.]"
416
- msgstr "[Prikazuje taster pored poruke.]"
417
-
418
- #: ../templates/options-template.php:223
419
- msgid "Filter"
420
- msgstr "Filter"
421
-
422
- #: ../templates/options-template.php:230 ../templates/options-template.php:238
423
- msgid "[YYYY-MM-DD]"
424
- msgstr "[YYYY-MM-DD]"
425
-
426
- #: ../templates/options-template.php:248
427
- msgid "All pages."
428
- msgstr "Sve stranice"
429
-
430
- #: ../templates/options-template.php:253
431
- msgid "Only in landing page."
432
- msgstr "Samo na odredišnoj stranici."
433
-
434
- #: ../templates/options-template.php:253
435
- msgid "[The first page they visit on your website.]"
436
- msgstr "[Prva stranica koju posete na vašem web site-u.]"
437
-
438
- #: ../templates/options-template.php:258
439
- msgid "Include in following pages"
440
- msgstr "Uključi na sledećim stranicama"
441
-
442
- #: ../templates/options-template.php:278
443
- msgid "Exclude in following pages"
444
- msgstr "Skloni sa sledećih stranica"
445
-
446
- #: ../templates/options-template.php:305
447
- msgid "All users."
448
- msgstr "Svi korisnici"
449
-
450
- #: ../templates/options-template.php:310
451
- msgid "All logged in users."
452
- msgstr "Svi prijavljeni korisnici"
453
-
454
- #: ../templates/options-template.php:315
455
- msgid "Guest users. [Non-logged in users]"
456
- msgstr "Gosti [Neprijavljeni korisnici]"
457
-
458
- #: ../templates/options-template.php:320
459
- msgid "For following user roles"
460
- msgstr "Za sledeće korisničke uloge"
461
-
462
- #: ../templates/options-template.php:340
463
- msgid "[No Role]"
464
- msgstr "[Bez uloge]"
465
-
466
- #: ../templates/options-template.php:346
467
- msgid "[Guest]"
468
- msgstr "[Gost]"
469
-
470
- #: ../templates/options-template.php:354
471
- msgid "Color"
472
- msgstr "Boja"
473
-
474
- #: ../templates/options-template.php:358
475
- msgid "Bar Color"
476
- msgstr "Boja trake"
477
-
478
- #: ../templates/options-template.php:369 ../templates/options-template.php:394
479
- msgid "[Select two different colors to create a gradient.]"
480
- msgstr "[Odaberite dve različite boje da biste postigli dinamičnost]"
481
-
482
- #: ../templates/options-template.php:383
483
- msgid "Button Color"
484
- msgstr "Boja tastera"
485
-
486
- #: ../templates/options-template.php:432
487
- msgid "[Normal, Hover, X]"
488
- msgstr "[Normalna, nakon prevlačenja mišem, X]"
489
-
490
- #: ../templates/options-template.php:437
491
- msgid "CSS"
492
- msgstr "CSS"
493
-
494
- #: ../templates/options-template.php:453
495
- msgid "Plugin Ideas"
496
- msgstr "Ideje za plugin"
497
-
498
- #~ msgid "Animate Display"
499
- #~ msgstr "Animate Display"
500
-
501
- #~ msgid "Animate Display Delay"
502
- #~ msgstr "Animate Display Delay"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -2,9 +2,10 @@
2
  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: 4.0
6
- Tested up to: 4.9
7
- Stable tag: 1.7.1
 
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -29,8 +30,9 @@ Want to display a notification about a promotion or a news? WPFront Notification
29
  * **Select the pages/posts** you want to display the notification.
30
  * **Select the user roles** you want to display the notification.
31
  * Set **Start** and **End dates**.
 
32
 
33
- Visit [WPFront Notification Bar Ideas](http://wpfront.com/notification-bar-plugin-ideas/) page for some useful functionalities.
34
 
35
  Visit [WPFront Notification Bar Settings](http://wpfront.com/notification-bar-plugin-settings/) page for detailed option descriptions.
36
 
@@ -68,6 +70,18 @@ The new version(1.3) allows you to filter the bar based on user roles. In this c
68
 
69
  == Changelog ==
70
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  = 1.7.1 =
72
  * Processes shortcode in button text.
73
  * Notification bar menu is now under 'Settings' menu.
@@ -123,6 +137,8 @@ The new version(1.3) allows you to filter the bar based on user roles. In this c
123
  * Initial release
124
 
125
  == Upgrade Notice ==
 
 
126
 
127
  = 1.7.1 =
128
  * Bug fixes.
2
  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: 5.5.1
7
+ Requires PHP: 7.0
8
+ Stable tag: 1.8
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
30
  * **Select the pages/posts** you want to display the notification.
31
  * **Select the user roles** you want to display the notification.
32
  * Set **Start** and **End dates**.
33
+ * Hide in **Small Devices**.
34
 
35
+ Visit [WPFront Notification Bar Troubleshooting](https://wpfront.com/wordpress-plugins/notification-bar-plugin/wpfront-notification-bar-troubleshooting/) page for troubleshooting steps.
36
 
37
  Visit [WPFront Notification Bar Settings](http://wpfront.com/notification-bar-plugin-settings/) page for detailed option descriptions.
38
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.8 =
74
+ * Preview mode.
75
+ * Debug mode.
76
+ * Hide in small devices and windows.
77
+ * Change cookie names.
78
+ * Edit include/exclude post IDs manually.
79
+ * Edit colors manually.
80
+ * More rel attributes. Thanks to jetxpert.
81
+ * Accessibility and compatibility fixes.
82
+ * Filters 'wpfront_notification_bar_message' and 'wpfront_notification_bar_button_text' added.
83
+ * Bug fixes.
84
+
85
  = 1.7.1 =
86
  * Processes shortcode in button text.
87
  * Notification bar menu is now under 'Settings' menu.
137
  * Initial release
138
 
139
  == Upgrade Notice ==
140
+ = 1.8 =
141
+ * New features added.
142
 
143
  = 1.7.1 =
144
  * Bug fixes.
templates/notification-bar-template.php CHANGED
@@ -78,6 +78,20 @@
78
  border: 1px solid <?php echo $this->options->close_button_color_hover(); ?>;
79
  background-color: <?php echo $this->options->close_button_color_hover(); ?>;
80
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  </style>
82
 
83
  <?php if ($this->options->display_button() && $this->options->button_action() == 2) { ?>
@@ -92,13 +106,13 @@
92
  </script>
93
  <?php } ?>
94
 
95
- <div id="wpfront-notification-bar-spacer" style="display: none;">
96
- <div id="wpfront-notification-bar-open-button" class="<?php echo $this->options->position() == 1 ? 'top wpfront-bottom-shadow' : 'bottom wpfront-top-shadow'; ?>"></div>
97
  <div id="wpfront-notification-bar" class="wpfront-fixed <?php if ($this->options->display_shadow()) echo $this->options->position() == 1 ? 'wpfront-bottom-shadow' : 'wpfront-top-shadow'; ?>">
98
  <?php if ($this->options->close_button()) { ?>
99
- <div class="wpfront-close">X</div>
100
  <?php } ?>
101
- <table border="0" cellspacing="0" cellpadding="0">
102
  <tr>
103
  <td>
104
  <div class="wpfront-message">
@@ -109,9 +123,28 @@
109
  if ($this->options->display_button()) {
110
  $button_text = $this->get_button_text();
111
  ?>
112
- <?php if ($this->options->button_action() == 1) { ?>
113
- <a class="wpfront-button" href="<?php echo $this->options->button_action_url(); ?>" target="<?php echo $this->options->button_action_new_tab() ? '_blank' : '_self'; ?>" <?php echo $this->options->button_action_url_nofollow() ? 'rel="nofollow"' : ''; ?>><?php echo $button_text; ?></a>
114
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  <?php if ($this->options->button_action() == 2) { ?>
116
  <a class="wpfront-button" onclick="javascript:wpfront_notification_bar_button_action_script();"><?php echo $button_text; ?></a>
117
  <?php } ?>
78
  border: 1px solid <?php echo $this->options->close_button_color_hover(); ?>;
79
  background-color: <?php echo $this->options->close_button_color_hover(); ?>;
80
  }
81
+
82
+ <?php
83
+ if($this->options->hide_small_device()) {
84
+ echo "@media screen and (max-device-width: {$this->options->small_device_width()}px) { #wpfront-notification-bar-spacer { display:none; } }";
85
+ }
86
+ ?>
87
+
88
+
89
+ <?php
90
+ if($this->options->hide_small_window()) {
91
+ echo "@media screen and (max-width: {$this->options->small_window_width()}px) { #wpfront-notification-bar-spacer { display:none; } }";
92
+ }
93
+ ?>
94
+
95
  </style>
96
 
97
  <?php if ($this->options->display_button() && $this->options->button_action() == 2) { ?>
106
  </script>
107
  <?php } ?>
108
 
109
+ <div id="wpfront-notification-bar-spacer" class="hidden">
110
+ <div id="wpfront-notification-bar-open-button" aria-label="reopen" class="hidden <?php echo $this->options->position() == 1 ? 'top wpfront-bottom-shadow' : 'bottom wpfront-top-shadow'; ?>"></div>
111
  <div id="wpfront-notification-bar" class="wpfront-fixed <?php if ($this->options->display_shadow()) echo $this->options->position() == 1 ? 'wpfront-bottom-shadow' : 'wpfront-top-shadow'; ?>">
112
  <?php if ($this->options->close_button()) { ?>
113
+ <div aria-label="close" class="wpfront-close">X</div>
114
  <?php } ?>
115
+ <table border="0" cellspacing="0" cellpadding="0" role="presentation">
116
  <tr>
117
  <td>
118
  <div class="wpfront-message">
123
  if ($this->options->display_button()) {
124
  $button_text = $this->get_button_text();
125
  ?>
126
+ <?php
127
+ if ($this->options->button_action() == 1) {
128
+ $rel = array();
129
+
130
+ if($this->options->button_action_url_nofollow()) {
131
+ $rel[] = 'nofollow';
132
+ }
133
+
134
+ if($this->options->button_action_url_noreferrer()) {
135
+ $rel[] = 'noreferrer';
136
+ }
137
+
138
+ if($this->options->button_action_new_tab() && $this->options->button_action_url_noopener()) {
139
+ $rel[] = 'noopener';
140
+ }
141
+
142
+ $rel = implode(' ', $rel);
143
+ ?>
144
+ <a class="wpfront-button" href="<?php echo $this->options->button_action_url(); ?>" target="<?php echo $this->options->button_action_new_tab() ? '_blank' : '_self'; ?>" <?php echo empty($rel) ? '' : "rel=\"$rel\""; ?>><?php echo $button_text; ?></a>
145
+ <?php
146
+ }
147
+ ?>
148
  <?php if ($this->options->button_action() == 2) { ?>
149
  <a class="wpfront-button" onclick="javascript:wpfront_notification_bar_button_action_script();"><?php echo $button_text; ?></a>
150
  <?php } ?>
templates/options-template.php CHANGED
@@ -29,502 +29,564 @@
29
  */
30
  ?>
31
 
32
- <?php @$this->options_page_header($this->__('WPFront Notification Bar Settings'), WPFront_Notification_Bar::OPTIONS_GROUP_NAME); ?>
 
 
 
 
 
 
33
 
34
- <h3><?php echo $this->__('Display'); ?></h3>
35
- <table class="form-table">
36
- <tr>
37
- <th scope="row">
38
- <?php echo $this->options->enabled_label(); ?>
39
- </th>
40
- <td>
41
- <input type="checkbox" name="<?php echo $this->options->enabled_name(); ?>" <?php echo $this->options->enabled() ? 'checked' : ''; ?> />
42
- </td>
43
- </tr>
44
- <tr>
45
- <th scope="row">
46
- <?php echo $this->options->position_label(); ?>
47
- </th>
48
- <td>
49
- <select name="<?php echo $this->options->position_name(); ?>">
50
- <option value="1" <?php echo $this->options->position() == '1' ? 'selected' : ''; ?>><?php echo $this->__('Top'); ?></option>
51
- <option value="2" <?php echo $this->options->position() == '2' ? 'selected' : ''; ?>><?php echo $this->__('Bottom'); ?></option>
52
- </select>
53
- </td>
54
- </tr>
55
- <tr>
56
- <th scope="row">
57
- <?php echo $this->options->fixed_position_label(); ?>
58
- </th>
59
- <td>
60
- <input type="checkbox" name="<?php echo $this->options->fixed_position_name(); ?>" <?php echo $this->options->fixed_position() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo $this->__('[Sticky Bar, bar will stay at position regardless of scrolling.]'); ?></span>
61
- </td>
62
- </tr>
63
- <tr>
64
- <th scope="row">
65
- <?php echo $this->options->display_scroll_label(); ?>
66
- </th>
67
- <td>
68
- <input type="checkbox" name="<?php echo $this->options->display_scroll_name(); ?>" <?php echo $this->options->display_scroll() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo $this->__('[Displays the bar on window scroll.]'); ?></span>
69
- </td>
70
- </tr>
71
- <tr>
72
- <th scope="row">
73
- <?php echo $this->options->display_scroll_offset_label(); ?>
74
- </th>
75
- <td>
76
- <input class="seconds" name="<?php echo $this->options->display_scroll_offset_name(); ?>" value="<?php echo $this->options->display_scroll_offset(); ?>" />&#160;<?php echo $this->__('px'); ?>&#160;<span class="description">[<?php echo $this->__('Number of pixels to be scrolled before the bar appears.'); ?>]</span>
77
- </td>
78
- </tr>
79
- <tr>
80
- <th scope="row">
81
- <?php echo $this->options->height_label(); ?>
82
- </th>
83
- <td>
84
- <input class="seconds" name="<?php echo $this->options->height_name(); ?>" value="<?php echo $this->options->height(); ?>" />&#160;<?php echo $this->__('px'); ?>&#160;<span class="description">[<?php echo $this->__('Set 0px to auto fit contents.'); ?>]</span>
85
- </td>
86
- </tr>
87
- <tr>
88
- <th scope="row">
89
- <?php echo $this->options->position_offset_label(); ?>
90
- </th>
91
- <td>
92
- <input class="seconds" name="<?php echo $this->options->position_offset_name(); ?>" value="<?php echo $this->options->position_offset(); ?>" />&#160;<?php echo $this->__('px'); ?>&#160;<span class="description">[<?php echo $this->__('(Top bar only) If you find the bar overlapping, try increasing this value. (eg. WordPress 3.8 Twenty Fourteen theme, set 48px)'); ?>]</span>
93
- </td>
94
- </tr>
95
- <tr>
96
- <th scope="row">
97
- <?php echo $this->options->display_after_label(); ?>
98
- </th>
99
- <td>
100
- <input class="seconds" name="<?php echo $this->options->display_after_name(); ?>" value="<?php echo $this->options->display_after(); ?>" />&#160;<?php echo $this->__('second(s)'); ?>&#160;<span class="description">[<?php echo $this->__('Set 0 second(s) to display immediately. Do not work in "Display on Scroll" mode.'); ?>]</span>
101
- </td>
102
- </tr>
103
- <tr>
104
- <th scope="row">
105
- <?php echo $this->options->animate_delay_label(); ?>
106
- </th>
107
- <td>
108
- <input class="seconds" name="<?php echo $this->options->animate_delay_name(); ?>" value="<?php echo $this->options->animate_delay(); ?>" />&#160;<?php echo $this->__('second(s)'); ?>&#160;<span class="description">[<?php echo $this->__('Set 0 second(s) for no animation.'); ?>]</span>
109
- </td>
110
- </tr>
111
- <tr>
112
- <th scope="row">
113
- <?php echo $this->options->close_button_label(); ?>
114
- </th>
115
- <td>
116
- <input type="checkbox" name="<?php echo $this->options->close_button_name(); ?>" <?php echo $this->options->close_button() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo $this->__('[Displays a close button at the top right corner of the bar.]'); ?></span>
117
- </td>
118
- </tr>
119
- <tr>
120
- <th scope="row">
121
- <?php echo $this->options->auto_close_after_label(); ?>
122
- </th>
123
- <td>
124
- <input class="seconds" name="<?php echo $this->options->auto_close_after_name(); ?>" value="<?php echo $this->options->auto_close_after(); ?>" />&#160;<?php echo $this->__('second(s)'); ?>&#160;<span class="description">[<?php echo $this->__('Set 0 second(s) to disable auto close. Do not work in "Display on Scroll" mode.'); ?>]</span>
125
- </td>
126
- </tr>
127
- <tr>
128
- <th scope="row">
129
- <?php echo $this->options->display_shadow_label(); ?>
130
- </th>
131
- <td>
132
- <input type="checkbox" name="<?php echo $this->options->display_shadow_name(); ?>" <?php echo $this->options->display_shadow() ? 'checked' : ''; ?> />
133
- </td>
134
- </tr>
135
- <tr>
136
- <th scope="row">
137
- <?php echo $this->options->display_open_button_label(); ?>
138
- </th>
139
- <td>
140
- <input type="checkbox" name="<?php echo $this->options->display_open_button_name(); ?>" <?php echo $this->options->display_open_button() ? 'checked' : ''; ?> />&#160;<span class="description">[<?php echo $this->__('A reopen button will be displayed after the bar is closed.'); ?>]</span>
141
- </td>
142
- </tr>
143
- <tr>
144
- <th scope="row">
145
- <?php echo $this->options->keep_closed_label(); ?>
146
- </th>
147
- <td>
148
- <input type="checkbox" name="<?php echo $this->options->keep_closed_name(); ?>" <?php echo $this->options->keep_closed() ? 'checked' : ''; ?> />&#160;<span class="description">[<?php echo $this->__('Once closed, bar will display closed on other pages.'); ?>]</span>
149
- </td>
150
- </tr>
151
- <tr>
152
- <th scope="row">
153
- <?php echo $this->options->keep_closed_for_label(); ?>
154
- </th>
155
- <td>
156
- <input class="seconds" name="<?php echo $this->options->keep_closed_for_name(); ?>" value="<?php echo $this->options->keep_closed_for(); ?>" />&#160;<?php echo $this->__('day(s)'); ?>&#160;<span class="description">[<?php echo $this->__('Bar will be kept closed for the number of days specified from last closed date.'); ?>]</span>
157
- </td>
158
- </tr>
159
- </table>
160
-
161
- <h3><?php echo $this->__('Content'); ?></h3>
162
- <table class="form-table">
163
- <tr>
164
- <th scope="row">
165
- <?php echo $this->options->message_label(); ?>
166
- </th>
167
- <td>
168
- <textarea rows="5" cols="75" name="<?php echo $this->options->message_name(); ?>"><?php echo $this->options->message(); ?></textarea>
169
- <br />
170
- <span class="description"><?php echo esc_html($this->__('[HTML tags are allowed. e.g. Add <br /> for break.]')); ?></span>
171
- </td>
172
- </tr>
173
- <tr>
174
- <th scope="row">
175
- <?php echo $this->options->message_process_shortcode_label(); ?>
176
- </th>
177
- <td>
178
- <input type="checkbox" name="<?php echo $this->options->message_process_shortcode_name(); ?>" <?php echo $this->options->message_process_shortcode() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo $this->__('[Processes shortcodes in message text.]'); ?></span>
179
- </td>
180
- </tr>
181
- <tr>
182
- <th scope="row">
183
- <?php echo $this->options->display_button_label(); ?>
184
- </th>
185
- <td>
186
- <input type="checkbox" name="<?php echo $this->options->display_button_name(); ?>" <?php echo $this->options->display_button() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo $this->__('[Displays a button next to the message.]'); ?></span>
187
- </td>
188
- </tr>
189
- <tr>
190
- <th scope="row">
191
- <?php echo $this->options->button_text_label(); ?>
192
- </th>
193
- <td>
194
- <input name="<?php echo $this->options->button_text_name(); ?>" value="<?php echo $this->options->button_text(); ?>" />
195
- </td>
196
- </tr>
197
- <tr>
198
- <th scope="row">
199
- <?php echo $this->options->button_action_label(); ?>
200
- </th>
201
- <td>
202
- <label>
203
- <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="1" <?php echo $this->options->button_action() == 1 ? 'checked' : ''; ?> />
204
- <span><?php echo $this->options->button_action_url_label(); ?></span>
205
- </label>
206
- <input class="URL" name="<?php echo $this->options->button_action_url_name(); ?>" value="<?php echo $this->options->button_action_url(); ?>" />
207
- <br />
208
- <label>
209
- <input type="checkbox" name="<?php echo $this->options->button_action_new_tab_name(); ?>" <?php echo $this->options->button_action_new_tab() ? 'checked' : ''; ?> />
210
- <span><?php echo $this->options->button_action_new_tab_label(); ?></span>
211
- </label>
212
- <br />
213
- <label>
214
- <input type="checkbox" name="<?php echo $this->options->button_action_url_nofollow_name(); ?>" <?php echo $this->options->button_action_url_nofollow() ? 'checked' : ''; ?> />
215
- <span><?php echo $this->options->button_action_url_nofollow_label(); ?></span>
216
- </label>
217
- <br />
218
- <label>
219
- <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="2" <?php echo $this->options->button_action() == 2 ? 'checked' : ''; ?> />
220
- <span><?php echo $this->options->button_action_javascript_label(); ?></span>
221
- </label>
222
- <br />
223
- <textarea rows="5" cols="75" name="<?php echo $this->options->button_action_javascript_name(); ?>"><?php echo $this->options->button_action_javascript(); ?></textarea>
224
- </td>
225
- </tr>
226
- <tr>
227
- <th scope="row">
228
- <?php echo $this->options->button_action_close_bar_label(); ?>
229
- </th>
230
- <td>
231
- <input type="checkbox" name="<?php echo $this->options->button_action_close_bar_name(); ?>" <?php echo $this->options->button_action_close_bar() ? 'checked' : ''; ?> />
232
- </td>
233
- </tr>
234
- </table>
235
-
236
- <h3><?php echo $this->__('Filter'); ?></h3>
237
- <table class="form-table">
238
- <tr>
239
- <th scope="row">
240
- <?php echo $this->options->start_date_label(); ?>
241
- </th>
242
- <td>
243
- <input class="date" name="<?php echo $this->options->start_date_name(); ?>" value="<?php echo $this->options->start_date() == NULL ? '' : date('Y-m-d', $this->options->start_date()); ?>" />
244
- <input class="time" name="<?php echo $this->options->start_time_name(); ?>" value="<?php echo $this->options->start_time() == NULL ? '' : date('h:i a', $this->options->start_time()); ?>" />
245
- &#160;
246
- <span class="description"><?php echo $this->__('[YYYY-MM-DD] [hh:mm ap]'); ?></span>
247
- </td>
248
- </tr>
249
- <tr>
250
- <th scope="row">
251
- <?php echo $this->options->end_date_label(); ?>
252
- </th>
253
- <td>
254
- <input class="date" name="<?php echo $this->options->end_date_name(); ?>" value="<?php echo $this->options->end_date() == NULL ? '' : date('Y-m-d', $this->options->end_date()); ?>" />
255
- <input class="time" name="<?php echo $this->options->end_time_name(); ?>" value="<?php echo $this->options->end_time() == NULL ? '' : date('h:i a', $this->options->end_time()); ?>" />
256
- &#160;
257
- <span class="description"><?php echo $this->__('[YYYY-MM-DD] [hh:mm ap]'); ?></span>
258
- </td>
259
- </tr>
260
- <tr>
261
- <th scope="row">
262
- <?php echo $this->options->display_pages_label(); ?>
263
- </th>
264
- <td>
265
- <label>
266
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="1" <?php echo $this->options->display_pages() == 1 ? 'checked' : ''; ?> />
267
- <span><?php echo $this->__('All pages.'); ?></span>
268
- </label>
269
- <br />
270
- <label>
271
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
272
- <span><?php echo $this->__('Only in landing page.'); ?></span>&#160;<span class="description"><?php echo $this->__('[The first page they visit on your website.]'); ?></span>
273
- </label>
274
- <br />
275
- <label>
276
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
277
- <span><?php echo $this->__('Include in following pages'); ?></span>
278
- </label>
279
- <div class="pages-selection">
280
- <input type="hidden" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
281
  <?php
282
- $objects = $this->get_filter_objects();
283
- foreach ($objects as $key => $value) {
284
- ?>
285
- <div class="page-div">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  <label>
287
- <input type="checkbox" value="<?php echo $key; ?>" <?php echo $this->filter_pages_contains($this->options->include_pages(), $key) === FALSE ? '' : 'checked'; ?> />
288
- <?php echo $value; ?>
289
  </label>
290
- </div>
291
- <?php
292
- }
293
- ?>
294
- </div>
295
- <label>
296
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="4" <?php echo $this->options->display_pages() == 4 ? 'checked' : ''; ?> />
297
- <span><?php echo $this->__('Exclude in following pages'); ?></span>
298
- </label>
299
- <div class="pages-selection">
300
- <input type="hidden" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
301
- <?php
302
- $objects = $this->get_filter_objects();
303
- foreach ($objects as $key => $value) {
304
- ?>
305
- <div class="page-div">
306
  <label>
307
- <input type="checkbox" value="<?php echo $key; ?>" <?php echo $this->filter_pages_contains($this->options->exclude_pages(), $key) === FALSE ? '' : 'checked'; ?> />
308
- <?php echo $value; ?>
309
  </label>
310
- </div>
311
- <?php
312
- }
313
- ?>
314
- </div>
315
- </td>
316
- </tr>
317
- <tr>
318
- <th scope="row">
319
- <?php echo $this->options->display_roles_label(); ?>
320
- </th>
321
- <td>
322
- <label>
323
- <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="1" <?php echo $this->options->display_roles() == 1 ? 'checked' : ''; ?> />
324
- <span><?php echo $this->__('All users.'); ?></span>
325
- </label>
326
- <br />
327
- <label>
328
- <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="2" <?php echo $this->options->display_roles() == 2 ? 'checked' : ''; ?> />
329
- <span><?php echo $this->__('All logged in users.'); ?></span>
330
- </label>
331
- <br />
332
- <label>
333
- <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="3" <?php echo $this->options->display_roles() == 3 ? 'checked' : ''; ?> />
334
- <span><?php echo $this->__('Guest users. [Non-logged in users]'); ?></span>
335
- </label>
336
- <br />
337
- <label>
338
- <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="4" <?php echo $this->options->display_roles() == 4 ? 'checked' : ''; ?> />
339
- <span><?php echo $this->__('For following user roles'); ?></span>&nbsp;<span>[<a target="_blank" href="https://wpfront.com/nbtoure"><?php echo $this->__('Manage Roles'); ?>]</a></span>
340
- </label>
341
- <br />
342
- <div class="roles-selection">
343
- <input type="hidden" name="<?php echo $this->options->include_roles_name(); ?>" value="<?php echo htmlentities(json_encode($this->options->include_roles())); ?>" />
344
- <?php
345
- foreach ($this->get_role_objects() as $key => $value) {
346
- ?>
347
- <div class="role-div">
348
  <label>
349
- <input type="checkbox" value="<?php echo $key; ?>" <?php echo in_array($key, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
350
- <?php echo $value; ?>
351
  </label>
352
- </div>
353
- <?php
354
- }
355
- ?>
356
- <div class="role-div">
357
- <label>
358
- <input type="checkbox" value="<?php echo WPFront_Notification_Bar::ROLE_NOROLE; ?>" <?php echo in_array(WPFront_Notification_Bar::ROLE_NOROLE, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
359
- <?php echo $this->__('[No Role]'); ?>
360
- </label>
361
- </div>
362
- <div class="role-div">
363
- <label>
364
- <input type="checkbox" value="<?php echo WPFront_Notification_Bar::ROLE_GUEST; ?>" <?php echo in_array(WPFront_Notification_Bar::ROLE_GUEST, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
365
- <?php echo $this->__('[Guest]'); ?>
366
- </label>
367
- </div>
368
- </div>
369
- <label>
370
- <input type="checkbox" name="<?php echo $this->options->wp_emember_integration_name(); ?>" <?php echo $this->options->wp_emember_integration() ? 'checked' : ''; ?> />
371
- <span><?php echo $this->__('Enable WP eMember integration.'); ?></span>
372
- </label>
373
- </td>
374
- </tr>
375
- </table>
376
-
377
- <h3><?php echo $this->__('Color'); ?></h3>
378
- <table class="form-table">
379
- <tr>
380
- <th scope="row">
381
- <?php echo $this->__('Bar Color'); ?>
382
- </th>
383
- <td>
384
- <div class="color-selector-div">
385
- <div class="color-selector" color="<?php echo $this->options->bar_from_color(); ?>"></div>&#160;<span><?php echo $this->options->bar_from_color(); ?></span>
386
- <input type="hidden" name="<?php echo $this->options->bar_from_color_name(); ?>" value="<?php echo $this->options->bar_from_color(); ?>" />
387
- </div>
388
- <div class="color-selector-div">
389
- <div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div>&#160;<span><?php echo $this->options->bar_to_color(); ?></span>
390
- <input type="hidden" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo $this->options->bar_to_color(); ?>" />
391
- </div>
392
- <span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
393
- </td>
394
- </tr>
395
- <tr>
396
- <th scope="row">
397
- <?php echo $this->options->message_color_label(); ?>
398
- </th>
399
- <td>
400
- <div class="color-selector" color="<?php echo $this->options->message_color(); ?>"></div>&#160;<span><?php echo $this->options->message_color(); ?></span>
401
- <input type="hidden" name="<?php echo $this->options->message_color_name(); ?>" value="<?php echo $this->options->message_color(); ?>" />
402
- </td>
403
- </tr>
404
- <tr>
405
- <th scope="row">
406
- <?php echo $this->__('Button Color'); ?>
407
- </th>
408
- <td>
409
- <div class="color-selector-div">
410
- <div class="color-selector" color="<?php echo $this->options->button_from_color(); ?>"></div>&#160;<span><?php echo $this->options->button_from_color(); ?></span>
411
- <input type="hidden" name="<?php echo $this->options->button_from_color_name(); ?>" value="<?php echo $this->options->button_from_color(); ?>" />
412
- </div>
413
- <div class="color-selector-div">
414
- <div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div>&#160;<span><?php echo $this->options->button_to_color(); ?></span>
415
- <input type="hidden" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo $this->options->button_to_color(); ?>" />
416
- </div>
417
- <span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
418
- </td>
419
- </tr>
420
- <tr>
421
- <th scope="row">
422
- <?php echo $this->options->button_text_color_label(); ?>
423
- </th>
424
- <td>
425
- <div class="color-selector" color="<?php echo $this->options->button_text_color(); ?>"></div>&#160;<span><?php echo $this->options->button_text_color(); ?></span>
426
- <input type="hidden" name="<?php echo $this->options->button_text_color_name(); ?>" value="<?php echo $this->options->button_text_color(); ?>" />
427
- </td>
428
- </tr>
429
- <tr>
430
- <th scope="row">
431
- <?php echo $this->options->open_button_color_label(); ?>
432
- </th>
433
- <td>
434
- <div class="color-selector" color="<?php echo $this->options->open_button_color(); ?>"></div>&#160;<span><?php echo $this->options->open_button_color(); ?></span>
435
- <input type="hidden" name="<?php echo $this->options->open_button_color_name(); ?>" value="<?php echo $this->options->open_button_color(); ?>" />
436
- </td>
437
- </tr>
438
- <tr>
439
- <th scope="row">
440
- <?php echo $this->options->close_button_color_label(); ?>
441
- </th>
442
- <td>
443
- <div class="color-selector-div">
444
- <div class="color-selector" color="<?php echo $this->options->close_button_color(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color(); ?></span>
445
- <input type="hidden" name="<?php echo $this->options->close_button_color_name(); ?>" value="<?php echo $this->options->close_button_color(); ?>" />
446
- </div>
447
- <div class="color-selector-div">
448
- <div class="color-selector" color="<?php echo $this->options->close_button_color_hover(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color_hover(); ?></span>
449
- <input type="hidden" name="<?php echo $this->options->close_button_color_hover_name(); ?>" value="<?php echo $this->options->close_button_color_hover(); ?>" />
450
- </div>
451
- <div class="color-selector-div">
452
- <div class="color-selector" color="<?php echo $this->options->close_button_color_x(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color_x(); ?></span>
453
- <input type="hidden" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo $this->options->close_button_color_x(); ?>" />
454
- </div>
455
- <span class="description"><?php echo $this->__('[Normal, Hover, X]'); ?></span>
456
- </td>
457
- </tr>
458
- </table>
459
-
460
- <h3><?php echo $this->__('CSS'); ?></h3>
461
- <table class="form-table">
462
- <tr>
463
- <th scope="row">
464
- <?php echo $this->options->custom_css_label(); ?>
465
- </th>
466
- <td>
467
- <textarea name="<?php echo $this->options->custom_css_name(); ?>" rows="10" cols="75"><?php echo $this->options->custom_css(); ?></textarea>
468
- </td>
469
- </tr>
470
- </table>
471
-
472
- <?php
473
- @$this->options_page_footer('notification-bar-plugin-settings/', 'notification-bar-plugin-faq/', array(array(
474
- 'href' => 'http://wpfront.com/notification-bar-plugin-ideas/',
475
- 'target' => '_blank',
476
- 'text' => $this->__('Plugin Ideas')
477
- )));
478
- ?>
479
-
480
- <script type="text/javascript">
481
- (function($) {
482
- function setColorPicker(div) {
483
- div.ColorPicker({
484
- color: div.attr('color'),
485
- onShow: function(colpkr) {
486
- $(colpkr).fadeIn(500);
487
- return false;
488
- }, onHide: function(colpkr) {
489
- $(colpkr).fadeOut(500);
490
- return false;
491
- },
492
- onChange: function(hsb, hex, rgb) {
493
- div.css('backgroundColor', '#' + hex);
494
- div.next().text('#' + hex).next().val('#' + hex);
495
- }
496
- }).css('backgroundColor', div.attr('color'));
497
- }
498
 
499
- $('#wpfront-notification-bar-options').find(".color-selector").each(function(i, e) {
500
- setColorPicker($(e));
501
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
 
503
- $('#wpfront-notification-bar-options .pages-selection input[type="checkbox"]').change(function() {
504
- var values = [];
505
- var div = $(this).parent().parent().parent();
506
- div.find('input:checked').each(function(i, e) {
507
- values.push($(e).val());
508
- });
509
- div.children(":first").val(values.join());
510
- });
511
-
512
- $('#wpfront-notification-bar-options .roles-selection input[type="checkbox"]').change(function() {
513
- var values = [];
514
- var div = $(this).parent().parent().parent();
515
- div.find('input:checked').each(function(i, e) {
516
- values.push($(e).val());
517
- });
518
- div.children(":first").val(JSON.stringify(values));
519
- });
520
-
521
- $('#wpfront-notification-bar-options input.date').datepicker({
522
- 'dateFormat' : 'yy-mm-dd'
523
- });
524
-
525
- $('#wpfront-notification-bar-options input.time').timepicker({
526
- 'timeFormat': 'h:i a'
527
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
528
 
529
- })(jQuery);
530
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  */
30
  ?>
31
 
32
+ <div class="wrap">
33
+ <h2><?php echo __('WPFront Notification Bar Settings', 'wpfront-notification-bar'); ?></h2>
34
+ <div id="wpfront-notification-bar-options" class="inside">
35
+ <form id="wpfront-notification-bar-options-form" method="post" action="options.php">
36
+ <?php
37
+ settings_fields(WPFront_Notification_Bar::OPTIONS_GROUP_NAME);
38
+ do_settings_sections('wpfront-notification-bar');
39
 
40
+ if ((isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true') || (isset($_GET['updated']) && $_GET['updated'] == 'true')) {
41
+ ?>
42
+ <div class="updated">
43
+ <p>
44
+ <strong><?php echo __('If you have a caching plugin, clear the cache for the new settings to take effect.', 'wpfront-notification-bar'); ?></strong>
45
+ </p>
46
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  <?php
48
+ }
49
+ ?>
50
+ <h3><?php echo __('Display', 'wpfront-notification-bar'); ?></h3>
51
+ <table class="form-table">
52
+ <tr>
53
+ <th scope="row">
54
+ <?php echo $this->options->enabled_label(); ?>
55
+ </th>
56
+ <td>
57
+ <input type="checkbox" name="<?php echo $this->options->enabled_name(); ?>" <?php echo $this->options->enabled() ? 'checked' : ''; ?> />
58
+ </td>
59
+ </tr>
60
+ <tr>
61
+ <th scope="row">
62
+ <?php echo $this->options->preview_mode_label(); ?>
63
+ </th>
64
+ <td>
65
+ <input type="checkbox" name="<?php echo $this->options->preview_mode_name(); ?>" <?php echo $this->options->preview_mode() ? 'checked' : ''; ?> />
66
+ <?php
67
+ if($this->options->preview_mode()) {
68
+ $url = add_query_arg('wpfront-notification-bar-preview-mode', '1', home_url());
69
+ ?>
70
+ <span class="description"><a target="_blank" rel="noopener" href="<?php echo $url; ?>"><?php echo $url; ?></a></span>
71
+ <?php
72
+ }
73
+ else {
74
+ ?>
75
+ <span class="description"><?php echo __('[You can test the notification bar without enabling it.]', 'wpfront-notification-bar'); ?></span>
76
+ <?php
77
+ }
78
+ ?>
79
+ </td>
80
+ </tr>
81
+ <tr>
82
+ <th scope="row">
83
+ <?php echo $this->options->debug_mode_label(); ?>
84
+ </th>
85
+ <td>
86
+ <input type="checkbox" name="<?php echo $this->options->debug_mode_name(); ?>" <?php echo $this->options->debug_mode() ? 'checked' : ''; ?> />
87
+ <span class="description">
88
+ <?php echo __('[Enable to see logs in browser.]', 'wpfront-notification-bar'); ?>
89
+ <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>
90
+ </span>
91
+ </td>
92
+ </tr>
93
+ <tr>
94
+ <th scope="row">
95
+ <?php echo $this->options->position_label(); ?>
96
+ </th>
97
+ <td>
98
+ <select name="<?php echo $this->options->position_name(); ?>">
99
+ <option value="1" <?php echo $this->options->position() == '1' ? 'selected' : ''; ?>><?php echo __('Top', 'wpfront-notification-bar'); ?></option>
100
+ <option value="2" <?php echo $this->options->position() == '2' ? 'selected' : ''; ?>><?php echo __('Bottom', 'wpfront-notification-bar'); ?></option>
101
+ </select>
102
+ </td>
103
+ </tr>
104
+ <tr>
105
+ <th scope="row">
106
+ <?php echo $this->options->fixed_position_label(); ?>
107
+ </th>
108
+ <td>
109
+ <input type="checkbox" name="<?php echo $this->options->fixed_position_name(); ?>" <?php echo $this->options->fixed_position() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo __('[Sticky Bar, bar will stay at position regardless of scrolling.]', 'wpfront-notification-bar'); ?></span>
110
+ </td>
111
+ </tr>
112
+ <tr>
113
+ <th scope="row">
114
+ <?php echo $this->options->display_scroll_label(); ?>
115
+ </th>
116
+ <td>
117
+ <input type="checkbox" name="<?php echo $this->options->display_scroll_name(); ?>" <?php echo $this->options->display_scroll() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo __('[Displays the bar on window scroll.]', 'wpfront-notification-bar'); ?></span>
118
+ </td>
119
+ </tr>
120
+ <tr>
121
+ <th scope="row">
122
+ <?php echo $this->options->display_scroll_offset_label(); ?>
123
+ </th>
124
+ <td>
125
+ <input class="seconds" name="<?php echo $this->options->display_scroll_offset_name(); ?>" value="<?php echo $this->options->display_scroll_offset(); ?>" />&#160;<?php echo __('px', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('Number of pixels to be scrolled before the bar appears.', 'wpfront-notification-bar'); ?>]</span>
126
+ </td>
127
+ </tr>
128
+ <tr>
129
+ <th scope="row">
130
+ <?php echo $this->options->height_label(); ?>
131
+ </th>
132
+ <td>
133
+ <input class="seconds" name="<?php echo $this->options->height_name(); ?>" value="<?php echo $this->options->height(); ?>" />&#160;<?php echo __('px', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('Set 0px to auto fit contents.', 'wpfront-notification-bar'); ?>]</span>
134
+ </td>
135
+ </tr>
136
+ <tr>
137
+ <th scope="row">
138
+ <?php echo $this->options->position_offset_label(); ?>
139
+ </th>
140
+ <td>
141
+ <input class="seconds" name="<?php echo $this->options->position_offset_name(); ?>" value="<?php echo $this->options->position_offset(); ?>" />&#160;<?php echo __('px', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('(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'); ?>]</span>
142
+ </td>
143
+ </tr>
144
+ <tr>
145
+ <th scope="row">
146
+ <?php echo $this->options->display_after_label(); ?>
147
+ </th>
148
+ <td>
149
+ <input class="seconds" name="<?php echo $this->options->display_after_name(); ?>" value="<?php echo $this->options->display_after(); ?>" />&#160;<?php echo __('second(s)', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('Set 0 second(s) to display immediately. Does not work in "Display on Scroll" mode.', 'wpfront-notification-bar'); ?>]</span>
150
+ </td>
151
+ </tr>
152
+ <tr>
153
+ <th scope="row">
154
+ <?php echo $this->options->animate_delay_label(); ?>
155
+ </th>
156
+ <td>
157
+ <input class="seconds" name="<?php echo $this->options->animate_delay_name(); ?>" value="<?php echo $this->options->animate_delay(); ?>" />&#160;<?php echo __('second(s)', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('Set 0 second(s) for no animation.', 'wpfront-notification-bar'); ?>]</span>
158
+ </td>
159
+ </tr>
160
+ <tr>
161
+ <th scope="row">
162
+ <?php echo $this->options->close_button_label(); ?>
163
+ </th>
164
+ <td>
165
+ <input type="checkbox" name="<?php echo $this->options->close_button_name(); ?>" <?php echo $this->options->close_button() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo __('[Displays a close button at the top right corner of the bar.]', 'wpfront-notification-bar'); ?></span>
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <th scope="row">
170
+ <?php echo $this->options->auto_close_after_label(); ?>
171
+ </th>
172
+ <td>
173
+ <input class="seconds" name="<?php echo $this->options->auto_close_after_name(); ?>" value="<?php echo $this->options->auto_close_after(); ?>" />&#160;<?php echo __('second(s)', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('Set 0 second(s) to disable auto close. Do not work in "Display on Scroll" mode.', 'wpfront-notification-bar'); ?>]</span>
174
+ </td>
175
+ </tr>
176
+ <tr>
177
+ <th scope="row">
178
+ <?php echo $this->options->display_shadow_label(); ?>
179
+ </th>
180
+ <td>
181
+ <input type="checkbox" name="<?php echo $this->options->display_shadow_name(); ?>" <?php echo $this->options->display_shadow() ? 'checked' : ''; ?> />
182
+ </td>
183
+ </tr>
184
+ <tr>
185
+ <th scope="row">
186
+ <?php echo $this->options->display_open_button_label(); ?>
187
+ </th>
188
+ <td>
189
+ <input type="checkbox" name="<?php echo $this->options->display_open_button_name(); ?>" <?php echo $this->options->display_open_button() ? 'checked' : ''; ?> />&#160;<span class="description">[<?php echo __('A reopen button will be displayed after the bar is closed.', 'wpfront-notification-bar'); ?>]</span>
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <th scope="row">
194
+ <?php echo $this->options->keep_closed_label(); ?>
195
+ </th>
196
+ <td>
197
+ <input type="checkbox" name="<?php echo $this->options->keep_closed_name(); ?>" <?php echo $this->options->keep_closed() ? 'checked' : ''; ?> />&#160;<span class="description">[<?php echo __('Once closed, bar will display closed on other pages.', 'wpfront-notification-bar'); ?>]</span>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <th scope="row">
202
+ <?php echo $this->options->keep_closed_for_label(); ?>
203
+ </th>
204
+ <td>
205
+ <input class="seconds" name="<?php echo $this->options->keep_closed_for_name(); ?>" value="<?php echo $this->options->keep_closed_for(); ?>" />&#160;<?php echo __('day(s)', 'wpfront-notification-bar'); ?>&#160;<span class="description">[<?php echo __('Bar will be kept closed for the number of days specified from last closed date.', 'wpfront-notification-bar'); ?>]</span>
206
+ </td>
207
+ </tr>
208
+ <tr>
209
+ <th scope="row">
210
+ <?php echo $this->options->keep_closed_cookie_name_label(); ?>
211
+ </th>
212
+ <td>
213
+ <input class="cookie-name" name="<?php echo $this->options->keep_closed_cookie_name_name(); ?>" value="<?php echo $this->options->keep_closed_cookie_name(); ?>" />
214
+ <span><?php echo __('Cookie name used to mark keep closed days. Changing this value will allow you to bypass "Keep Closed For" days and show the notification again.', 'wpfront-notification-bar'); ?></span>
215
+ </td>
216
+ </tr>
217
+ <tr>
218
+ <th scope="row">
219
+ <?php echo $this->options->hide_small_device_label(); ?>
220
+ </th>
221
+ <td>
222
+ <input type="checkbox" name="<?php echo $this->options->hide_small_device_name(); ?>" <?php echo $this->options->hide_small_device() ? "checked" : ""; ?> />
223
+ <span class="description"><?php echo __('[Button will be hidden on small devices when the width matches.]', 'wpfront-notification-bar'); ?></span>
224
+ </td>
225
+ </tr>
226
+ <tr>
227
+ <th scope="row">
228
+ <?php echo $this->options->small_device_width_label(); ?>
229
+ </th>
230
+ <td>
231
+ <input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo $this->options->small_device_width(); ?>" />px
232
+ <span class="description"><?php echo __('[Button will be hidden on devices with lesser or equal width.]', 'wpfront-notification-bar'); ?></span>
233
+ </td>
234
+ </tr>
235
+ <tr>
236
+ <th scope="row">
237
+ <?php echo $this->options->hide_small_window_label(); ?>
238
+ </th>
239
+ <td>
240
+ <input type="checkbox" name="<?php echo $this->options->hide_small_window_name(); ?>" <?php echo $this->options->hide_small_window() ? "checked" : ""; ?> />
241
+ <span class="description"><?php echo __('[Button will be hidden on broswer window when the width matches.]', 'wpfront-notification-bar'); ?></span>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <th scope="row">
246
+ <?php echo $this->options->small_window_width_label(); ?>
247
+ </th>
248
+ <td>
249
+ <input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo $this->options->small_window_width(); ?>" />px
250
+ <span class="description"><?php echo __('[Button will be hidden on browser window with lesser or equal width.]', 'wpfront-notification-bar'); ?></span>
251
+ </td>
252
+ </tr>
253
+ </table>
254
+
255
+ <h3><?php echo __('Content', 'wpfront-notification-bar'); ?></h3>
256
+ <table class="form-table">
257
+ <tr>
258
+ <th scope="row">
259
+ <?php echo $this->options->message_label(); ?>
260
+ </th>
261
+ <td>
262
+ <textarea rows="5" cols="75" name="<?php echo $this->options->message_name(); ?>"><?php echo $this->options->message(); ?></textarea>
263
+ <br />
264
+ <span class="description"><?php echo esc_html(__('[HTML tags are allowed. e.g. Add <br /> for break.]')); ?></span>
265
+ </td>
266
+ </tr>
267
+ <tr>
268
+ <th scope="row">
269
+ <?php echo $this->options->message_process_shortcode_label(); ?>
270
+ </th>
271
+ <td>
272
+ <input type="checkbox" name="<?php echo $this->options->message_process_shortcode_name(); ?>" <?php echo $this->options->message_process_shortcode() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo __('[Processes shortcodes in message text.]', 'wpfront-notification-bar'); ?></span>
273
+ </td>
274
+ </tr>
275
+ <tr>
276
+ <th scope="row">
277
+ <?php echo $this->options->display_button_label(); ?>
278
+ </th>
279
+ <td>
280
+ <input type="checkbox" name="<?php echo $this->options->display_button_name(); ?>" <?php echo $this->options->display_button() ? 'checked' : ''; ?> />&#160;<span class="description"><?php echo __('[Displays a button next to the message.]', 'wpfront-notification-bar'); ?></span>
281
+ </td>
282
+ </tr>
283
+ <tr>
284
+ <th scope="row">
285
+ <?php echo $this->options->button_text_label(); ?>
286
+ </th>
287
+ <td>
288
+ <input name="<?php echo $this->options->button_text_name(); ?>" value="<?php echo $this->options->button_text(); ?>" />
289
+ </td>
290
+ </tr>
291
+ <tr>
292
+ <th scope="row">
293
+ <?php echo $this->options->button_action_label(); ?>
294
+ </th>
295
+ <td>
296
  <label>
297
+ <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="1" <?php echo $this->options->button_action() == 1 ? 'checked' : ''; ?> />
298
+ <span><?php echo $this->options->button_action_url_label(); ?></span>
299
  </label>
300
+ <input class="URL" name="<?php echo $this->options->button_action_url_name(); ?>" value="<?php echo $this->options->button_action_url(); ?>" />
301
+ <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  <label>
303
+ <input type="checkbox" name="<?php echo $this->options->button_action_new_tab_name(); ?>" <?php echo $this->options->button_action_new_tab() ? 'checked' : ''; ?> />
304
+ <span><?php echo $this->options->button_action_new_tab_label() . '.'; ?></span>
305
  </label>
306
+ <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  <label>
308
+ <input type="checkbox" name="<?php echo $this->options->button_action_url_nofollow_name(); ?>" <?php echo $this->options->button_action_url_nofollow() ? 'checked' : ''; ?> />
309
+ <span><?php echo $this->options->button_action_url_nofollow_label() . '.'; ?></span>
310
  </label>
311
+ <span class="description"><?php echo __('[rel="nofollow"]', 'wpfront-notification-bar'); ?></span>
312
+ <br />
313
+ <label>
314
+ <input type="checkbox" name="<?php echo $this->options->button_action_url_noreferrer_name(); ?>" <?php echo $this->options->button_action_url_noreferrer() ? 'checked' : ''; ?> />
315
+ <span><?php echo $this->options->button_action_url_noreferrer_label() . '.'; ?></span>
316
+ </label>
317
+ <span class="description"><?php echo __('[rel="noreferrer"]', 'wpfront-notification-bar'); ?></span>
318
+ <br />
319
+ <label>
320
+ <input id="chk_button_action_url_noopener" type="checkbox" <?php echo $this->options->button_action_url_noopener() ? 'checked' : ''; ?> />
321
+ <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'; ?>" />
322
+ <span><?php echo $this->options->button_action_url_noopener_label() . '.'; ?></span>
323
+ </label>
324
+ <span class="description"><?php echo __('[rel="noopener", used when URL opens in new tab/window. Recommended value is "on", unless it affects your functionality.]', 'wpfront-notification-bar'); ?></span>
325
+ <br />
326
+ <label>
327
+ <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="2" <?php echo $this->options->button_action() == 2 ? 'checked' : ''; ?> />
328
+ <span><?php echo $this->options->button_action_javascript_label(); ?></span>
329
+ </label>
330
+ <br />
331
+ <textarea rows="5" cols="75" name="<?php echo $this->options->button_action_javascript_name(); ?>"><?php echo $this->options->button_action_javascript(); ?></textarea>
332
+ </td>
333
+ </tr>
334
+ <tr>
335
+ <th scope="row">
336
+ <?php echo $this->options->button_action_close_bar_label(); ?>
337
+ </th>
338
+ <td>
339
+ <input type="checkbox" name="<?php echo $this->options->button_action_close_bar_name(); ?>" <?php echo $this->options->button_action_close_bar() ? 'checked' : ''; ?> />
340
+ </td>
341
+ </tr>
342
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
 
344
+ <h3><?php echo __('Filter', 'wpfront-notification-bar'); ?></h3>
345
+ <table class="form-table">
346
+ <tr>
347
+ <th scope="row">
348
+ <?php echo $this->options->start_date_label(); ?>
349
+ </th>
350
+ <td>
351
+ <input class="date" name="<?php echo $this->options->start_date_name(); ?>" value="<?php echo $this->options->start_date() == NULL ? '' : date('Y-m-d', $this->options->start_date()); ?>" />
352
+ <input class="time" name="<?php echo $this->options->start_time_name(); ?>" value="<?php echo $this->options->start_time() == NULL ? '' : date('h:i a', $this->options->start_time()); ?>" />
353
+ &#160;
354
+ <span class="description"><?php echo __('[YYYY-MM-DD] [hh:mm ap]', 'wpfront-notification-bar'); ?></span>
355
+ </td>
356
+ </tr>
357
+ <tr>
358
+ <th scope="row">
359
+ <?php echo $this->options->end_date_label(); ?>
360
+ </th>
361
+ <td>
362
+ <input class="date" name="<?php echo $this->options->end_date_name(); ?>" value="<?php echo $this->options->end_date() == NULL ? '' : date('Y-m-d', $this->options->end_date()); ?>" />
363
+ <input class="time" name="<?php echo $this->options->end_time_name(); ?>" value="<?php echo $this->options->end_time() == NULL ? '' : date('h:i a', $this->options->end_time()); ?>" />
364
+ &#160;
365
+ <span class="description"><?php echo __('[YYYY-MM-DD] [hh:mm ap]', 'wpfront-notification-bar'); ?></span>
366
+ </td>
367
+ </tr>
368
+ <tr>
369
+ <th scope="row">
370
+ <?php echo $this->options->display_pages_label(); ?>
371
+ </th>
372
+ <td>
373
+ <label>
374
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="1" <?php echo $this->options->display_pages() == 1 ? 'checked' : ''; ?> />
375
+ <span><?php echo __('All pages.', 'wpfront-notification-bar'); ?></span>
376
+ </label>
377
+ <br />
378
+ <label>
379
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
380
+ <span><?php echo __('Only in landing page.', 'wpfront-notification-bar'); ?></span>&#160;<span class="description"><?php echo __('[The first page they visit on your website.]', 'wpfront-notification-bar'); ?></span>
381
+ </label>
382
+ <br />
383
+ <label>
384
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
385
+ <span><?php echo __('Include in following pages [Use the textbox below to specify the post IDs as a comma separated list.]', 'wpfront-notification-bar'); ?></span>
386
+ </label>
387
+ <input class="post-id-list" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
388
+ <div class="pages-selection">
389
+ <?php
390
+ $objects = $this->get_filter_objects();
391
+ foreach ($objects as $key => $value) {
392
+ ?>
393
+ <div class="page-div">
394
+ <label>
395
+ <input type="checkbox" value="<?php echo $key; ?>" <?php echo $this->filter_pages_contains($this->options->include_pages(), $key) === FALSE ? '' : 'checked'; ?> />
396
+ <?php echo $value; ?>
397
+ </label>
398
+ </div>
399
+ <?php
400
+ }
401
+ ?>
402
+ </div>
403
+ <label>
404
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="4" <?php echo $this->options->display_pages() == 4 ? 'checked' : ''; ?> />
405
+ <span><?php echo __('Exclude in following pages [Use the textbox below to specify the post IDs as a comma separated list.]', 'wpfront-notification-bar'); ?></span>
406
+ </label>
407
+ <input class="post-id-list" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
408
+ <div class="pages-selection">
409
+ <?php
410
+ $objects = $this->get_filter_objects();
411
+ foreach ($objects as $key => $value) {
412
+ ?>
413
+ <div class="page-div">
414
+ <label>
415
+ <input type="checkbox" value="<?php echo $key; ?>" <?php echo $this->filter_pages_contains($this->options->exclude_pages(), $key) === FALSE ? '' : 'checked'; ?> />
416
+ <?php echo $value; ?>
417
+ </label>
418
+ </div>
419
+ <?php
420
+ }
421
+ ?>
422
+ </div>
423
+ <span><?php echo __('Will only display 50 posts and 50 pages to reduce load. Use the PostIDs textbox to apply this setting on other Posts/Pages/CPTs.', 'wpfront-notification-bar'); ?></span>
424
+ </td>
425
+ </tr>
426
+ <tr>
427
+ <th scope="row">
428
+ <?php echo $this->options->landingpage_cookie_name_label(); ?>
429
+ </th>
430
+ <td>
431
+ <input class="cookie-name" name="<?php echo $this->options->landingpage_cookie_name_name(); ?>" value="<?php echo $this->options->landingpage_cookie_name(); ?>" />
432
+ <span><?php echo __('Cookie name used to mark landing page. Useful when you have multiple WordPress installs under same domain.', 'wpfront-notification-bar'); ?></span>
433
+ </td>
434
+ </tr>
435
+ <tr>
436
+ <th scope="row">
437
+ <?php echo $this->options->display_roles_label(); ?>
438
+ </th>
439
+ <td>
440
+ <label>
441
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="1" <?php echo $this->options->display_roles() == 1 ? 'checked' : ''; ?> />
442
+ <span><?php echo __('All users.', 'wpfront-notification-bar'); ?></span>
443
+ </label>
444
+ <br />
445
+ <label>
446
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="2" <?php echo $this->options->display_roles() == 2 ? 'checked' : ''; ?> />
447
+ <span><?php echo __('All logged in users.', 'wpfront-notification-bar'); ?></span>
448
+ </label>
449
+ <br />
450
+ <label>
451
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="3" <?php echo $this->options->display_roles() == 3 ? 'checked' : ''; ?> />
452
+ <span><?php echo __('Guest users. [Non-logged in users]', 'wpfront-notification-bar'); ?></span>
453
+ </label>
454
+ <br />
455
+ <label>
456
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="4" <?php echo $this->options->display_roles() == 4 ? 'checked' : ''; ?> />
457
+ <span><?php echo __('For following user roles', 'wpfront-notification-bar'); ?></span>&nbsp;<span>[<a target="_blank" rel="noopener" href="https://wpfront.com/nbtoure"><?php echo __('Manage Roles', 'wpfront-notification-bar'); ?>]</a></span>
458
+ </label>
459
+ <br />
460
+ <div class="roles-selection">
461
+ <input type="hidden" name="<?php echo $this->options->include_roles_name(); ?>" value="<?php echo htmlentities(json_encode($this->options->include_roles())); ?>" />
462
+ <?php
463
+ foreach ($this->get_role_objects() as $key => $value) {
464
+ ?>
465
+ <div class="role-div">
466
+ <label>
467
+ <input type="checkbox" value="<?php echo $key; ?>" <?php echo in_array($key, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
468
+ <?php echo $value; ?>
469
+ </label>
470
+ </div>
471
+ <?php
472
+ }
473
+ ?>
474
+ <div class="role-div">
475
+ <label>
476
+ <input type="checkbox" value="<?php echo WPFront_Notification_Bar::ROLE_NOROLE; ?>" <?php echo in_array(WPFront_Notification_Bar::ROLE_NOROLE, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
477
+ <?php echo __('[No Role]', 'wpfront-notification-bar'); ?>
478
+ </label>
479
+ </div>
480
+ <div class="role-div">
481
+ <label>
482
+ <input type="checkbox" value="<?php echo WPFront_Notification_Bar::ROLE_GUEST; ?>" <?php echo in_array(WPFront_Notification_Bar::ROLE_GUEST, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
483
+ <?php echo __('[Guest]', 'wpfront-notification-bar'); ?>
484
+ </label>
485
+ </div>
486
+ </div>
487
+ <label>
488
+ <input type="checkbox" name="<?php echo $this->options->wp_emember_integration_name(); ?>" <?php echo $this->options->wp_emember_integration() ? 'checked' : ''; ?> />
489
+ <span><?php echo __('Enable WP eMember integration.', 'wpfront-notification-bar'); ?></span>
490
+ </label>
491
+ </td>
492
+ </tr>
493
+ </table>
494
 
495
+ <h3><?php echo __('Color', 'wpfront-notification-bar'); ?></h3>
496
+ <table class="form-table">
497
+ <tr>
498
+ <th scope="row">
499
+ <?php echo __('Bar Color', 'wpfront-notification-bar'); ?>
500
+ </th>
501
+ <td>
502
+ <div class="color-selector-div">
503
+ <div class="color-selector" color="<?php echo $this->options->bar_from_color(); ?>"></div>
504
+ <input type="text" class="color-value" name="<?php echo $this->options->bar_from_color_name(); ?>" value="<?php echo $this->options->bar_from_color(); ?>" />
505
+ </div>
506
+ <div class="color-selector-div">
507
+ <div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div>
508
+ <input type="text" class="color-value" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo $this->options->bar_to_color(); ?>" />
509
+ </div>
510
+ <span class="description"><?php echo __('[Select two different colors to create a gradient.]', 'wpfront-notification-bar'); ?></span>
511
+ </td>
512
+ </tr>
513
+ <tr>
514
+ <th scope="row">
515
+ <?php echo $this->options->message_color_label(); ?>
516
+ </th>
517
+ <td>
518
+ <div class="color-selector" color="<?php echo $this->options->message_color(); ?>"></div>
519
+ <input type="text" class="color-value" name="<?php echo $this->options->message_color_name(); ?>" value="<?php echo $this->options->message_color(); ?>" />
520
+ </td>
521
+ </tr>
522
+ <tr>
523
+ <th scope="row">
524
+ <?php echo __('Button Color', 'wpfront-notification-bar'); ?>
525
+ </th>
526
+ <td>
527
+ <div class="color-selector-div">
528
+ <div class="color-selector" color="<?php echo $this->options->button_from_color(); ?>"></div>
529
+ <input type="text" class="color-value" name="<?php echo $this->options->button_from_color_name(); ?>" value="<?php echo $this->options->button_from_color(); ?>" />
530
+ </div>
531
+ <div class="color-selector-div">
532
+ <div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div>
533
+ <input type="text" class="color-value" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo $this->options->button_to_color(); ?>" />
534
+ </div>
535
+ <span class="description"><?php echo __('[Select two different colors to create a gradient.]', 'wpfront-notification-bar'); ?></span>
536
+ </td>
537
+ </tr>
538
+ <tr>
539
+ <th scope="row">
540
+ <?php echo $this->options->button_text_color_label(); ?>
541
+ </th>
542
+ <td>
543
+ <div class="color-selector" color="<?php echo $this->options->button_text_color(); ?>"></div>
544
+ <input type="text" class="color-value" name="<?php echo $this->options->button_text_color_name(); ?>" value="<?php echo $this->options->button_text_color(); ?>" />
545
+ </td>
546
+ </tr>
547
+ <tr>
548
+ <th scope="row">
549
+ <?php echo $this->options->open_button_color_label(); ?>
550
+ </th>
551
+ <td>
552
+ <div class="color-selector" color="<?php echo $this->options->open_button_color(); ?>"></div>
553
+ <input type="text" class="color-value" name="<?php echo $this->options->open_button_color_name(); ?>" value="<?php echo $this->options->open_button_color(); ?>" />
554
+ </td>
555
+ </tr>
556
+ <tr>
557
+ <th scope="row">
558
+ <?php echo $this->options->close_button_color_label(); ?>
559
+ </th>
560
+ <td>
561
+ <div class="color-selector-div">
562
+ <div class="color-selector" color="<?php echo $this->options->close_button_color(); ?>"></div>
563
+ <input type="text" class="color-value" name="<?php echo $this->options->close_button_color_name(); ?>" value="<?php echo $this->options->close_button_color(); ?>" />
564
+ </div>
565
+ <div class="color-selector-div">
566
+ <div class="color-selector" color="<?php echo $this->options->close_button_color_hover(); ?>"></div>
567
+ <input type="text" class="color-value" name="<?php echo $this->options->close_button_color_hover_name(); ?>" value="<?php echo $this->options->close_button_color_hover(); ?>" />
568
+ </div>
569
+ <div class="color-selector-div">
570
+ <div class="color-selector" color="<?php echo $this->options->close_button_color_x(); ?>"></div>
571
+ <input type="text" class="color-value" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo $this->options->close_button_color_x(); ?>" />
572
+ </div>
573
+ <span class="description"><?php echo __('[Normal, Hover, X]', 'wpfront-notification-bar'); ?></span>
574
+ </td>
575
+ </tr>
576
+ </table>
577
 
578
+ <h3><?php echo __('CSS', 'wpfront-notification-bar'); ?></h3>
579
+ <table class="form-table">
580
+ <tr>
581
+ <th scope="row">
582
+ <?php echo $this->options->custom_css_label(); ?>
583
+ </th>
584
+ <td>
585
+ <textarea name="<?php echo $this->options->custom_css_name(); ?>" rows="10" cols="75"><?php echo $this->options->custom_css(); ?></textarea>
586
+ </td>
587
+ </tr>
588
+ </table>
589
+ <?php submit_button(); ?>
590
+ </form>
591
+ </div>
592
+ </div>
wpfront-notification-bar.php CHANGED
@@ -3,7 +3,9 @@
3
  * Plugin Name: WPFront Notification Bar
4
  * Plugin URI: http://wpfront.com/notification-bar-plugin/
5
  * Description: Easily lets you create a bar on top or bottom to display a notification.
6
- * Version: 1.7.1
 
 
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3
@@ -35,4 +37,4 @@
35
 
36
  require_once("classes/class-wpfront-notification-bar.php");
37
 
38
- new WPFront_Notification_Bar();
3
  * Plugin Name: WPFront Notification Bar
4
  * Plugin URI: http://wpfront.com/notification-bar-plugin/
5
  * Description: Easily lets you create a bar on top or bottom to display a notification.
6
+ * Version: 1.8
7
+ * Requires at least: 5.0
8
+ * Requires PHP: 7.0
9
  * Author: Syam Mohan
10
  * Author URI: http://wpfront.com
11
  * License: GPL v3
37
 
38
  require_once("classes/class-wpfront-notification-bar.php");
39
 
40
+ WPFront_Notification_Bar::Instance()->init(__FILE__);