WPFront Notification Bar - Version 1.3

Version Description

  • User roles filter added.
  • New menu structure.
Download this release

Release Info

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

Code changes from version 1.2.1 to 1.3

classes/base/class-wpfront-base-menu.php ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/admin.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="mailto:syam@wpfront.com">' . $this->__('Contact Me (syam@wpfront.com)') . '</a>
179
+ ';
180
+ echo '</form>';
181
+ echo '</div>';
182
+ echo '</div>';
183
+ }
184
+
185
+ //returns localized string
186
+ public function __($key) {
187
+ return __($key, $this->plugin_slug);
188
+ }
189
+
190
+ //for compatibility
191
+ public function submit_button() {
192
+ if (function_exists('submit_button')) {
193
+ submit_button();
194
+ } else {
195
+ echo '<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="' . $this->__('Save Changes') . '" /></p>';
196
+ }
197
+ }
198
+
199
+ public function pluginURL(){
200
+ return $this->pluginURLRoot;
201
+ }
202
+
203
+ public function pluginDIR(){
204
+ return $this->pluginDIRRoot;
205
+ }
206
+ }
207
+
208
+ }
209
+
classes/{class-wpfront-options-base.php → base/class-wpfront-options-base.php} RENAMED
@@ -1,12 +1,12 @@
1
  <?php
2
 
3
  /*
4
- WPFront Notification Bar Plugin
5
  Copyright (C) 2013, WPFront.com
6
  Website: wpfront.com
7
  Contact: syam@wpfront.com
8
 
9
- WPFront Notification Bar Plugin is 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
 
1
  <?php
2
 
3
  /*
4
+ WPFront Plugins Options 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
 
classes/base/class-wpfront-static.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
56
+ return TRUE;
57
+ }
58
+
59
+ return FALSE;
60
+ }
61
+
62
+ }
63
+
64
+ }
classes/base/images/wpfront_menu.png ADDED
Binary file
classes/class-wpfront-notification-bar-options.php CHANGED
@@ -22,7 +22,7 @@
22
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
  */
24
 
25
- require_once("class-wpfront-options-base.php");
26
 
27
  if (!class_exists('WPFront_Notification_Bar_Options')) {
28
 
@@ -73,6 +73,8 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
73
  $this->addOption('close_button_color', 'string', '#555555', array($this, 'validate_color'))->__('Close Button Color');
74
  $this->addOption('close_button_color_hover', 'string', '#aaaaaa', array($this, 'validate_color'));
75
  $this->addOption('close_button_color_x', 'string', '#000000', array($this, 'validate_color'));
 
 
76
  }
77
 
78
  //validation function
@@ -87,7 +89,7 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
87
 
88
  return $arg;
89
  }
90
-
91
  //validation function
92
  protected function validate_color($arg) {
93
  if (strlen($arg) != 7)
@@ -98,7 +100,7 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
98
 
99
  return $arg;
100
  }
101
-
102
  protected function validate_display_pages($arg) {
103
  if ($arg < 1) {
104
  return 1;
@@ -111,6 +113,25 @@ if (!class_exists('WPFront_Notification_Bar_Options')) {
111
  return $arg;
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
 
116
  }
22
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
  */
24
 
25
+ require_once("base/class-wpfront-options-base.php");
26
 
27
  if (!class_exists('WPFront_Notification_Bar_Options')) {
28
 
73
  $this->addOption('close_button_color', 'string', '#555555', array($this, 'validate_color'))->__('Close Button Color');
74
  $this->addOption('close_button_color_hover', 'string', '#aaaaaa', array($this, 'validate_color'));
75
  $this->addOption('close_button_color_x', 'string', '#000000', array($this, 'validate_color'));
76
+ $this->addOption('display_roles', 'int', '1', array($this, 'validate_display_roles'))->__('Display for User Roles');
77
+ $this->addOption('include_roles', 'string', array(), array($this, 'validate_include_roles'));
78
  }
79
 
80
  //validation function
89
 
90
  return $arg;
91
  }
92
+
93
  //validation function
94
  protected function validate_color($arg) {
95
  if (strlen($arg) != 7)
100
 
101
  return $arg;
102
  }
103
+
104
  protected function validate_display_pages($arg) {
105
  if ($arg < 1) {
106
  return 1;
113
  return $arg;
114
  }
115
 
116
+ protected function validate_display_roles($arg) {
117
+ if ($arg < 1) {
118
+ return 1;
119
+ }
120
+
121
+ if ($arg > 4) {
122
+ return 4;
123
+ }
124
+
125
+ return $arg;
126
+ }
127
+
128
+ protected function validate_include_roles($arg) {
129
+ $obj = json_decode($arg);
130
+ if(!is_array($obj))
131
+ return array();
132
+ return $obj;
133
+ }
134
+
135
  }
136
 
137
  }
classes/class-wpfront-notification-bar.php CHANGED
@@ -22,6 +22,7 @@
22
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
  */
24
 
 
25
  require_once("class-wpfront-notification-bar-options.php");
26
 
27
  if (!class_exists('WPFront_Notification_Bar')) {
@@ -32,47 +33,33 @@ if (!class_exists('WPFront_Notification_Bar')) {
32
  * @author Syam Mohan <syam@wpfront.com>
33
  * @copyright 2013 WPFront.com
34
  */
35
- class WPFront_Notification_Bar {
36
 
37
  //Constants
38
- const VERSION = '1.2.1';
39
- const OPTIONSPAGE_SLUG = 'wpfront-notification-bar';
40
  const OPTIONS_GROUP_NAME = 'wpfront-notification-bar-options-group';
41
  const OPTION_NAME = 'wpfront-notification-bar-options';
42
  const PLUGIN_SLUG = 'wpfront-notification-bar';
43
-
44
  //cookie names
45
  const COOKIE_LANDINGPAGE = 'wpfront-notification-bar-landingpage';
 
 
 
46
 
47
  //Variables
48
- private $pluginURLRoot;
49
- private $pluginDIRRoot;
50
- private $options;
51
  private $markupLoaded;
52
  private $scriptLoaded;
53
 
54
  function __construct() {
55
- $this->markupLoaded = FALSE;
56
-
57
- //Root variables
58
- $this->pluginURLRoot = plugins_url() . '/wpfront-notification-bar/';
59
- $this->pluginDIRRoot = dirname(__FILE__) . '/../';
60
-
61
- add_action('init', array(&$this, 'init'));
62
 
63
- //register actions
64
- if (is_admin()) {
65
- add_action('admin_init', array(&$this, 'admin_init'));
66
- add_action('admin_menu', array(&$this, 'admin_menu'));
67
- add_filter('plugin_action_links', array(&$this, 'action_links'), 10, 2);
68
- } else {
69
- add_action('wp_enqueue_scripts', array(&$this, 'enqueue_styles'));
70
- add_action('wp_enqueue_scripts', array(&$this, 'enqueue_scripts'));
71
- }
72
 
73
  add_action('wp_footer', array(&$this, 'write_markup'));
74
  add_action('shutdown', array(&$this, 'write_markup'));
75
- add_action('plugins_loaded', array(&$this, 'plugins_loaded'));
 
76
  }
77
 
78
  public function init() {
@@ -110,14 +97,6 @@ if (!class_exists('WPFront_Notification_Bar')) {
110
  register_setting(self::OPTIONS_GROUP_NAME, self::OPTION_NAME);
111
  }
112
 
113
- public function admin_menu() {
114
- $page_hook_suffix = add_options_page($this->__('WPFront Notification Bar'), $this->__('Notification Bar'), 'manage_options', self::OPTIONSPAGE_SLUG, array($this, 'options_page'));
115
-
116
- //register for options page scripts and styles
117
- add_action('admin_print_scripts-' . $page_hook_suffix, array($this, 'enqueue_options_scripts'));
118
- add_action('admin_print_styles-' . $page_hook_suffix, array($this, 'enqueue_options_styles'));
119
- }
120
-
121
  //options page scripts
122
  public function enqueue_options_scripts() {
123
  $this->enqueue_scripts();
@@ -125,6 +104,9 @@ if (!class_exists('WPFront_Notification_Bar')) {
125
  $jsRoot = $this->pluginURLRoot . 'jquery-plugins/colorpicker/js/';
126
  wp_enqueue_script('jquery.eyecon.colorpicker', $jsRoot . 'colorpicker.js', array('jquery'), self::VERSION);
127
 
 
 
 
128
  // $jsRoot = $this->pluginURLRoot . 'js/';
129
  // wp_enqueue_script('wpfront-notification-bar-options', $jsRoot . 'options.js', array(), self::VERSION);
130
  }
@@ -140,31 +122,9 @@ if (!class_exists('WPFront_Notification_Bar')) {
140
  wp_enqueue_style('wpfront-notification-bar-options', $styleRoot . 'options.css', array(), self::VERSION);
141
  }
142
 
143
- //creates options page
144
- public function options_page() {
145
- if (!current_user_can('manage_options')) {
146
- wp_die($this->__('You do not have sufficient permissions to access this page.'));
147
- return;
148
- }
149
-
150
- include($this->pluginDIRRoot . 'templates/options-template.php');
151
- }
152
-
153
- //add "settings" link
154
- public function action_links($links, $file) {
155
- if ($file == 'wpfront-notification-bar/wpfront-notification-bar.php') {
156
- $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/options-general.php?page=' . self::OPTIONSPAGE_SLUG . '">' . $this->__('Settings') . '</a>';
157
- array_unshift($links, $settings_link);
158
- }
159
- return $links;
160
- }
161
-
162
  public function plugins_loaded() {
163
  //load plugin options
164
  $this->options = new WPFront_Notification_Bar_Options(self::OPTION_NAME, self::PLUGIN_SLUG);
165
-
166
- //for localization
167
- load_plugin_textdomain(self::PLUGIN_SLUG, FALSE, self::PLUGIN_SLUG . '/languages/');
168
  }
169
 
170
  //writes the html and script for the bar
@@ -191,7 +151,7 @@ if (!class_exists('WPFront_Notification_Bar')) {
191
  'button_action_close_bar' => $this->options->button_action_close_bar(),
192
  'auto_close_after' => $this->options->auto_close_after(),
193
  'display_after' => $this->options->display_after(),
194
- 'is_admin_bar_showing' => $this->is_admin_bar_showing(),
195
  'display_open_button' => $this->options->display_open_button(),
196
  'keep_closed' => $this->options->keep_closed(),
197
  'keep_closed_for' => $this->options->keep_closed_for(),
@@ -203,29 +163,7 @@ if (!class_exists('WPFront_Notification_Bar')) {
203
  $this->markupLoaded = TRUE;
204
  }
205
 
206
- //returns localized string
207
- public function __($key) {
208
- return __($key, self::PLUGIN_SLUG);
209
- }
210
-
211
- //for compatibility
212
- private function submit_button() {
213
- if (function_exists('submit_button')) {
214
- submit_button();
215
- } else {
216
- echo '<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="' . $this->__('Save Changes') . '" /></p>';
217
- }
218
- }
219
-
220
- private function is_admin_bar_showing() {
221
- if (function_exists('is_admin_bar_showing')) {
222
- return is_admin_bar_showing();
223
- }
224
-
225
- return FALSE;
226
- }
227
-
228
- private function get_filter_objects() {
229
  $objects = array();
230
 
231
  $objects['1.home'] = $this->__('[Page]') . ' ' . $this->__('Home');
@@ -248,10 +186,55 @@ if (!class_exists('WPFront_Notification_Bar')) {
248
  return $objects;
249
  }
250
 
251
- private function filter_page() {
 
 
 
 
 
 
 
 
 
 
 
 
252
  if (is_admin())
253
  return TRUE;
254
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  switch ($this->options->display_pages()) {
256
  case 1:
257
  return TRUE;
@@ -298,9 +281,9 @@ if (!class_exists('WPFront_Notification_Bar')) {
298
  return TRUE;
299
  }
300
 
301
- private function enabled() {
302
  if ($this->options->enabled()) {
303
- return $this->filter_page();
304
  }
305
 
306
  return FALSE;
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
  * @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.3';
 
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
  add_action('wp_footer', array(&$this, 'write_markup'));
60
  add_action('shutdown', array(&$this, 'write_markup'));
61
+
62
+ $this->add_menu($this->__('WPFront Notification Bar'), $this->__('Notification Bar'));
63
  }
64
 
65
  public function init() {
97
  register_setting(self::OPTIONS_GROUP_NAME, self::OPTION_NAME);
98
  }
99
 
 
 
 
 
 
 
 
 
100
  //options page scripts
101
  public function enqueue_options_scripts() {
102
  $this->enqueue_scripts();
104
  $jsRoot = $this->pluginURLRoot . 'jquery-plugins/colorpicker/js/';
105
  wp_enqueue_script('jquery.eyecon.colorpicker', $jsRoot . 'colorpicker.js', array('jquery'), self::VERSION);
106
 
107
+ $jsRoot = $this->pluginURLRoot . 'jquery-plugins/';
108
+ wp_enqueue_script('json2', $jsRoot . 'json2.min.js', array('jquery'), self::VERSION);
109
+
110
  // $jsRoot = $this->pluginURLRoot . 'js/';
111
  // wp_enqueue_script('wpfront-notification-bar-options', $jsRoot . 'options.js', array(), self::VERSION);
112
  }
122
  wp_enqueue_style('wpfront-notification-bar-options', $styleRoot . 'options.css', array(), self::VERSION);
123
  }
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  public function plugins_loaded() {
126
  //load plugin options
127
  $this->options = new WPFront_Notification_Bar_Options(self::OPTION_NAME, self::PLUGIN_SLUG);
 
 
 
128
  }
129
 
130
  //writes the html and script for the bar
151
  'button_action_close_bar' => $this->options->button_action_close_bar(),
152
  'auto_close_after' => $this->options->auto_close_after(),
153
  'display_after' => $this->options->display_after(),
154
+ 'is_admin_bar_showing' => WPFront_Static::is_admin_bar_showing(),
155
  'display_open_button' => $this->options->display_open_button(),
156
  'keep_closed' => $this->options->keep_closed(),
157
  'keep_closed_for' => $this->options->keep_closed_for(),
163
  $this->markupLoaded = TRUE;
164
  }
165
 
166
+ protected function get_filter_objects() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  $objects = array();
168
 
169
  $objects['1.home'] = $this->__('[Page]') . ' ' . $this->__('Home');
186
  return $objects;
187
  }
188
 
189
+ protected function get_role_objects() {
190
+ $objects = array();
191
+ global $wp_roles;
192
+
193
+ $roles = $wp_roles->role_names;
194
+ foreach ($roles as $role_name => $role_display_name) {
195
+ $objects[$role_name] = $role_display_name;
196
+ }
197
+
198
+ return $objects;
199
+ }
200
+
201
+ protected function filter() {
202
  if (is_admin())
203
  return TRUE;
204
+
205
+ switch ($this->options->display_roles()) {
206
+ case 1:
207
+ break;
208
+ case 2:
209
+ if (!is_user_logged_in())
210
+ return FALSE;
211
+ break;
212
+ case 3:
213
+ if (is_user_logged_in())
214
+ return FALSE;
215
+ break;
216
+ case 4:
217
+ global $current_user;
218
+ if (empty($current_user->roles)) {
219
+ $role = self::ROLE_GUEST;
220
+ if (is_user_logged_in())
221
+ $role = self::ROLE_NOROLE;
222
+ if (!in_array($role, $this->options->include_roles()))
223
+ return FALSE;
224
+ } else {
225
+ $display = FALSE;
226
+ foreach ($current_user->roles as $role) {
227
+ if (in_array($role, $this->options->include_roles())) {
228
+ $display = TRUE;
229
+ break;
230
+ }
231
+ }
232
+ if (!$display)
233
+ return FALSE;
234
+ }
235
+ break;
236
+ }
237
+
238
  switch ($this->options->display_pages()) {
239
  case 1:
240
  return TRUE;
281
  return TRUE;
282
  }
283
 
284
+ protected function enabled() {
285
  if ($this->options->enabled()) {
286
+ return $this->filter();
287
  }
288
 
289
  return FALSE;
css/options.css CHANGED
@@ -38,7 +38,7 @@
38
  vertical-align: middle;
39
  }
40
 
41
- #wpfront-notification-bar-options table.form-table div.pages-selection
42
  {
43
  width: 70%;
44
  height: 150px;
@@ -52,7 +52,7 @@
52
  border-radius: 4px;
53
  }
54
 
55
- #wpfront-notification-bar-options table.form-table div.page-div
56
  {
57
  float: left;
58
  width: 250px;
38
  vertical-align: middle;
39
  }
40
 
41
+ #wpfront-notification-bar-options table.form-table div.pages-selection, #wpfront-notification-bar-options table.form-table div.roles-selection
42
  {
43
  width: 70%;
44
  height: 150px;
52
  border-radius: 4px;
53
  }
54
 
55
+ #wpfront-notification-bar-options table.form-table div.page-div, #wpfront-notification-bar-options table.form-table div.role-div
56
  {
57
  float: left;
58
  width: 250px;
jquery-plugins/json2.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
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");}})();
languages/wpfront-notification-bar.mo CHANGED
Binary file
languages/wpfront-notification-bar.po CHANGED
@@ -1,21 +1,152 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WPFront Notification Bar\n"
4
- "POT-Creation-Date: 2014-02-14 15:28-0700\n"
5
- "PO-Revision-Date: 2014-02-14 17:24-0700\n"
6
  "Last-Translator: \n"
7
  "Language-Team: WPFront <contact@wpfront.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.1\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/class-wpfront-notification-bar-options.php:41
20
  msgid "Enabled"
21
  msgstr "Enabled"
@@ -134,76 +265,60 @@ msgstr "Custom CSS"
134
  msgid "Close Button Color"
135
  msgstr "Close Button Color"
136
 
137
- #: ../classes/class-wpfront-notification-bar.php:114
 
 
 
 
138
  msgid "WPFront Notification Bar"
139
  msgstr "WPFront Notification Bar"
140
 
141
- #: ../classes/class-wpfront-notification-bar.php:114
142
  msgid "Notification Bar"
143
  msgstr "Notification Bar"
144
 
145
- #: ../classes/class-wpfront-notification-bar.php:146
146
- msgid "You do not have sufficient permissions to access this page."
147
- msgstr "You do not have sufficient permissions to access this page."
148
-
149
- #: ../classes/class-wpfront-notification-bar.php:156
150
- msgid "Settings"
151
- msgstr "Settings"
152
-
153
- #: ../classes/class-wpfront-notification-bar.php:216
154
- msgid "Save Changes"
155
- msgstr "Save Changes"
156
-
157
- #: ../classes/class-wpfront-notification-bar.php:231
158
- #: ../classes/class-wpfront-notification-bar.php:235
159
  msgid "[Page]"
160
  msgstr "[Page]"
161
 
162
- #: ../classes/class-wpfront-notification-bar.php:231
163
  msgid "Home"
164
  msgstr "Home"
165
 
166
- #: ../classes/class-wpfront-notification-bar.php:240
167
  msgid "[Post]"
168
  msgstr "[Post]"
169
 
170
- #: ../templates/options-template.php:34
171
  msgid "WPFront Notification Bar Settings"
172
  msgstr "WPFront Notification Bar Settings"
173
 
174
- #: ../templates/options-template.php:44
175
- msgid ""
176
- "If you have a caching plugin, clear the cache for the new settings to take "
177
- "effect."
178
- msgstr ""
179
- "If you have a caching plugin, clear the cache for the new settings to take "
180
- "effect."
181
-
182
- #: ../templates/options-template.php:49
183
  msgid "Display"
184
  msgstr "Display"
185
 
186
- #: ../templates/options-template.php:65
187
  msgid "Top"
188
  msgstr "Top"
189
 
190
- #: ../templates/options-template.php:66
191
  msgid "Bottom"
192
  msgstr "Bottom"
193
 
194
- #: ../templates/options-template.php:75
195
  msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
196
  msgstr "[Sticky Bar, bar will stay at position regardless of scrolling.]"
197
 
198
- #: ../templates/options-template.php:83 ../templates/options-template.php:91
199
  msgid "px"
200
  msgstr "px"
201
 
202
- #: ../templates/options-template.php:83
203
  msgid "Set 0px to auto fit contents."
204
  msgstr "Set 0px to auto fit contents."
205
 
206
- #: ../templates/options-template.php:91
207
  msgid ""
208
  "(Top bar only) If you find the bar overlapping, try increasing this value. "
209
  "(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
@@ -211,40 +326,40 @@ msgstr ""
211
  "(Top bar only) If you find the bar overlapping, try increasing this value. "
212
  "(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
213
 
214
- #: ../templates/options-template.php:99 ../templates/options-template.php:107
215
- #: ../templates/options-template.php:123
216
  msgid "second(s)"
217
  msgstr "second(s)"
218
 
219
- #: ../templates/options-template.php:99
220
  msgid "Set 0 second(s) to display immediately."
221
  msgstr "Set 0 second(s) to display immediately."
222
 
223
- #: ../templates/options-template.php:107
224
  msgid "Set 0 second(s) for no animation."
225
  msgstr "Set 0 second(s) for no animation."
226
 
227
- #: ../templates/options-template.php:115
228
  msgid "[Displays a close button at the top right corner of the bar.]"
229
  msgstr "[Displays a close button at the top right corner of the bar.]"
230
 
231
- #: ../templates/options-template.php:123
232
  msgid "Set 0 second(s) to disable auto close."
233
  msgstr "Set 0 second(s) to disable auto close."
234
 
235
- #: ../templates/options-template.php:139
236
  msgid "A reopen button will be displayed after the bar is closed."
237
  msgstr "A reopen button will be displayed after the bar is closed."
238
 
239
- #: ../templates/options-template.php:147
240
  msgid "Once closed, bar will display closed on other pages."
241
  msgstr "Once closed, bar will display closed on other pages."
242
 
243
- #: ../templates/options-template.php:155
244
  msgid "day(s)"
245
  msgstr "day(s)"
246
 
247
- #: ../templates/options-template.php:155
248
  msgid ""
249
  "Bar will be kept closed for the number of days specified from last closed "
250
  "date."
@@ -252,94 +367,94 @@ msgstr ""
252
  "Bar will be kept closed for the number of days specified from last closed "
253
  "date."
254
 
255
- #: ../templates/options-template.php:160
256
  msgid "Content"
257
  msgstr "Content"
258
 
259
- #: ../templates/options-template.php:169
260
  msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
261
  msgstr "[HTML tags are allowed. e.g. Add <br /> for break.]"
262
 
263
- #: ../templates/options-template.php:177
264
  msgid "[Displays a button next to the message.]"
265
  msgstr "[Displays a button next to the message.]"
266
 
267
- #: ../templates/options-template.php:222
268
  msgid "Filter"
269
  msgstr "Filter"
270
 
271
- #: ../templates/options-template.php:231
272
  msgid "All pages."
273
  msgstr "All pages."
274
 
275
- #: ../templates/options-template.php:236
276
  msgid "Only in landing page."
277
  msgstr "Only in landing page."
278
 
279
- #: ../templates/options-template.php:236
280
  msgid "[The first page they visit on your website.]"
281
  msgstr "[The first page they visit on your website.]"
282
 
283
- #: ../templates/options-template.php:241
284
  msgid "Include in following pages"
285
  msgstr "Include in following pages"
286
 
287
- #: ../templates/options-template.php:259
288
  msgid "Exclude in following pages"
289
  msgstr "Exclude in following pages"
290
 
 
 
 
 
 
 
 
 
291
  #: ../templates/options-template.php:279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  msgid "Color"
293
  msgstr "Color"
294
 
295
- #: ../templates/options-template.php:283
296
  msgid "Bar Color"
297
  msgstr "Bar Color"
298
 
299
- #: ../templates/options-template.php:294 ../templates/options-template.php:319
300
  msgid "[Select two different colors to create a gradient.]"
301
  msgstr "[Select two different colors to create a gradient.]"
302
 
303
- #: ../templates/options-template.php:308
304
  msgid "Button Color"
305
  msgstr "Button Color"
306
 
307
- #: ../templates/options-template.php:357
308
  msgid "[Normal, Hover, X]"
309
  msgstr "[Normal, Hover, X]"
310
 
311
- #: ../templates/options-template.php:362
312
  msgid "CSS"
313
  msgstr "CSS"
314
 
315
- #: ../templates/options-template.php:376
316
  msgid "Plugin Ideas"
317
  msgstr "Plugin Ideas"
318
 
319
- #: ../templates/options-template.php:378
320
- msgid "Settings Description"
321
- msgstr "Settings Description"
322
-
323
- #: ../templates/options-template.php:380
324
- msgid "Plugin FAQ"
325
- msgstr "Plugin FAQ"
326
-
327
- #: ../templates/options-template.php:382
328
- msgid "Feature Request"
329
- msgstr "Feature Request"
330
-
331
- #: ../templates/options-template.php:384
332
- msgid "Report Bug"
333
- msgstr "Report Bug"
334
-
335
- #: ../templates/options-template.php:386
336
- msgid "Write Review"
337
- msgstr "Write Review"
338
-
339
- #: ../templates/options-template.php:388
340
- msgid "Contact Me (syam@wpfront.com)"
341
- msgstr "Contact Me (syam@wpfront.com)"
342
-
343
  #~ msgid "Animate Display"
344
  #~ msgstr "Animate Display"
345
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WPFront Notification Bar\n"
4
+ "POT-Creation-Date: 2014-03-03 17:59-0700\n"
5
+ "PO-Revision-Date: 2014-03-03 17:59-0700\n"
6
  "Last-Translator: \n"
7
  "Language-Team: WPFront <contact@wpfront.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.4\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../classes/base/class-wpfront-base-menu.php:52
20
+ msgid "Name"
21
+ msgstr "Name"
22
+
23
+ #: ../classes/base/class-wpfront-base-menu.php:53
24
+ msgid "Version"
25
+ msgstr "Version"
26
+
27
+ #: ../classes/base/class-wpfront-base-menu.php:54
28
+ msgid "Rating"
29
+ msgstr "Rating"
30
+
31
+ #: ../classes/base/class-wpfront-base-menu.php:55
32
+ msgid "Description"
33
+ msgstr "Description"
34
+
35
+ #: ../classes/base/class-wpfront-base-menu.php:69
36
+ #, php-format
37
+ msgid "based on %s rating(s)"
38
+ msgstr "based on %s rating(s)"
39
+
40
+ #: ../classes/base/class-wpfront-base-menu.php:105
41
+ msgid "Unable to communicate with WordPress.org"
42
+ msgstr "Unable to communicate with WordPress.org"
43
+
44
+ #: ../classes/base/class-wpfront-base-menu.php:123
45
+ #: ../classes/base/class-wpfront-base-menu.php:217
46
+ msgid "WPFront Plugins"
47
+ msgstr "WPFront Plugins"
48
+
49
+ #: ../classes/base/class-wpfront-base-menu.php:147
50
+ #, php-format
51
+ msgid "By %s"
52
+ msgstr "By %s"
53
+
54
+ #: ../classes/base/class-wpfront-base-menu.php:154
55
+ #, php-format
56
+ msgid "More information about %s"
57
+ msgstr "More information about %s"
58
+
59
+ #: ../classes/base/class-wpfront-base-menu.php:154
60
+ msgid "Details"
61
+ msgstr "Details"
62
+
63
+ #: ../classes/base/class-wpfront-base-menu.php:163
64
+ #, php-format
65
+ msgid "Install %s"
66
+ msgstr "Install %s"
67
+
68
+ #: ../classes/base/class-wpfront-base-menu.php:163
69
+ msgid "Install Now"
70
+ msgstr "Install Now"
71
+
72
+ #: ../classes/base/class-wpfront-base-menu.php:168
73
+ #, php-format
74
+ msgid "Update to version %s"
75
+ msgstr "Update to version %s"
76
+
77
+ #: ../classes/base/class-wpfront-base-menu.php:168
78
+ msgid "Update Now"
79
+ msgstr "Update Now"
80
+
81
+ #: ../classes/base/class-wpfront-base-menu.php:173
82
+ msgid "This plugin is already installed and is up to date"
83
+ msgstr "This plugin is already installed and is up to date"
84
+
85
+ #: ../classes/base/class-wpfront-base-menu.php:173
86
+ msgid "Installed"
87
+ msgstr "Installed"
88
+
89
+ #: ../classes/base/class-wpfront-base-menu.php:175
90
+ #: ../classes/base/class-wpfront-base.php:105
91
+ msgid "Settings"
92
+ msgstr "Settings"
93
+
94
+ #: ../classes/base/class-wpfront-base-menu.php:177
95
+ msgid "Activate"
96
+ msgstr "Activate"
97
+
98
+ #: ../classes/base/class-wpfront-base-menu.php:199
99
+ msgid "Feedback"
100
+ msgstr "Feedback"
101
+
102
+ #: ../classes/base/class-wpfront-base-menu.php:216
103
+ msgid "WPFront"
104
+ msgstr "WPFront"
105
+
106
+ #: ../classes/base/class-wpfront-base-menu.php:217
107
+ msgid "All Plugins"
108
+ msgstr "All Plugins"
109
+
110
+ #: ../classes/base/class-wpfront-base.php:130
111
+ msgid "You do not have sufficient permissions to access this page."
112
+ msgstr "You do not have sufficient permissions to access this page."
113
+
114
+ #: ../classes/base/class-wpfront-base.php:150
115
+ msgid ""
116
+ "If you have a caching plugin, clear the cache for the new settings to take "
117
+ "effect."
118
+ msgstr ""
119
+ "If you have a caching plugin, clear the cache for the new settings to take "
120
+ "effect."
121
+
122
+ #: ../classes/base/class-wpfront-base.php:168
123
+ msgid "Settings Description"
124
+ msgstr "Settings Description"
125
+
126
+ #: ../classes/base/class-wpfront-base.php:170
127
+ msgid "Plugin FAQ"
128
+ msgstr "Plugin FAQ"
129
+
130
+ #: ../classes/base/class-wpfront-base.php:172
131
+ msgid "Feature Request"
132
+ msgstr "Feature Request"
133
+
134
+ #: ../classes/base/class-wpfront-base.php:174
135
+ msgid "Report Bug"
136
+ msgstr "Report Bug"
137
+
138
+ #: ../classes/base/class-wpfront-base.php:176
139
+ msgid "Write Review"
140
+ msgstr "Write Review"
141
+
142
+ #: ../classes/base/class-wpfront-base.php:178
143
+ msgid "Contact Me (syam@wpfront.com)"
144
+ msgstr "Contact Me (syam@wpfront.com)"
145
+
146
+ #: ../classes/base/class-wpfront-base.php:195
147
+ msgid "Save Changes"
148
+ msgstr "Save Changes"
149
+
150
  #: ../classes/class-wpfront-notification-bar-options.php:41
151
  msgid "Enabled"
152
  msgstr "Enabled"
265
  msgid "Close Button Color"
266
  msgstr "Close Button Color"
267
 
268
+ #: ../classes/class-wpfront-notification-bar-options.php:76
269
+ msgid "Display for User Roles"
270
+ msgstr "Display for User Roles"
271
+
272
+ #: ../classes/class-wpfront-notification-bar.php:62
273
  msgid "WPFront Notification Bar"
274
  msgstr "WPFront Notification Bar"
275
 
276
+ #: ../classes/class-wpfront-notification-bar.php:62
277
  msgid "Notification Bar"
278
  msgstr "Notification Bar"
279
 
280
+ #: ../classes/class-wpfront-notification-bar.php:169
281
+ #: ../classes/class-wpfront-notification-bar.php:173
 
 
 
 
 
 
 
 
 
 
 
 
282
  msgid "[Page]"
283
  msgstr "[Page]"
284
 
285
+ #: ../classes/class-wpfront-notification-bar.php:169
286
  msgid "Home"
287
  msgstr "Home"
288
 
289
+ #: ../classes/class-wpfront-notification-bar.php:178
290
  msgid "[Post]"
291
  msgstr "[Post]"
292
 
293
+ #: ../templates/options-template.php:32
294
  msgid "WPFront Notification Bar Settings"
295
  msgstr "WPFront Notification Bar Settings"
296
 
297
+ #: ../templates/options-template.php:34
 
 
 
 
 
 
 
 
298
  msgid "Display"
299
  msgstr "Display"
300
 
301
+ #: ../templates/options-template.php:50
302
  msgid "Top"
303
  msgstr "Top"
304
 
305
+ #: ../templates/options-template.php:51
306
  msgid "Bottom"
307
  msgstr "Bottom"
308
 
309
+ #: ../templates/options-template.php:60
310
  msgid "[Sticky Bar, bar will stay at position regardless of scrolling.]"
311
  msgstr "[Sticky Bar, bar will stay at position regardless of scrolling.]"
312
 
313
+ #: ../templates/options-template.php:68 ../templates/options-template.php:76
314
  msgid "px"
315
  msgstr "px"
316
 
317
+ #: ../templates/options-template.php:68
318
  msgid "Set 0px to auto fit contents."
319
  msgstr "Set 0px to auto fit contents."
320
 
321
+ #: ../templates/options-template.php:76
322
  msgid ""
323
  "(Top bar only) If you find the bar overlapping, try increasing this value. "
324
  "(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
326
  "(Top bar only) If you find the bar overlapping, try increasing this value. "
327
  "(eg. WordPress 3.8 Twenty Fourteen theme, set 48px)"
328
 
329
+ #: ../templates/options-template.php:84 ../templates/options-template.php:92
330
+ #: ../templates/options-template.php:108
331
  msgid "second(s)"
332
  msgstr "second(s)"
333
 
334
+ #: ../templates/options-template.php:84
335
  msgid "Set 0 second(s) to display immediately."
336
  msgstr "Set 0 second(s) to display immediately."
337
 
338
+ #: ../templates/options-template.php:92
339
  msgid "Set 0 second(s) for no animation."
340
  msgstr "Set 0 second(s) for no animation."
341
 
342
+ #: ../templates/options-template.php:100
343
  msgid "[Displays a close button at the top right corner of the bar.]"
344
  msgstr "[Displays a close button at the top right corner of the bar.]"
345
 
346
+ #: ../templates/options-template.php:108
347
  msgid "Set 0 second(s) to disable auto close."
348
  msgstr "Set 0 second(s) to disable auto close."
349
 
350
+ #: ../templates/options-template.php:124
351
  msgid "A reopen button will be displayed after the bar is closed."
352
  msgstr "A reopen button will be displayed after the bar is closed."
353
 
354
+ #: ../templates/options-template.php:132
355
  msgid "Once closed, bar will display closed on other pages."
356
  msgstr "Once closed, bar will display closed on other pages."
357
 
358
+ #: ../templates/options-template.php:140
359
  msgid "day(s)"
360
  msgstr "day(s)"
361
 
362
+ #: ../templates/options-template.php:140
363
  msgid ""
364
  "Bar will be kept closed for the number of days specified from last closed "
365
  "date."
367
  "Bar will be kept closed for the number of days specified from last closed "
368
  "date."
369
 
370
+ #: ../templates/options-template.php:145
371
  msgid "Content"
372
  msgstr "Content"
373
 
374
+ #: ../templates/options-template.php:154
375
  msgid "[HTML tags are allowed. e.g. Add <br /> for break.]"
376
  msgstr "[HTML tags are allowed. e.g. Add <br /> for break.]"
377
 
378
+ #: ../templates/options-template.php:162
379
  msgid "[Displays a button next to the message.]"
380
  msgstr "[Displays a button next to the message.]"
381
 
382
+ #: ../templates/options-template.php:207
383
  msgid "Filter"
384
  msgstr "Filter"
385
 
386
+ #: ../templates/options-template.php:216
387
  msgid "All pages."
388
  msgstr "All pages."
389
 
390
+ #: ../templates/options-template.php:221
391
  msgid "Only in landing page."
392
  msgstr "Only in landing page."
393
 
394
+ #: ../templates/options-template.php:221
395
  msgid "[The first page they visit on your website.]"
396
  msgstr "[The first page they visit on your website.]"
397
 
398
+ #: ../templates/options-template.php:226
399
  msgid "Include in following pages"
400
  msgstr "Include in following pages"
401
 
402
+ #: ../templates/options-template.php:244
403
  msgid "Exclude in following pages"
404
  msgstr "Exclude in following pages"
405
 
406
+ #: ../templates/options-template.php:269
407
+ msgid "All users."
408
+ msgstr "All users."
409
+
410
+ #: ../templates/options-template.php:274
411
+ msgid "All logged in users."
412
+ msgstr "All logged in users."
413
+
414
  #: ../templates/options-template.php:279
415
+ msgid "Guest users. [Non-logged in users]"
416
+ msgstr "Guest users. [Non-logged in users]"
417
+
418
+ #: ../templates/options-template.php:284
419
+ msgid "For following user roles"
420
+ msgstr "For following user roles"
421
+
422
+ #: ../templates/options-template.php:301
423
+ msgid "[No Role]"
424
+ msgstr "[No Role]"
425
+
426
+ #: ../templates/options-template.php:305
427
+ msgid "[Guest]"
428
+ msgstr "[Guest]"
429
+
430
+ #: ../templates/options-template.php:312
431
  msgid "Color"
432
  msgstr "Color"
433
 
434
+ #: ../templates/options-template.php:316
435
  msgid "Bar Color"
436
  msgstr "Bar Color"
437
 
438
+ #: ../templates/options-template.php:327 ../templates/options-template.php:352
439
  msgid "[Select two different colors to create a gradient.]"
440
  msgstr "[Select two different colors to create a gradient.]"
441
 
442
+ #: ../templates/options-template.php:341
443
  msgid "Button Color"
444
  msgstr "Button Color"
445
 
446
+ #: ../templates/options-template.php:390
447
  msgid "[Normal, Hover, X]"
448
  msgstr "[Normal, Hover, X]"
449
 
450
+ #: ../templates/options-template.php:395
451
  msgid "CSS"
452
  msgstr "CSS"
453
 
454
+ #: ../templates/options-template.php:411
455
  msgid "Plugin Ideas"
456
  msgstr "Plugin Ideas"
457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  #~ msgid "Animate Display"
459
  #~ msgstr "Animate Display"
460
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === WPFront Notification Bar ===
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: 3.0
6
  Tested up to: 3.8.1
7
- Stable tag: 1.2.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -25,6 +25,7 @@ Want to display a notification about a promotion or a news? WPFront Notification
25
  * **Colors** are fully **customizable**.
26
  * Display a **Reopen Button**.
27
  * **Select the pages/posts** you want to display the notification.
 
28
 
29
  Visit [WPFront Notification Bar Ideas](http://wpfront.com/notification-bar-plugin-ideas/) page for some useful functionalities.
30
 
@@ -43,11 +44,17 @@ Localization Contributors:
43
  1. Download the .zip package
44
  1. Unzip into the subdirectory 'wpfront-notification-bar' within your local WordPress plugins directory
45
  1. Refresh plugin page and activate plugin
46
- 1. Configure plugin using *settings* link under plugin name or by going to Settings/Notification Bar
47
 
48
  == Frequently Asked Questions ==
49
 
50
- No one has asked anything yet.
 
 
 
 
 
 
51
 
52
  == Screenshots ==
53
 
@@ -58,6 +65,10 @@ No one has asked anything yet.
58
 
59
  == Changelog ==
60
 
 
 
 
 
61
  = 1.2.1 =
62
  * Fixed an issue with mod_security.
63
  * German language added. Thanks to Anders Lind.
@@ -82,6 +93,9 @@ No one has asked anything yet.
82
 
83
  == Upgrade Notice ==
84
 
 
 
 
85
  = 1.2.1 =
86
  * Fixed an issue with mod_security on "cookie" rule.
87
 
1
+ === WPFront Notification Bar ===
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: 3.0
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
25
  * **Colors** are fully **customizable**.
26
  * Display a **Reopen Button**.
27
  * **Select the pages/posts** you want to display the notification.
28
+ * **Select the user roles** you want to display the notification.
29
 
30
  Visit [WPFront Notification Bar Ideas](http://wpfront.com/notification-bar-plugin-ideas/) page for some useful functionalities.
31
 
44
  1. Download the .zip package
45
  1. Unzip into the subdirectory 'wpfront-notification-bar' within your local WordPress plugins directory
46
  1. Refresh plugin page and activate plugin
47
+ 1. Configure plugin using *settings* link under plugin name or by going to WPFront/Notification Bar
48
 
49
  == Frequently Asked Questions ==
50
 
51
+ = I don’t want the plugin to be displayed on “wp-admin”, what should I do? =
52
+
53
+ Notification bar doesn’t display on the wp-admin pages, except on the notification bar settings page. On the settings page it acts as a preview so that you can see the changes you make.
54
+
55
+ = How do I stop the bar from displaying for logged in users? =
56
+
57
+ The new version(1.3) allows you to filter the bar based on user roles. In this case you need to select the “Guest users” option.
58
 
59
  == Screenshots ==
60
 
65
 
66
  == Changelog ==
67
 
68
+ = 1.3 =
69
+ * User roles filter added.
70
+ * New menu structure.
71
+
72
  = 1.2.1 =
73
  * Fixed an issue with mod_security.
74
  * German language added. Thanks to Anders Lind.
93
 
94
  == Upgrade Notice ==
95
 
96
+ = 1.3 =
97
+ * Now you can filter by user roles.
98
+
99
  = 1.2.1 =
100
  * Fixed an issue with mod_security on "cookie" rule.
101
 
templates/options-template.php CHANGED
@@ -29,366 +29,398 @@
29
  */
30
  ?>
31
 
32
- <div class="wrap">
33
- <?php screen_icon(WPFront_Notification_Bar::OPTIONSPAGE_SLUG); ?>
34
- <h2><?php echo $this->__('WPFront Notification Bar Settings'); ?></h2>
35
 
36
- <div id="wpfront-notification-bar-options" class="inside">
37
- <form method="post" action="options.php">
38
- <?php @settings_fields(WPFront_Notification_Bar::OPTIONS_GROUP_NAME); ?>
39
- <?php @do_settings_sections(WPFront_Notification_Bar::OPTIONSPAGE_SLUG); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
- <?php if ((isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true') || (isset($_GET['updated']) && $_GET['updated'] == 'true')) { ?>
42
- <div class="updated">
43
- <p>
44
- <strong><?php echo $this->__('If you have a caching plugin, clear the cache for the new settings to take effect.'); ?></strong>
45
- </p>
46
- </div>
47
- <?php } ?>
48
-
49
- <h3><?php echo $this->__('Display'); ?></h3>
50
- <table class="form-table">
51
- <tr>
52
- <th scope="row">
53
- <?php echo $this->options->enabled_label(); ?>
54
- </th>
55
- <td>
56
- <input type="checkbox" name="<?php echo $this->options->enabled_name(); ?>" <?php echo $this->options->enabled() ? 'checked' : ''; ?> />
57
- </td>
58
- </tr>
59
- <tr>
60
- <th scope="row">
61
- <?php echo $this->options->position_label(); ?>
62
- </th>
63
- <td>
64
- <select name="<?php echo $this->options->position_name(); ?>">
65
- <option value="1" <?php echo $this->options->position() == '1' ? 'selected' : ''; ?>><?php echo $this->__('Top'); ?></option>
66
- <option value="2" <?php echo $this->options->position() == '2' ? 'selected' : ''; ?>><?php echo $this->__('Bottom'); ?></option>
67
- </select>
68
- </td>
69
- </tr>
70
- <tr>
71
- <th scope="row">
72
- <?php echo $this->options->fixed_position_label(); ?>
73
- </th>
74
- <td>
75
- <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>
76
- </td>
77
- </tr>
78
- <tr>
79
- <th scope="row">
80
- <?php echo $this->options->height_label(); ?>
81
- </th>
82
- <td>
83
- <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>
84
- </td>
85
- </tr>
86
- <tr>
87
- <th scope="row">
88
- <?php echo $this->options->position_offset_label(); ?>
89
- </th>
90
- <td>
91
- <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>
92
- </td>
93
- </tr>
94
- <tr>
95
- <th scope="row">
96
- <?php echo $this->options->display_after_label(); ?>
97
- </th>
98
- <td>
99
- <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.'); ?>]</span>
100
- </td>
101
- </tr>
102
- <tr>
103
- <th scope="row">
104
- <?php echo $this->options->animate_delay_label(); ?>
105
- </th>
106
- <td>
107
- <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>
108
- </td>
109
- </tr>
110
- <tr>
111
- <th scope="row">
112
- <?php echo $this->options->close_button_label(); ?>
113
- </th>
114
- <td>
115
- <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>
116
- </td>
117
- </tr>
118
- <tr>
119
- <th scope="row">
120
- <?php echo $this->options->auto_close_after_label(); ?>
121
- </th>
122
- <td>
123
- <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.'); ?>]</span>
124
- </td>
125
- </tr>
126
- <tr>
127
- <th scope="row">
128
- <?php echo $this->options->display_shadow_label(); ?>
129
- </th>
130
- <td>
131
- <input type="checkbox" name="<?php echo $this->options->display_shadow_name(); ?>" <?php echo $this->options->display_shadow() ? 'checked' : ''; ?> />
132
- </td>
133
- </tr>
134
- <tr>
135
- <th scope="row">
136
- <?php echo $this->options->display_open_button_label(); ?>
137
- </th>
138
- <td>
139
- <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>
140
- </td>
141
- </tr>
142
- <tr>
143
- <th scope="row">
144
- <?php echo $this->options->keep_closed_label(); ?>
145
- </th>
146
- <td>
147
- <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>
148
- </td>
149
- </tr>
150
- <tr>
151
- <th scope="row">
152
- <?php echo $this->options->keep_closed_for_label(); ?>
153
- </th>
154
- <td>
155
- <input class="seconds" name="<?php echo $this->options->keep_closed_for_name(); ?>" value="<?php echo $this->options->keep_closed_for(); ?>" />&#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>
156
- </td>
157
- </tr>
158
- </table>
159
 
160
- <h3><?php echo $this->__('Content'); ?></h3>
161
- <table class="form-table">
162
- <tr>
163
- <th scope="row">
164
- <?php echo $this->options->message_label(); ?>
165
- </th>
166
- <td>
167
- <textarea rows="5" cols="75" name="<?php echo $this->options->message_name(); ?>"><?php echo $this->options->message(); ?></textarea>
168
- <br />
169
- <span class="description"><?php echo esc_html($this->__('[HTML tags are allowed. e.g. Add <br /> for break.]')); ?></span>
170
- </td>
171
- </tr>
172
- <tr>
173
- <th scope="row">
174
- <?php echo $this->options->display_button_label(); ?>
175
- </th>
176
- <td>
177
- <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>
178
- </td>
179
- </tr>
180
- <tr>
181
- <th scope="row">
182
- <?php echo $this->options->button_text_label(); ?>
183
- </th>
184
- <td>
185
- <input name="<?php echo $this->options->button_text_name(); ?>" value="<?php echo $this->options->button_text(); ?>" />
186
- </td>
187
- </tr>
188
- <tr>
189
- <th scope="row">
190
- <?php echo $this->options->button_action_label(); ?>
191
- </th>
192
- <td>
193
- <label>
194
- <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="1" <?php echo $this->options->button_action() == 1 ? 'checked' : ''; ?> />
195
- <span><?php echo $this->options->button_action_url_label(); ?></span>
196
- </label>
197
- <input class="URL" name="<?php echo $this->options->button_action_url_name(); ?>" value="<?php echo $this->options->button_action_url(); ?>" />
198
- <br />
199
  <label>
200
- <input type="checkbox" name="<?php echo $this->options->button_action_new_tab_name(); ?>" <?php echo $this->options->button_action_new_tab() ? 'checked' : ''; ?> />
201
- <span><?php echo $this->options->button_action_new_tab_label(); ?></span>
202
  </label>
203
- <br />
204
- <label>
205
- <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="2" <?php echo $this->options->button_action() == 2 ? 'checked' : ''; ?> />
206
- <span><?php echo $this->options->button_action_javascript_label(); ?></span>
207
- </label>
208
- <br />
209
- <textarea rows="5" cols="75" name="<?php echo $this->options->button_action_javascript_name(); ?>"><?php echo $this->options->button_action_javascript(); ?></textarea>
210
- </td>
211
- </tr>
212
- <tr>
213
- <th scope="row">
214
- <?php echo $this->options->button_action_close_bar_label(); ?>
215
- </th>
216
- <td>
217
- <input type="checkbox" name="<?php echo $this->options->button_action_close_bar_name(); ?>" <?php echo $this->options->button_action_close_bar() ? 'checked' : ''; ?> />
218
- </td>
219
- </tr>
220
- </table>
221
-
222
- <h3><?php echo $this->__('Filter'); ?></h3>
223
- <table class="form-table">
224
- <tr>
225
- <th scope="row">
226
- <?php echo $this->options->display_pages_label(); ?>
227
- </th>
228
- <td>
229
- <label>
230
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="1" <?php echo $this->options->display_pages() == 1 ? 'checked' : ''; ?> />
231
- <span><?php echo $this->__('All pages.'); ?></span>
232
- </label>
233
- <br />
234
- <label>
235
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
236
- <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>
237
- </label>
238
- <br />
239
  <label>
240
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
241
- <span><?php echo $this->__('Include in following pages'); ?></span>
242
  </label>
243
- <div class="pages-selection">
244
- <input type="hidden" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
245
- <?php
246
- $objects = $this->get_filter_objects();
247
- foreach ($objects as $key => $value) {
248
- ?>
249
- <div class="page-div">
250
- <input type="checkbox" value="<?php echo $key; ?>" <?php echo strpos($this->options->include_pages(), $key) === FALSE ? '' : 'checked'; ?> />
251
- <span><?php echo $value; ?></span>
252
- </div>
253
- <?php
254
- }
255
- ?>
256
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  <label>
258
- <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="4" <?php echo $this->options->display_pages() == 4 ? 'checked' : ''; ?> />
259
- <span><?php echo $this->__('Exclude in following pages'); ?></span>
260
  </label>
261
- <div class="pages-selection">
262
- <input type="hidden" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
263
- <?php
264
- $objects = $this->get_filter_objects();
265
- foreach ($objects as $key => $value) {
266
- ?>
267
- <div class="page-div">
268
- <input type="checkbox" value="<?php echo $key; ?>" <?php echo strpos($this->options->exclude_pages(), $key) === FALSE ? '' : 'checked'; ?> />
269
- <span><?php echo $value; ?></span>
270
- </div>
271
- <?php
272
- }
273
- ?>
274
- </div>
275
- </td>
276
- </tr>
277
- </table>
278
-
279
- <h3><?php echo $this->__('Color'); ?></h3>
280
- <table class="form-table">
281
- <tr>
282
- <th scope="row">
283
- <?php echo $this->__('Bar Color'); ?>
284
- </th>
285
- <td>
286
- <div class="color-selector-div">
287
- <div class="color-selector" color="<?php echo $this->options->bar_from_color(); ?>"></div>&#160;<span><?php echo $this->options->bar_from_color(); ?></span>
288
- <input type="hidden" name="<?php echo $this->options->bar_from_color_name(); ?>" value="<?php echo $this->options->bar_from_color(); ?>" />
289
- </div>
290
- <div class="color-selector-div">
291
- <div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div>&#160;<span><?php echo $this->options->bar_to_color(); ?></span>
292
- <input type="hidden" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo $this->options->bar_to_color(); ?>" />
293
- </div>
294
- <span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
295
- </td>
296
- </tr>
297
- <tr>
298
- <th scope="row">
299
- <?php echo $this->options->message_color_label(); ?>
300
- </th>
301
- <td>
302
- <div class="color-selector" color="<?php echo $this->options->message_color(); ?>"></div>&#160;<span><?php echo $this->options->message_color(); ?></span>
303
- <input type="hidden" name="<?php echo $this->options->message_color_name(); ?>" value="<?php echo $this->options->message_color(); ?>" />
304
- </td>
305
- </tr>
306
- <tr>
307
- <th scope="row">
308
- <?php echo $this->__('Button Color'); ?>
309
- </th>
310
- <td>
311
- <div class="color-selector-div">
312
- <div class="color-selector" color="<?php echo $this->options->button_from_color(); ?>"></div>&#160;<span><?php echo $this->options->button_from_color(); ?></span>
313
- <input type="hidden" name="<?php echo $this->options->button_from_color_name(); ?>" value="<?php echo $this->options->button_from_color(); ?>" />
314
- </div>
315
- <div class="color-selector-div">
316
- <div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div>&#160;<span><?php echo $this->options->button_to_color(); ?></span>
317
- <input type="hidden" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo $this->options->button_to_color(); ?>" />
318
- </div>
319
- <span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
320
- </td>
321
- </tr>
322
- <tr>
323
- <th scope="row">
324
- <?php echo $this->options->button_text_color_label(); ?>
325
- </th>
326
- <td>
327
- <div class="color-selector" color="<?php echo $this->options->button_text_color(); ?>"></div>&#160;<span><?php echo $this->options->button_text_color(); ?></span>
328
- <input type="hidden" name="<?php echo $this->options->button_text_color_name(); ?>" value="<?php echo $this->options->button_text_color(); ?>" />
329
- </td>
330
- </tr>
331
- <tr>
332
- <th scope="row">
333
- <?php echo $this->options->open_button_color_label(); ?>
334
- </th>
335
- <td>
336
- <div class="color-selector" color="<?php echo $this->options->open_button_color(); ?>"></div>&#160;<span><?php echo $this->options->open_button_color(); ?></span>
337
- <input type="hidden" name="<?php echo $this->options->open_button_color_name(); ?>" value="<?php echo $this->options->open_button_color(); ?>" />
338
- </td>
339
- </tr>
340
- <tr>
341
- <th scope="row">
342
- <?php echo $this->options->close_button_color_label(); ?>
343
- </th>
344
- <td>
345
- <div class="color-selector-div">
346
- <div class="color-selector" color="<?php echo $this->options->close_button_color(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color(); ?></span>
347
- <input type="hidden" name="<?php echo $this->options->close_button_color_name(); ?>" value="<?php echo $this->options->close_button_color(); ?>" />
348
- </div>
349
- <div class="color-selector-div">
350
- <div class="color-selector" color="<?php echo $this->options->close_button_color_hover(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color_hover(); ?></span>
351
- <input type="hidden" name="<?php echo $this->options->close_button_color_hover_name(); ?>" value="<?php echo $this->options->close_button_color_hover(); ?>" />
352
- </div>
353
- <div class="color-selector-div">
354
- <div class="color-selector" color="<?php echo $this->options->close_button_color_x(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color_x(); ?></span>
355
- <input type="hidden" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo $this->options->close_button_color_x(); ?>" />
356
- </div>
357
- <span class="description"><?php echo $this->__('[Normal, Hover, X]'); ?></span>
358
- </td>
359
- </tr>
360
- </table>
361
 
362
- <h3><?php echo $this->__('CSS'); ?></h3>
363
- <table class="form-table">
364
- <tr>
365
- <th scope="row">
366
- <?php echo $this->options->custom_css_label(); ?>
367
- </th>
368
- <td>
369
- <textarea name="<?php echo $this->options->custom_css_name(); ?>" rows="10" cols="75"><?php echo $this->options->custom_css(); ?></textarea>
370
- </td>
371
- </tr>
372
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
 
374
- <?php @$this->submit_button(); ?>
 
 
 
 
 
 
 
 
 
 
375
 
376
- <a href="http://wpfront.com/notification-bar-plugin-ideas/" target="_blank"><?php echo $this->__('Plugin Ideas'); ?></a>
377
- |
378
- <a href="http://wpfront.com/notification-bar-plugin-settings/" target="_blank"><?php echo $this->__('Settings Description'); ?></a>
379
- |
380
- <a href="http://wpfront.com/notification-bar-plugin-faq/" target="_blank"><?php echo $this->__('Plugin FAQ'); ?></a>
381
- |
382
- <a href="http://wpfront.com/contact/" target="_blank"><?php echo $this->__('Feature Request'); ?></a>
383
- |
384
- <a href="http://wpfront.com/contact/" target="_blank"><?php echo $this->__('Report Bug'); ?></a>
385
- |
386
- <a href="http://wordpress.org/support/view/plugin-reviews/wpfront-notification-bar" target="_blank"><?php echo $this->__('Write Review'); ?></a>
387
- |
388
- <a href="mailto:syam@wpfront.com"><?php echo $this->__('Contact Me (syam@wpfront.com)'); ?></a>
389
- </form>
390
- </div>
391
- </div>
392
 
393
  <script type="text/javascript">
394
  (function($) {
@@ -415,11 +447,21 @@
415
 
416
  $('#wpfront-notification-bar-options .pages-selection input[type="checkbox"]').change(function() {
417
  var values = [];
418
- var div = $(this).parent().parent();
419
  div.find('input:checked').each(function(i, e) {
420
  values.push($(e).val());
421
  });
422
  div.children(":first").val(values.join());
423
  });
 
 
 
 
 
 
 
 
 
 
424
  })(jQuery);
425
  </script>
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->height_label(); ?>
66
+ </th>
67
+ <td>
68
+ <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>
69
+ </td>
70
+ </tr>
71
+ <tr>
72
+ <th scope="row">
73
+ <?php echo $this->options->position_offset_label(); ?>
74
+ </th>
75
+ <td>
76
+ <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>
77
+ </td>
78
+ </tr>
79
+ <tr>
80
+ <th scope="row">
81
+ <?php echo $this->options->display_after_label(); ?>
82
+ </th>
83
+ <td>
84
+ <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.'); ?>]</span>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <th scope="row">
89
+ <?php echo $this->options->animate_delay_label(); ?>
90
+ </th>
91
+ <td>
92
+ <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>
93
+ </td>
94
+ </tr>
95
+ <tr>
96
+ <th scope="row">
97
+ <?php echo $this->options->close_button_label(); ?>
98
+ </th>
99
+ <td>
100
+ <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>
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <th scope="row">
105
+ <?php echo $this->options->auto_close_after_label(); ?>
106
+ </th>
107
+ <td>
108
+ <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.'); ?>]</span>
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <th scope="row">
113
+ <?php echo $this->options->display_shadow_label(); ?>
114
+ </th>
115
+ <td>
116
+ <input type="checkbox" name="<?php echo $this->options->display_shadow_name(); ?>" <?php echo $this->options->display_shadow() ? 'checked' : ''; ?> />
117
+ </td>
118
+ </tr>
119
+ <tr>
120
+ <th scope="row">
121
+ <?php echo $this->options->display_open_button_label(); ?>
122
+ </th>
123
+ <td>
124
+ <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>
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <th scope="row">
129
+ <?php echo $this->options->keep_closed_label(); ?>
130
+ </th>
131
+ <td>
132
+ <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>
133
+ </td>
134
+ </tr>
135
+ <tr>
136
+ <th scope="row">
137
+ <?php echo $this->options->keep_closed_for_label(); ?>
138
+ </th>
139
+ <td>
140
+ <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>
141
+ </td>
142
+ </tr>
143
+ </table>
144
 
145
+ <h3><?php echo $this->__('Content'); ?></h3>
146
+ <table class="form-table">
147
+ <tr>
148
+ <th scope="row">
149
+ <?php echo $this->options->message_label(); ?>
150
+ </th>
151
+ <td>
152
+ <textarea rows="5" cols="75" name="<?php echo $this->options->message_name(); ?>"><?php echo $this->options->message(); ?></textarea>
153
+ <br />
154
+ <span class="description"><?php echo esc_html($this->__('[HTML tags are allowed. e.g. Add <br /> for break.]')); ?></span>
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <th scope="row">
159
+ <?php echo $this->options->display_button_label(); ?>
160
+ </th>
161
+ <td>
162
+ <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>
163
+ </td>
164
+ </tr>
165
+ <tr>
166
+ <th scope="row">
167
+ <?php echo $this->options->button_text_label(); ?>
168
+ </th>
169
+ <td>
170
+ <input name="<?php echo $this->options->button_text_name(); ?>" value="<?php echo $this->options->button_text(); ?>" />
171
+ </td>
172
+ </tr>
173
+ <tr>
174
+ <th scope="row">
175
+ <?php echo $this->options->button_action_label(); ?>
176
+ </th>
177
+ <td>
178
+ <label>
179
+ <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="1" <?php echo $this->options->button_action() == 1 ? 'checked' : ''; ?> />
180
+ <span><?php echo $this->options->button_action_url_label(); ?></span>
181
+ </label>
182
+ <input class="URL" name="<?php echo $this->options->button_action_url_name(); ?>" value="<?php echo $this->options->button_action_url(); ?>" />
183
+ <br />
184
+ <label>
185
+ <input type="checkbox" name="<?php echo $this->options->button_action_new_tab_name(); ?>" <?php echo $this->options->button_action_new_tab() ? 'checked' : ''; ?> />
186
+ <span><?php echo $this->options->button_action_new_tab_label(); ?></span>
187
+ </label>
188
+ <br />
189
+ <label>
190
+ <input type="radio" name="<?php echo $this->options->button_action_name(); ?>" value="2" <?php echo $this->options->button_action() == 2 ? 'checked' : ''; ?> />
191
+ <span><?php echo $this->options->button_action_javascript_label(); ?></span>
192
+ </label>
193
+ <br />
194
+ <textarea rows="5" cols="75" name="<?php echo $this->options->button_action_javascript_name(); ?>"><?php echo $this->options->button_action_javascript(); ?></textarea>
195
+ </td>
196
+ </tr>
197
+ <tr>
198
+ <th scope="row">
199
+ <?php echo $this->options->button_action_close_bar_label(); ?>
200
+ </th>
201
+ <td>
202
+ <input type="checkbox" name="<?php echo $this->options->button_action_close_bar_name(); ?>" <?php echo $this->options->button_action_close_bar() ? 'checked' : ''; ?> />
203
+ </td>
204
+ </tr>
205
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
+ <h3><?php echo $this->__('Filter'); ?></h3>
208
+ <table class="form-table">
209
+ <tr>
210
+ <th scope="row">
211
+ <?php echo $this->options->display_pages_label(); ?>
212
+ </th>
213
+ <td>
214
+ <label>
215
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="1" <?php echo $this->options->display_pages() == 1 ? 'checked' : ''; ?> />
216
+ <span><?php echo $this->__('All pages.'); ?></span>
217
+ </label>
218
+ <br />
219
+ <label>
220
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
221
+ <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>
222
+ </label>
223
+ <br />
224
+ <label>
225
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
226
+ <span><?php echo $this->__('Include in following pages'); ?></span>
227
+ </label>
228
+ <div class="pages-selection">
229
+ <input type="hidden" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
230
+ <?php
231
+ $objects = $this->get_filter_objects();
232
+ foreach ($objects as $key => $value) {
233
+ ?>
234
+ <div class="page-div">
 
 
 
 
 
 
 
 
 
 
 
235
  <label>
236
+ <input type="checkbox" value="<?php echo $key; ?>" <?php echo strpos($this->options->include_pages(), $key) === FALSE ? '' : 'checked'; ?> />
237
+ <?php echo $value; ?>
238
  </label>
239
+ </div>
240
+ <?php
241
+ }
242
+ ?>
243
+ </div>
244
+ <label>
245
+ <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="4" <?php echo $this->options->display_pages() == 4 ? 'checked' : ''; ?> />
246
+ <span><?php echo $this->__('Exclude in following pages'); ?></span>
247
+ </label>
248
+ <div class="pages-selection">
249
+ <input type="hidden" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
250
+ <?php
251
+ $objects = $this->get_filter_objects();
252
+ foreach ($objects as $key => $value) {
253
+ ?>
254
+ <div class="page-div">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  <label>
256
+ <input type="checkbox" value="<?php echo $key; ?>" <?php echo strpos($this->options->exclude_pages(), $key) === FALSE ? '' : 'checked'; ?> />
257
+ <?php echo $value; ?>
258
  </label>
259
+ </div>
260
+ <?php
261
+ }
262
+ ?>
263
+ </div>
264
+ </td>
265
+ </tr>
266
+ <tr>
267
+ <th scope="row">
268
+ <?php echo $this->options->display_roles_label(); ?>
269
+ </th>
270
+ <td>
271
+ <label>
272
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="1" <?php echo $this->options->display_roles() == 1 ? 'checked' : ''; ?> />
273
+ <span><?php echo $this->__('All users.'); ?></span>
274
+ </label>
275
+ <br />
276
+ <label>
277
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="2" <?php echo $this->options->display_roles() == 2 ? 'checked' : ''; ?> />
278
+ <span><?php echo $this->__('All logged in users.'); ?></span>
279
+ </label>
280
+ <br />
281
+ <label>
282
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="3" <?php echo $this->options->display_roles() == 3 ? 'checked' : ''; ?> />
283
+ <span><?php echo $this->__('Guest users. [Non-logged in users]'); ?></span>
284
+ </label>
285
+ <br />
286
+ <label>
287
+ <input type="radio" name="<?php echo $this->options->display_roles_name(); ?>" value="4" <?php echo $this->options->display_roles() == 4 ? 'checked' : ''; ?> />
288
+ <span><?php echo $this->__('For following user roles'); ?></span>
289
+ </label>
290
+ <br />
291
+ <div class="roles-selection">
292
+ <input type="hidden" name="<?php echo $this->options->include_roles_name(); ?>" value="<?php echo htmlentities(json_encode($this->options->include_roles())); ?>" />
293
+ <?php
294
+ foreach ($this->get_role_objects() as $key => $value) {
295
+ ?>
296
+ <div class="role-div">
297
  <label>
298
+ <input type="checkbox" value="<?php echo $key; ?>" <?php echo in_array($key, $this->options->include_roles()) === FALSE ? '' : 'checked'; ?> />
299
+ <?php echo $value; ?>
300
  </label>
301
+ </div>
302
+ <?php
303
+ }
304
+ ?>
305
+ <div class="role-div">
306
+ <label>
307
+ <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'; ?> />
308
+ <?php echo $this->__('[No Role]'); ?>
309
+ </label>
310
+ </div>
311
+ <div class="role-div">
312
+ <label>
313
+ <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'; ?> />
314
+ <?php echo $this->__('[Guest]'); ?>
315
+ </label>
316
+ </div>
317
+ </div>
318
+ </td>
319
+ </tr>
320
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
 
322
+ <h3><?php echo $this->__('Color'); ?></h3>
323
+ <table class="form-table">
324
+ <tr>
325
+ <th scope="row">
326
+ <?php echo $this->__('Bar Color'); ?>
327
+ </th>
328
+ <td>
329
+ <div class="color-selector-div">
330
+ <div class="color-selector" color="<?php echo $this->options->bar_from_color(); ?>"></div>&#160;<span><?php echo $this->options->bar_from_color(); ?></span>
331
+ <input type="hidden" name="<?php echo $this->options->bar_from_color_name(); ?>" value="<?php echo $this->options->bar_from_color(); ?>" />
332
+ </div>
333
+ <div class="color-selector-div">
334
+ <div class="color-selector" color="<?php echo $this->options->bar_to_color(); ?>"></div>&#160;<span><?php echo $this->options->bar_to_color(); ?></span>
335
+ <input type="hidden" name="<?php echo $this->options->bar_to_color_name(); ?>" value="<?php echo $this->options->bar_to_color(); ?>" />
336
+ </div>
337
+ <span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
338
+ </td>
339
+ </tr>
340
+ <tr>
341
+ <th scope="row">
342
+ <?php echo $this->options->message_color_label(); ?>
343
+ </th>
344
+ <td>
345
+ <div class="color-selector" color="<?php echo $this->options->message_color(); ?>"></div>&#160;<span><?php echo $this->options->message_color(); ?></span>
346
+ <input type="hidden" name="<?php echo $this->options->message_color_name(); ?>" value="<?php echo $this->options->message_color(); ?>" />
347
+ </td>
348
+ </tr>
349
+ <tr>
350
+ <th scope="row">
351
+ <?php echo $this->__('Button Color'); ?>
352
+ </th>
353
+ <td>
354
+ <div class="color-selector-div">
355
+ <div class="color-selector" color="<?php echo $this->options->button_from_color(); ?>"></div>&#160;<span><?php echo $this->options->button_from_color(); ?></span>
356
+ <input type="hidden" name="<?php echo $this->options->button_from_color_name(); ?>" value="<?php echo $this->options->button_from_color(); ?>" />
357
+ </div>
358
+ <div class="color-selector-div">
359
+ <div class="color-selector" color="<?php echo $this->options->button_to_color(); ?>"></div>&#160;<span><?php echo $this->options->button_to_color(); ?></span>
360
+ <input type="hidden" name="<?php echo $this->options->button_to_color_name(); ?>" value="<?php echo $this->options->button_to_color(); ?>" />
361
+ </div>
362
+ <span class="description"><?php echo $this->__('[Select two different colors to create a gradient.]'); ?></span>
363
+ </td>
364
+ </tr>
365
+ <tr>
366
+ <th scope="row">
367
+ <?php echo $this->options->button_text_color_label(); ?>
368
+ </th>
369
+ <td>
370
+ <div class="color-selector" color="<?php echo $this->options->button_text_color(); ?>"></div>&#160;<span><?php echo $this->options->button_text_color(); ?></span>
371
+ <input type="hidden" name="<?php echo $this->options->button_text_color_name(); ?>" value="<?php echo $this->options->button_text_color(); ?>" />
372
+ </td>
373
+ </tr>
374
+ <tr>
375
+ <th scope="row">
376
+ <?php echo $this->options->open_button_color_label(); ?>
377
+ </th>
378
+ <td>
379
+ <div class="color-selector" color="<?php echo $this->options->open_button_color(); ?>"></div>&#160;<span><?php echo $this->options->open_button_color(); ?></span>
380
+ <input type="hidden" name="<?php echo $this->options->open_button_color_name(); ?>" value="<?php echo $this->options->open_button_color(); ?>" />
381
+ </td>
382
+ </tr>
383
+ <tr>
384
+ <th scope="row">
385
+ <?php echo $this->options->close_button_color_label(); ?>
386
+ </th>
387
+ <td>
388
+ <div class="color-selector-div">
389
+ <div class="color-selector" color="<?php echo $this->options->close_button_color(); ?>"></div>&#160;<span><?php echo $this->options->close_button_color(); ?></span>
390
+ <input type="hidden" name="<?php echo $this->options->close_button_color_name(); ?>" value="<?php echo $this->options->close_button_color(); ?>" />
391
+ </div>
392
+ <div class="color-selector-div">
393
+ <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>
394
+ <input type="hidden" name="<?php echo $this->options->close_button_color_hover_name(); ?>" value="<?php echo $this->options->close_button_color_hover(); ?>" />
395
+ </div>
396
+ <div class="color-selector-div">
397
+ <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>
398
+ <input type="hidden" name="<?php echo $this->options->close_button_color_x_name(); ?>" value="<?php echo $this->options->close_button_color_x(); ?>" />
399
+ </div>
400
+ <span class="description"><?php echo $this->__('[Normal, Hover, X]'); ?></span>
401
+ </td>
402
+ </tr>
403
+ </table>
404
 
405
+ <h3><?php echo $this->__('CSS'); ?></h3>
406
+ <table class="form-table">
407
+ <tr>
408
+ <th scope="row">
409
+ <?php echo $this->options->custom_css_label(); ?>
410
+ </th>
411
+ <td>
412
+ <textarea name="<?php echo $this->options->custom_css_name(); ?>" rows="10" cols="75"><?php echo $this->options->custom_css(); ?></textarea>
413
+ </td>
414
+ </tr>
415
+ </table>
416
 
417
+ <?php
418
+ @$this->options_page_footer('notification-bar-plugin-settings/', 'notification-bar-plugin-faq/', array(array(
419
+ 'href' => 'http://wpfront.com/notification-bar-plugin-ideas/',
420
+ 'target' => '_blank',
421
+ 'text' => $this->__('Plugin Ideas')
422
+ )));
423
+ ?>
 
 
 
 
 
 
 
 
 
424
 
425
  <script type="text/javascript">
426
  (function($) {
447
 
448
  $('#wpfront-notification-bar-options .pages-selection input[type="checkbox"]').change(function() {
449
  var values = [];
450
+ var div = $(this).parent().parent().parent();
451
  div.find('input:checked').each(function(i, e) {
452
  values.push($(e).val());
453
  });
454
  div.children(":first").val(values.join());
455
  });
456
+
457
+ $('#wpfront-notification-bar-options .roles-selection input[type="checkbox"]').change(function() {
458
+ var values = [];
459
+ var div = $(this).parent().parent().parent();
460
+ div.find('input:checked').each(function(i, e) {
461
+ values.push($(e).val());
462
+ });
463
+ div.children(":first").val(JSON.stringify(values));
464
+ });
465
+
466
  })(jQuery);
467
  </script>
wpfront-notification-bar.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WPFront Notification Bar
4
  * Plugin URI: http://wpfront.com/notification-bar-plugin/
5
  * Description: Easily lets you create a bar on top or bottom to display a notification.
6
- * Version: 1.2.1
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3
3
  * Plugin Name: WPFront Notification Bar
4
  * Plugin URI: http://wpfront.com/notification-bar-plugin/
5
  * Description: Easily lets you create a bar on top or bottom to display a notification.
6
+ * Version: 1.3
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3