WP Notification Bars - Version 1.0.3

Version Description

  • Changed admin notices
Download this release

Release Info

Developer MyThemeShop
Plugin Icon 128x128 WP Notification Bars
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

admin/class-wp-notification-bars-admin.php CHANGED
@@ -729,6 +729,43 @@
729
  }
730
  }
731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  /**
733
  * Deactivation notice
734
  *
729
  }
730
  }
731
 
732
+ public function wp_notification_bar_admin_notice() {
733
+ global $current_user ;
734
+ $user_id = $current_user->ID;
735
+ /* Check that the user hasn't already clicked to ignore the message */
736
+ /* Only show the notice 2 days after plugin activation */
737
+ if ( ! get_user_meta($user_id, 'wp_notification_bar_ignore_notice') && time() >= (get_option( 'wp_notification_bar_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
738
+ echo '<div class="updated notice-info wp-notification-bar-notice" id="wpnotificationbar-notice" style="position:relative;">';
739
+ printf(__('<p>Like WP Notification Bar plugin? You will LOVE <a target="_blank" href="https://mythemeshop.com/plugins/wp-notification-bar/?utm_source=WP+Notification+Bars&utm_medium=Notification+Link&utm_content=WP+Notification+Bar+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Notification Bar Pro!</strong></a></p><a class="notice-dismiss" href="%1$s"></a>', $this->plugin_name), '?wp_notification_bar_admin_notice_ignore=0');
740
+ echo "</div>";
741
+ }
742
+ /* Other notice appears right after activating */
743
+ /* And it gets hidden after showing 3 times */
744
+ if ( ! get_user_meta($user_id, 'wp_notification_bar_ignore_notice_2') && get_option('wp_notification_bar_notice_views', 0) < 3 && get_option( 'wp_notification_bar_activated', 0 ) ) {
745
+ $views = get_option('wp_notification_bar_notice_views', 0);
746
+ update_option( 'wp_notification_bar_notice_views', ($views + 1) );
747
+ echo '<div class="updated notice-info wp-notification-bar-notice" id="wpnotificationbar-notice2" style="position:relative;">';
748
+ echo '<p>';
749
+ _e('Thank you for trying WP Notification Bar. We hope you will like it.', $this->plugin_name);
750
+ echo '</p>';
751
+ echo '<a class="notice-dismiss" href="?wp_notification_bar_admin_notice_ignore=0"></a>';
752
+ echo "</div>";
753
+ }
754
+ }
755
+
756
+ public function wp_notification_bar_admin_notice_ignore() {
757
+ global $current_user;
758
+ $user_id = $current_user->ID;
759
+ /* If user clicks to ignore the notice, add that to their user meta */
760
+ if ( isset($_GET['wp_notification_bar_admin_notice_ignore']) ) {
761
+ if ( '0' == $_GET['wp_notification_bar_admin_notice_ignore'] ) {
762
+ add_user_meta($user_id, 'wp_notification_bar_ignore_notice', '1', true);
763
+ } elseif ( '1' == $_GET['wp_notification_bar_admin_notice_ignore'] ) {
764
+ add_user_meta($user_id, 'wp_notification_bar_ignore_notice_2', '1', true);
765
+ }
766
+ }
767
+ }
768
+
769
  /**
770
  * Deactivation notice
771
  *
admin/css/select2.min.css CHANGED
File without changes
admin/css/wp-notification-bars-admin.css CHANGED
File without changes
admin/index.php CHANGED
File without changes
admin/js/select2.full.min.js CHANGED
File without changes
admin/js/wp-notification-bars-admin.js CHANGED
File without changes
includes/class-wp-notification-bars-activator.php CHANGED
File without changes
includes/class-wp-notification-bars-deactivator.php CHANGED
File without changes
includes/class-wp-notification-bars-i18n.php CHANGED
File without changes
includes/class-wp-notification-bars-loader.php CHANGED
File without changes
includes/class-wp-notification-bars-shared.php CHANGED
@@ -1,516 +1,516 @@
1
- <?php
2
-
3
- /**
4
- * The public-facing functionality of the plugin.
5
- *
6
- * @link http://mythemeshop.com
7
- * @since 1.0
8
- *
9
- * @package MTSNBF
10
- * @subpackage MTSNBF/public
11
- */
12
-
13
- /**
14
- * The public-facing functionality of the plugin.
15
- *
16
- * Defines the plugin name, version, and two examples hooks for how to
17
- * enqueue the dashboard-specific stylesheet and JavaScript.
18
- *
19
- * @package MTSNBF
20
- * @subpackage MTSNBF/public
21
- * @author MyThemeShop
22
- */
23
- // If this file is called directly, abort.
24
- if ( ! defined( 'WPINC' ) ) {
25
- die;
26
- }
27
- if( !class_exists( 'MTSNBF_Shared' )) {
28
- class MTSNBF_Shared {
29
-
30
- /**
31
- * The ID of this plugin.
32
- *
33
- * @since 1.0
34
- * @access private
35
- * @var string $plugin_name The ID of this plugin.
36
- */
37
- private $plugin_name;
38
-
39
- /**
40
- * The version of this plugin.
41
- *
42
- * @since 1.0
43
- * @access private
44
- * @var string $version The current version of this plugin.
45
- */
46
- private $version;
47
-
48
- /**
49
- * Notification bar id
50
- *
51
- * @since 1.0
52
- *
53
- * @var boolean
54
- */
55
- private $bar_id = false;
56
-
57
- /**
58
- * Bar settings.
59
- *
60
- * @since 1.0
61
- *
62
- * @var boolean
63
- */
64
- private $bar_data = false;
65
-
66
- /**
67
- * Initialize the class and set its properties.
68
- *
69
- * @since 1.0
70
- * @param string $plugin_name The name of the plugin.
71
- * @param string $version The version of this plugin.
72
- */
73
- public function __construct( $plugin_name, $version ) {
74
-
75
- $this->plugin_name = $plugin_name;
76
- $this->version = $version;
77
-
78
- }
79
-
80
- /**
81
- * Check if Notification Bar should be displayed on front end
82
- *
83
- * @since 1.0
84
- */
85
- public function get_notification_bar_data() {
86
-
87
- if ( is_admin() ) return;
88
-
89
- $bar_id = false;
90
- $bar_data = false;
91
-
92
- if ( is_singular() && in_array( get_post_type(), apply_filters( 'mtsnb_force_bar_post_types', array( 'post', 'page' ) ) ) ) {
93
-
94
- global $post;
95
- $bar = get_post_meta( $post->ID, '_mtsnb_override_bar', true );
96
-
97
- if ( $bar && !empty( $bar ) ) {
98
-
99
- $bar_id = isset( $bar[0] ) ? $bar[0] : false;
100
-
101
- if ( $bar_id && !empty( $bar_id ) ) {
102
-
103
- $meta_values = get_post_meta( $bar_id, '_mtsnb_data', true );
104
-
105
- $this->bar_id = $bar_id;
106
- $this->bar_data = $meta_values;
107
-
108
- return;
109
- }
110
- }
111
- }
112
-
113
- $args = array(
114
- 'post_type' => 'mts_notification_bar',
115
- 'posts_per_page' => -1,
116
- 'post_status' => 'publish',
117
- );
118
-
119
- $all_bars = get_posts( $args );
120
- foreach( $all_bars as $post ) :
121
- setup_postdata( $post );
122
-
123
- $bar_id = $post->ID;
124
- $meta_values = get_post_meta( $bar_id, '_mtsnb_data', true );
125
-
126
- $passed_location_conditions = $this->test_location( $meta_values );
127
- $passed_referrer_conditions = $this->test_referrer( $meta_values );
128
-
129
- if ( $passed_location_conditions && $passed_referrer_conditions ) {
130
-
131
- $this->bar_id = $bar_id;
132
- $this->bar_data = $meta_values;
133
-
134
- break;
135
- }
136
-
137
- endforeach; wp_reset_postdata();
138
- }
139
-
140
- /**
141
- * Register the stylesheets for the public-facing side of the site.
142
- *
143
- * @since 1.0
144
- */
145
- public function enqueue_styles() {
146
-
147
- if ( is_admin() ) {// Needed for Notification Bar preview on admin side
148
-
149
- $screen = get_current_screen();
150
- $screen_id = $screen->id;
151
-
152
- if ( 'mts_notification_bar' === $screen_id ) {
153
-
154
- wp_enqueue_style( $this->plugin_name.'admin', MTSNBF_PLUGIN_URL . 'public/css/wp-notification-bars-public.css', array(), $this->version, 'all' );
155
- }
156
-
157
- } else {
158
-
159
- if ( $this->bar_id && $this->bar_data ) {
160
-
161
- wp_enqueue_style( $this->plugin_name, MTSNBF_PLUGIN_URL . 'public/css/wp-notification-bars-public.css', array(), $this->version, 'all' );
162
- }
163
- }
164
- }
165
-
166
- /**
167
- * Register the stylesheets for the public-facing side of the site.
168
- *
169
- * @since 1.0
170
- */
171
- public function enqueue_scripts() {
172
-
173
- if ( !is_admin() && $this->bar_id && $this->bar_data ) {
174
-
175
- wp_enqueue_script( $this->plugin_name, MTSNBF_PLUGIN_URL . 'public/js/wp-notification-bars-public.js', array( 'jquery' ), $this->version, false );
176
- }
177
- }
178
-
179
- /**
180
- * Display Notification Bar on front end
181
- *
182
- * @since 1.0
183
- */
184
- public function display_bar() {
185
-
186
- if ( $this->bar_id && $this->bar_data ) {
187
-
188
- $this->bar_output( $this->bar_id, $this->bar_data );
189
- }
190
- }
191
-
192
- /**
193
- * Notification bar output.
194
- *
195
- * @since 1.0
196
- */
197
- public function bar_output( $bar_id, $meta_values ) {
198
-
199
- $button_type = $meta_values['button'];
200
- $button_close_icon = '<span>+</span>';
201
- $button_open_icon = '<span>+</span>';
202
-
203
- $style = 'background-color:'.$meta_values['bg_color'].';color:'.$meta_values['txt_color'].';';
204
- $btn_style = 'background-color:'.$meta_values['bg_color'].';color:'.$meta_values['txt_color'].';';
205
-
206
- $shadow = '-webkit-box-shadow: 0 3px 4px rgba(0, 0, 0, 0.05);box-shadow: 0 3px 4px rgba(0, 0, 0, 0.05);';
207
-
208
- $width = ( isset( $meta_values['content_width'] ) && !empty( $meta_values['content_width'] ) ) ? $meta_values['content_width'] : '960';
209
- $width = (int)$width+120;
210
-
211
- $screen_position_class = 'mtsnb-top';
212
- $css_position_class = isset( $meta_values['css_position'] ) ? ' mtsnb-'.$meta_values['css_position'] : ' mtsnb-fixed';
213
- ?>
214
- <div class="mtsnb mtsnb-shown <?php echo $screen_position_class.$css_position_class; ?>" id="mtsnb-<?php echo $bar_id; ?>" data-mtsnb-id="<?php echo $bar_id; ?>" style="<?php echo $style;?>">
215
- <style type="text/css">
216
- .mtsnb { position: <?php echo $meta_values['css_position'];?>; <?php echo $shadow;?>}
217
- .mtsnb .mtsnb-container { width: <?php echo $width;?>px; font-size: <?php echo $meta_values['font_size'];?>px;}
218
- .mtsnb a { color: <?php echo $meta_values['link_color'];?>;}
219
- .mtsnb .mtsnb-button { background-color: <?php echo $meta_values['link_color'];?>;}
220
- </style>
221
- <div class="mtsnb-container-outer">
222
- <div class="mtsnb-container mtsnb-clearfix">
223
- <?php do_action('before_mtsnb_content'); ?>
224
- <?php $this->bar_content( $meta_values ); ?>
225
- <?php do_action('after_mtsnb_content'); ?>
226
- </div>
227
- <?php if ( 'no_button' !== $button_type ) { ?>
228
- <?php if ( 'toggle_button' === $button_type ) {?><a href="#" class="mtsnb-show" style="<?php echo $btn_style; ?>"><?php echo $button_open_icon; ?></a><?php } ?>
229
- <a href="#" class="mtsnb-hide" style="<?php echo $style; ?>"><?php echo $button_close_icon; ?></a>
230
- <?php } ?>
231
- </div>
232
- </div>
233
- <?php
234
- }
235
-
236
- /**
237
- * Notification bar content.
238
- *
239
- * @since 1.0
240
- */
241
- public function bar_content( $options ) {
242
-
243
- // Output
244
- echo '<div class="mtsnb-'.$options['content_type'].'-type mtsnb-content">';
245
-
246
- switch ( $options['content_type'] ) {
247
-
248
- case 'button':
249
-
250
- $text = wp_kses_post( $options['basic_text'] );
251
- $link_text = wp_kses_post( $options['basic_link_text'] );
252
- $link_url = esc_url( $options['basic_link_url'] );
253
- $link_style = $options['basic_link_style'];
254
-
255
- echo '<span class="mtsnb-text">'.$text.'</span><a href="'.$link_url.'" class="mtsnb-'.$link_style.'">'.$link_text.'</a>';
256
-
257
- break;
258
- case 'custom':
259
-
260
- echo '<div class="mtsnb-custom-content">';
261
- echo do_shortcode( html_entity_decode( $options['custom_content'] ) );
262
- echo '</div>';
263
-
264
- break;
265
- }
266
-
267
- echo '</div>';
268
- }
269
-
270
- /**
271
- * Notification bar admin preview.
272
- *
273
- * @since 1.0
274
- */
275
- public function preview_bar() {
276
-
277
- $data = $_POST['form_data'];
278
-
279
- parse_str( $data, $options );
280
-
281
- $id = $options['post_ID'];
282
- $meta_values = $options['mtsnb_fields'];
283
-
284
- // fix slashes
285
- foreach ( $meta_values as $key => $value ) {
286
-
287
- if ( is_string( $value ) ) {
288
-
289
- $meta_values[ $key ] = stripslashes( $value );
290
- }
291
- }
292
-
293
- $this->bar_output( $id, $meta_values );
294
-
295
- die();
296
- }
297
-
298
-
299
- /**
300
- * Tests if bar can be displayed based on referrer settings
301
- *
302
- * @since 1.0
303
- */
304
- public function test_referrer( $meta_values ) {
305
-
306
- $no_condition = (bool) ( empty( $meta_values['conditions']['google']['state'] ) && empty( $meta_values['conditions']['notgoogle']['state'] ) && empty( $meta_values['conditions']['facebook']['state'] ) && empty( $meta_values['conditions']['notfacebook']['state'] ) );
307
-
308
- if ( $no_condition ) return true; // not set, can be displayed
309
-
310
- $referer = $this->get_referrer();
311
-
312
- // Show for google
313
- if ( !empty( $meta_values['conditions']['google']['state'] ) ) {
314
-
315
- if ( !$referer || empty( $referer ) ) return false; // not set, don't display
316
- $is_search_engine = $this->test_searchengine( $referer );
317
-
318
- if ( $is_search_engine ) {
319
-
320
- return true;// referrer is google search engine, display
321
- }
322
-
323
- return false;
324
- }
325
-
326
- // Don't show for google
327
- if ( !empty( $meta_values['conditions']['notgoogle']['state'] ) ) {
328
-
329
- if ( !$referer || empty( $referer ) ) return true; // not set, display
330
- $is_search_engine = $this->test_searchengine( $referer );
331
-
332
- if ( $is_search_engine ) {
333
-
334
- return false;// referrer is google search engine, don't display
335
- }
336
-
337
- return true;
338
- }
339
-
340
- // Show for facebook
341
- if ( !empty( $meta_values['conditions']['facebook']['state'] ) ) {
342
-
343
- if ( !$referer || empty( $referer ) ) return false; // not set, don't display
344
-
345
- if ( false !== strpos( $referer, 'facebook.' ) ) {
346
-
347
- return true;// refetrer is facebook, display
348
- }
349
-
350
- return false;
351
- }
352
-
353
- // Don't show for facebook
354
- if ( !empty( $meta_values['conditions']['notfacebook']['state'] ) ) {
355
-
356
- if ( !$referer || empty( $referer ) ) return true; // not set, display
357
-
358
- if ( false !== strpos( $referer, 'facebook.' ) ) {
359
-
360
- return false;// refetrer is facebook, don't display
361
- }
362
-
363
- return true;
364
- }
365
- }
366
-
367
- /**
368
- * Tests if bar can be displayed based on location settings
369
- *
370
- * @since 1.0
371
- */
372
- public function test_location( $meta_values ) {
373
-
374
- $no_condition = (bool) ( empty( $meta_values['conditions']['location']['state'] ) && empty( $meta_values['conditions']['notlocation']['state'] ) );
375
-
376
- if ( $no_condition ) return true; // not set, can be displayed
377
-
378
- // Enable on locations
379
- if ( !empty( $meta_values['conditions']['location']['state'] ) ) {
380
-
381
- if (
382
- 'page' === get_option('show_on_front') &&
383
- '0' !== get_option('page_for_posts') &&
384
- '0' !== get_option('page_on_front') &&
385
- ( ( is_front_page() && isset( $meta_values['conditions']['location']['home'] ) ) || ( is_home() && isset( $meta_values['conditions']['location']['blog_home'] ) ) )
386
- ) {
387
-
388
- return true;
389
-
390
- } else if ( is_front_page() && isset( $meta_values['conditions']['location']['home'] ) ) {
391
-
392
- return true;
393
-
394
- } else if ( is_single() && isset( $meta_values['conditions']['location']['posts'] ) ) {
395
-
396
- return true;
397
-
398
- } else if ( is_page() && isset( $meta_values['conditions']['location']['pages'] ) ) {
399
-
400
- return true;
401
- }
402
-
403
- return false;
404
- }
405
-
406
- // Disable on locations
407
- if ( !empty( $meta_values['conditions']['notlocation']['state'] ) ) {
408
-
409
- if (
410
- 'page' === get_option('show_on_front') &&
411
- '0' !== get_option('page_for_posts') &&
412
- '0' !== get_option('page_on_front') &&
413
- ( ( is_front_page() && isset( $meta_values['conditions']['notlocation']['home'] ) ) || ( is_home() && isset( $meta_values['conditions']['notlocation']['blog_home'] ) ) )
414
- ) {
415
-
416
- return false;
417
-
418
- } else if ( is_front_page() && isset( $meta_values['conditions']['notlocation']['home'] ) ) {
419
-
420
- return false;
421
-
422
- } else if ( is_single() && isset( $meta_values['conditions']['notlocation']['posts'] ) ) {
423
-
424
- return false;
425
-
426
- } else if ( is_page() && isset( $meta_values['conditions']['notlocation']['pages'] ) ) {
427
-
428
- return false;
429
- }
430
-
431
- return true;
432
- }
433
- }
434
-
435
- /**
436
- * Tests if the current referrer is a search engine.
437
- *
438
- * @since 1.0
439
- */
440
- public function test_searchengine( $referrer ) {
441
- $response = false;
442
-
443
- $patterns = array(
444
- '.google.',
445
- );
446
-
447
- foreach ( $patterns as $url ) {
448
- if ( false !== stripos( $referrer, $url ) ) {
449
- if ( $url == '.google.' ) {
450
- if ( $this->is_googlesearch( $referrer ) ) {
451
- $response = true;
452
- } else {
453
- $response = false;
454
- }
455
- } else {
456
- $response = true;
457
- }
458
- break;
459
- }
460
- }
461
- return $response;
462
- }
463
-
464
- /**
465
- * Checks if the referrer is a google web-source.
466
- *
467
- * @since 1.0
468
- */
469
- public function is_googlesearch( $referrer = '' ) {
470
- $response = true;
471
-
472
- // Get the query strings and check its a web source.
473
- $qs = parse_url( $referrer, PHP_URL_QUERY );
474
- $qget = array();
475
-
476
- foreach ( explode( '&', $qs ) as $keyval ) {
477
- $kv = explode( '=', $keyval );
478
- if ( count( $kv ) == 2 ) {
479
- $qget[ trim( $kv[0] ) ] = trim( $kv[1] );
480
- }
481
- }
482
-
483
- if ( isset( $qget['source'] ) ) {
484
- $response = $qget['source'] == 'web';
485
- }
486
-
487
- return $response;
488
- }
489
-
490
- /**
491
- * Get referrer
492
- *
493
- * @since 1.0
494
- */
495
- public function get_referrer() {
496
-
497
- $referer = wp_unslash( $_SERVER['HTTP_REFERER'] );
498
-
499
- if ( $referer && !empty( $referer ) ) {
500
-
501
- $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );// maybe not needed
502
- setcookie( 'mtsnb_referrer', esc_url( $referer ), 0, COOKIEPATH, COOKIE_DOMAIN, $secure ); // session
503
-
504
- } else {
505
-
506
- if ( isset( $_COOKIE['mtsnb_referrer'] ) ) {
507
-
508
- // Stored referrer url
509
- $referer = $_COOKIE['mtsnb_referrer'];
510
- }
511
- }
512
-
513
- return $referer;
514
- }
515
- }
516
- }
1
+ <?php
2
+
3
+ /**
4
+ * The public-facing functionality of the plugin.
5
+ *
6
+ * @link http://mythemeshop.com
7
+ * @since 1.0
8
+ *
9
+ * @package MTSNBF
10
+ * @subpackage MTSNBF/public
11
+ */
12
+
13
+ /**
14
+ * The public-facing functionality of the plugin.
15
+ *
16
+ * Defines the plugin name, version, and two examples hooks for how to
17
+ * enqueue the dashboard-specific stylesheet and JavaScript.
18
+ *
19
+ * @package MTSNBF
20
+ * @subpackage MTSNBF/public
21
+ * @author MyThemeShop
22
+ */
23
+ // If this file is called directly, abort.
24
+ if ( ! defined( 'WPINC' ) ) {
25
+ die;
26
+ }
27
+ if( !class_exists( 'MTSNBF_Shared' )) {
28
+ class MTSNBF_Shared {
29
+
30
+ /**
31
+ * The ID of this plugin.
32
+ *
33
+ * @since 1.0
34
+ * @access private
35
+ * @var string $plugin_name The ID of this plugin.
36
+ */
37
+ private $plugin_name;
38
+
39
+ /**
40
+ * The version of this plugin.
41
+ *
42
+ * @since 1.0
43
+ * @access private
44
+ * @var string $version The current version of this plugin.
45
+ */
46
+ private $version;
47
+
48
+ /**
49
+ * Notification bar id
50
+ *
51
+ * @since 1.0
52
+ *
53
+ * @var boolean
54
+ */
55
+ private $bar_id = false;
56
+
57
+ /**
58
+ * Bar settings.
59
+ *
60
+ * @since 1.0
61
+ *
62
+ * @var boolean
63
+ */
64
+ private $bar_data = false;
65
+
66
+ /**
67
+ * Initialize the class and set its properties.
68
+ *
69
+ * @since 1.0
70
+ * @param string $plugin_name The name of the plugin.
71
+ * @param string $version The version of this plugin.
72
+ */
73
+ public function __construct( $plugin_name, $version ) {
74
+
75
+ $this->plugin_name = $plugin_name;
76
+ $this->version = $version;
77
+
78
+ }
79
+
80
+ /**
81
+ * Check if Notification Bar should be displayed on front end
82
+ *
83
+ * @since 1.0
84
+ */
85
+ public function get_notification_bar_data() {
86
+
87
+ if ( is_admin() ) return;
88
+
89
+ $bar_id = false;
90
+ $bar_data = false;
91
+
92
+ if ( is_singular() && in_array( get_post_type(), apply_filters( 'mtsnb_force_bar_post_types', array( 'post', 'page' ) ) ) ) {
93
+
94
+ global $post;
95
+ $bar = get_post_meta( $post->ID, '_mtsnb_override_bar', true );
96
+
97
+ if ( $bar && !empty( $bar ) ) {
98
+
99
+ $bar_id = isset( $bar[0] ) ? $bar[0] : false;
100
+
101
+ if ( $bar_id && !empty( $bar_id ) ) {
102
+
103
+ $meta_values = get_post_meta( $bar_id, '_mtsnb_data', true );
104
+
105
+ $this->bar_id = $bar_id;
106
+ $this->bar_data = $meta_values;
107
+
108
+ return;
109
+ }
110
+ }
111
+ }
112
+
113
+ $args = array(
114
+ 'post_type' => 'mts_notification_bar',
115
+ 'posts_per_page' => -1,
116
+ 'post_status' => 'publish',
117
+ );
118
+
119
+ $all_bars = get_posts( $args );
120
+ foreach( $all_bars as $post ) :
121
+ setup_postdata( $post );
122
+
123
+ $bar_id = $post->ID;
124
+ $meta_values = get_post_meta( $bar_id, '_mtsnb_data', true );
125
+
126
+ $passed_location_conditions = $this->test_location( $meta_values );
127
+ $passed_referrer_conditions = $this->test_referrer( $meta_values );
128
+
129
+ if ( $passed_location_conditions && $passed_referrer_conditions ) {
130
+
131
+ $this->bar_id = $bar_id;
132
+ $this->bar_data = $meta_values;
133
+
134
+ break;
135
+ }
136
+
137
+ endforeach; wp_reset_postdata();
138
+ }
139
+
140
+ /**
141
+ * Register the stylesheets for the public-facing side of the site.
142
+ *
143
+ * @since 1.0
144
+ */
145
+ public function enqueue_styles() {
146
+
147
+ if ( is_admin() ) {// Needed for Notification Bar preview on admin side
148
+
149
+ $screen = get_current_screen();
150
+ $screen_id = $screen->id;
151
+
152
+ if ( 'mts_notification_bar' === $screen_id ) {
153
+
154
+ wp_enqueue_style( $this->plugin_name.'admin', MTSNBF_PLUGIN_URL . 'public/css/wp-notification-bars-public.css', array(), $this->version, 'all' );
155
+ }
156
+
157
+ } else {
158
+
159
+ if ( $this->bar_id && $this->bar_data ) {
160
+
161
+ wp_enqueue_style( $this->plugin_name, MTSNBF_PLUGIN_URL . 'public/css/wp-notification-bars-public.css', array(), $this->version, 'all' );
162
+ }
163
+ }
164
+ }
165
+
166
+ /**
167
+ * Register the stylesheets for the public-facing side of the site.
168
+ *
169
+ * @since 1.0
170
+ */
171
+ public function enqueue_scripts() {
172
+
173
+ if ( !is_admin() && $this->bar_id && $this->bar_data ) {
174
+
175
+ wp_enqueue_script( $this->plugin_name, MTSNBF_PLUGIN_URL . 'public/js/wp-notification-bars-public.js', array( 'jquery' ), $this->version, false );
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Display Notification Bar on front end
181
+ *
182
+ * @since 1.0
183
+ */
184
+ public function display_bar() {
185
+
186
+ if ( $this->bar_id && $this->bar_data ) {
187
+
188
+ $this->bar_output( $this->bar_id, $this->bar_data );
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Notification bar output.
194
+ *
195
+ * @since 1.0
196
+ */
197
+ public function bar_output( $bar_id, $meta_values ) {
198
+
199
+ $button_type = $meta_values['button'];
200
+ $button_close_icon = '<span>+</span>';
201
+ $button_open_icon = '<span>+</span>';
202
+
203
+ $style = 'background-color:'.$meta_values['bg_color'].';color:'.$meta_values['txt_color'].';';
204
+ $btn_style = 'background-color:'.$meta_values['bg_color'].';color:'.$meta_values['txt_color'].';';
205
+
206
+ $shadow = '-webkit-box-shadow: 0 3px 4px rgba(0, 0, 0, 0.05);box-shadow: 0 3px 4px rgba(0, 0, 0, 0.05);';
207
+
208
+ $width = ( isset( $meta_values['content_width'] ) && !empty( $meta_values['content_width'] ) ) ? $meta_values['content_width'] : '960';
209
+ $width = (int)$width+120;
210
+
211
+ $screen_position_class = 'mtsnb-top';
212
+ $css_position_class = isset( $meta_values['css_position'] ) ? ' mtsnb-'.$meta_values['css_position'] : ' mtsnb-fixed';
213
+ ?>
214
+ <div class="mtsnb mtsnb-shown <?php echo $screen_position_class.$css_position_class; ?>" id="mtsnb-<?php echo $bar_id; ?>" data-mtsnb-id="<?php echo $bar_id; ?>" style="<?php echo $style;?>">
215
+ <style type="text/css">
216
+ .mtsnb { position: <?php echo $meta_values['css_position'];?>; <?php echo $shadow;?>}
217
+ .mtsnb .mtsnb-container { width: <?php echo $width;?>px; font-size: <?php echo $meta_values['font_size'];?>px;}
218
+ .mtsnb a { color: <?php echo $meta_values['link_color'];?>;}
219
+ .mtsnb .mtsnb-button { background-color: <?php echo $meta_values['link_color'];?>;}
220
+ </style>
221
+ <div class="mtsnb-container-outer">
222
+ <div class="mtsnb-container mtsnb-clearfix">
223
+ <?php do_action('before_mtsnb_content'); ?>
224
+ <?php $this->bar_content( $meta_values ); ?>
225
+ <?php do_action('after_mtsnb_content'); ?>
226
+ </div>
227
+ <?php if ( 'no_button' !== $button_type ) { ?>
228
+ <?php if ( 'toggle_button' === $button_type ) {?><a href="#" class="mtsnb-show" style="<?php echo $btn_style; ?>"><?php echo $button_open_icon; ?></a><?php } ?>
229
+ <a href="#" class="mtsnb-hide" style="<?php echo $style; ?>"><?php echo $button_close_icon; ?></a>
230
+ <?php } ?>
231
+ </div>
232
+ </div>
233
+ <?php
234
+ }
235
+
236
+ /**
237
+ * Notification bar content.
238
+ *
239
+ * @since 1.0
240
+ */
241
+ public function bar_content( $options ) {
242
+
243
+ // Output
244
+ echo '<div class="mtsnb-'.$options['content_type'].'-type mtsnb-content">';
245
+
246
+ switch ( $options['content_type'] ) {
247
+
248
+ case 'button':
249
+
250
+ $text = wp_kses_post( $options['basic_text'] );
251
+ $link_text = wp_kses_post( $options['basic_link_text'] );
252
+ $link_url = esc_url( $options['basic_link_url'] );
253
+ $link_style = $options['basic_link_style'];
254
+
255
+ echo '<span class="mtsnb-text">'.$text.'</span><a href="'.$link_url.'" class="mtsnb-'.$link_style.'">'.$link_text.'</a>';
256
+
257
+ break;
258
+ case 'custom':
259
+
260
+ echo '<div class="mtsnb-custom-content">';
261
+ echo do_shortcode( html_entity_decode( $options['custom_content'] ) );
262
+ echo '</div>';
263
+
264
+ break;
265
+ }
266
+
267
+ echo '</div>';
268
+ }
269
+
270
+ /**
271
+ * Notification bar admin preview.
272
+ *
273
+ * @since 1.0
274
+ */
275
+ public function preview_bar() {
276
+
277
+ $data = $_POST['form_data'];
278
+
279
+ parse_str( $data, $options );
280
+
281
+ $id = $options['post_ID'];
282
+ $meta_values = $options['mtsnb_fields'];
283
+
284
+ // fix slashes
285
+ foreach ( $meta_values as $key => $value ) {
286
+
287
+ if ( is_string( $value ) ) {
288
+
289
+ $meta_values[ $key ] = stripslashes( $value );
290
+ }
291
+ }
292
+
293
+ $this->bar_output( $id, $meta_values );
294
+
295
+ die();
296
+ }
297
+
298
+
299
+ /**
300
+ * Tests if bar can be displayed based on referrer settings
301
+ *
302
+ * @since 1.0
303
+ */
304
+ public function test_referrer( $meta_values ) {
305
+
306
+ $no_condition = (bool) ( empty( $meta_values['conditions']['google']['state'] ) && empty( $meta_values['conditions']['notgoogle']['state'] ) && empty( $meta_values['conditions']['facebook']['state'] ) && empty( $meta_values['conditions']['notfacebook']['state'] ) );
307
+
308
+ if ( $no_condition ) return true; // not set, can be displayed
309
+
310
+ $referer = $this->get_referrer();
311
+
312
+ // Show for google
313
+ if ( !empty( $meta_values['conditions']['google']['state'] ) ) {
314
+
315
+ if ( !$referer || empty( $referer ) ) return false; // not set, don't display
316
+ $is_search_engine = $this->test_searchengine( $referer );
317
+
318
+ if ( $is_search_engine ) {
319
+
320
+ return true;// referrer is google search engine, display
321
+ }
322
+
323
+ return false;
324
+ }
325
+
326
+ // Don't show for google
327
+ if ( !empty( $meta_values['conditions']['notgoogle']['state'] ) ) {
328
+
329
+ if ( !$referer || empty( $referer ) ) return true; // not set, display
330
+ $is_search_engine = $this->test_searchengine( $referer );
331
+
332
+ if ( $is_search_engine ) {
333
+
334
+ return false;// referrer is google search engine, don't display
335
+ }
336
+
337
+ return true;
338
+ }
339
+
340
+ // Show for facebook
341
+ if ( !empty( $meta_values['conditions']['facebook']['state'] ) ) {
342
+
343
+ if ( !$referer || empty( $referer ) ) return false; // not set, don't display
344
+
345
+ if ( false !== strpos( $referer, 'facebook.' ) ) {
346
+
347
+ return true;// refetrer is facebook, display
348
+ }
349
+
350
+ return false;
351
+ }
352
+
353
+ // Don't show for facebook
354
+ if ( !empty( $meta_values['conditions']['notfacebook']['state'] ) ) {
355
+
356
+ if ( !$referer || empty( $referer ) ) return true; // not set, display
357
+
358
+ if ( false !== strpos( $referer, 'facebook.' ) ) {
359
+
360
+ return false;// refetrer is facebook, don't display
361
+ }
362
+
363
+ return true;
364
+ }
365
+ }
366
+
367
+ /**
368
+ * Tests if bar can be displayed based on location settings
369
+ *
370
+ * @since 1.0
371
+ */
372
+ public function test_location( $meta_values ) {
373
+
374
+ $no_condition = (bool) ( empty( $meta_values['conditions']['location']['state'] ) && empty( $meta_values['conditions']['notlocation']['state'] ) );
375
+
376
+ if ( $no_condition ) return true; // not set, can be displayed
377
+
378
+ // Enable on locations
379
+ if ( !empty( $meta_values['conditions']['location']['state'] ) ) {
380
+
381
+ if (
382
+ 'page' === get_option('show_on_front') &&
383
+ '0' !== get_option('page_for_posts') &&
384
+ '0' !== get_option('page_on_front') &&
385
+ ( ( is_front_page() && isset( $meta_values['conditions']['location']['home'] ) ) || ( is_home() && isset( $meta_values['conditions']['location']['blog_home'] ) ) )
386
+ ) {
387
+
388
+ return true;
389
+
390
+ } else if ( is_front_page() && isset( $meta_values['conditions']['location']['home'] ) ) {
391
+
392
+ return true;
393
+
394
+ } else if ( is_single() && isset( $meta_values['conditions']['location']['posts'] ) ) {
395
+
396
+ return true;
397
+
398
+ } else if ( is_page() && isset( $meta_values['conditions']['location']['pages'] ) ) {
399
+
400
+ return true;
401
+ }
402
+
403
+ return false;
404
+ }
405
+
406
+ // Disable on locations
407
+ if ( !empty( $meta_values['conditions']['notlocation']['state'] ) ) {
408
+
409
+ if (
410
+ 'page' === get_option('show_on_front') &&
411
+ '0' !== get_option('page_for_posts') &&
412
+ '0' !== get_option('page_on_front') &&
413
+ ( ( is_front_page() && isset( $meta_values['conditions']['notlocation']['home'] ) ) || ( is_home() && isset( $meta_values['conditions']['notlocation']['blog_home'] ) ) )
414
+ ) {
415
+
416
+ return false;
417
+
418
+ } else if ( is_front_page() && isset( $meta_values['conditions']['notlocation']['home'] ) ) {
419
+
420
+ return false;
421
+
422
+ } else if ( is_single() && isset( $meta_values['conditions']['notlocation']['posts'] ) ) {
423
+
424
+ return false;
425
+
426
+ } else if ( is_page() && isset( $meta_values['conditions']['notlocation']['pages'] ) ) {
427
+
428
+ return false;
429
+ }
430
+
431
+ return true;
432
+ }
433
+ }
434
+
435
+ /**
436
+ * Tests if the current referrer is a search engine.
437
+ *
438
+ * @since 1.0
439
+ */
440
+ public function test_searchengine( $referrer ) {
441
+ $response = false;
442
+
443
+ $patterns = array(
444
+ '.google.',
445
+ );
446
+
447
+ foreach ( $patterns as $url ) {
448
+ if ( false !== stripos( $referrer, $url ) ) {
449
+ if ( $url == '.google.' ) {
450
+ if ( $this->is_googlesearch( $referrer ) ) {
451
+ $response = true;
452
+ } else {
453
+ $response = false;
454
+ }
455
+ } else {
456
+ $response = true;
457
+ }
458
+ break;
459
+ }
460
+ }
461
+ return $response;
462
+ }
463
+
464
+ /**
465
+ * Checks if the referrer is a google web-source.
466
+ *
467
+ * @since 1.0
468
+ */
469
+ public function is_googlesearch( $referrer = '' ) {
470
+ $response = true;
471
+
472
+ // Get the query strings and check its a web source.
473
+ $qs = parse_url( $referrer, PHP_URL_QUERY );
474
+ $qget = array();
475
+
476
+ foreach ( explode( '&', $qs ) as $keyval ) {
477
+ $kv = explode( '=', $keyval );
478
+ if ( count( $kv ) == 2 ) {
479
+ $qget[ trim( $kv[0] ) ] = trim( $kv[1] );
480
+ }
481
+ }
482
+
483
+ if ( isset( $qget['source'] ) ) {
484
+ $response = $qget['source'] == 'web';
485
+ }
486
+
487
+ return $response;
488
+ }
489
+
490
+ /**
491
+ * Get referrer
492
+ *
493
+ * @since 1.0
494
+ */
495
+ public function get_referrer() {
496
+
497
+ $referer = wp_unslash( $_SERVER['HTTP_REFERER'] );
498
+
499
+ if ( $referer && !empty( $referer ) ) {
500
+
501
+ $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );// maybe not needed
502
+ setcookie( 'mtsnb_referrer', esc_url( $referer ), 0, COOKIEPATH, COOKIE_DOMAIN, $secure ); // session
503
+
504
+ } else {
505
+
506
+ if ( isset( $_COOKIE['mtsnb_referrer'] ) ) {
507
+
508
+ // Stored referrer url
509
+ $referer = $_COOKIE['mtsnb_referrer'];
510
+ }
511
+ }
512
+
513
+ return $referer;
514
+ }
515
+ }
516
+ }
includes/class-wp-notification-bars.php CHANGED
@@ -160,6 +160,10 @@ class MTSNBF {
160
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
161
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
162
 
 
 
 
 
163
  // Register our post type
164
  $this->loader->add_action( 'init', $plugin_admin, 'mts_notification_cpt' );
165
 
160
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
161
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
162
 
163
+ /* Display a notice */
164
+ $this->loader->add_action( 'admin_notices', $plugin_admin, 'wp_notification_bar_admin_notice' );
165
+ $this->loader->add_action( 'admin_init', $plugin_admin, 'wp_notification_bar_admin_notice_ignore' );
166
+
167
  // Register our post type
168
  $this->loader->add_action( 'init', $plugin_admin, 'mts_notification_cpt' );
169
 
includes/index.php CHANGED
File without changes
index.php CHANGED
File without changes
languages/wp-notification-bars.mo CHANGED
File without changes
languages/wp-notification-bars.pot CHANGED
@@ -1,349 +1,349 @@
1
- # Copyright (C) 2015 WP Backup
2
- # This file is distributed under the same license as the WP Backup package.
3
- #, fuzzy
4
- msgid ""
5
- msgstr ""
6
- "Project-Id-Version: WP Notification Bars\n"
7
- "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/my-wp-backup\n"
8
- "POT-Creation-Date: 2015-09-17 11:30+0100\n"
9
- "PO-Revision-Date: 2015-09-15 13:28+0530\n"
10
- "Last-Translator: MyThemeShop <support-team@mythemeshop.com>\n"
11
- "Language-Team: MyThemeShop <support-team@mythemeshop.com>\n"
12
- "Language: en\n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "X-Generator: Poedit 1.8.1\n"
17
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
18
- "_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
19
- "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;"
20
- "esc_html_x:1,2c\n"
21
- "X-Poedit-Basepath: ..\n"
22
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
23
- "X-Poedit-SearchPath-0: .\n"
24
- "X-Poedit-SearchPathExcluded-0: vendor\n"
25
-
26
- #: admin/class-wp-notification-bars-admin.php:131
27
- msgid "Enter Notification Bar Title"
28
- msgstr ""
29
-
30
- #: admin/class-wp-notification-bars-admin.php:148
31
- msgctxt "post type general name"
32
- msgid "Notification Bars"
33
- msgstr ""
34
-
35
- #: admin/class-wp-notification-bars-admin.php:149
36
- msgctxt "post type singular name"
37
- msgid "Notification Bar"
38
- msgstr ""
39
-
40
- #: admin/class-wp-notification-bars-admin.php:150
41
- msgctxt "admin menu"
42
- msgid "Notification Bars"
43
- msgstr ""
44
-
45
- #: admin/class-wp-notification-bars-admin.php:151
46
- msgctxt "add new on admin bar"
47
- msgid "Notification Bar"
48
- msgstr ""
49
-
50
- #: admin/class-wp-notification-bars-admin.php:152
51
- msgctxt "notification bar"
52
- msgid "Add New"
53
- msgstr ""
54
-
55
- #: admin/class-wp-notification-bars-admin.php:153
56
- msgid "Add New Notification Bar"
57
- msgstr ""
58
-
59
- #: admin/class-wp-notification-bars-admin.php:154
60
- msgid "New Notification Bar"
61
- msgstr ""
62
-
63
- #: admin/class-wp-notification-bars-admin.php:155
64
- msgid "Edit Notification Bar"
65
- msgstr ""
66
-
67
- #: admin/class-wp-notification-bars-admin.php:156
68
- msgid "View Notification Bar"
69
- msgstr ""
70
-
71
- #: admin/class-wp-notification-bars-admin.php:157
72
- msgid "All Notification Bars"
73
- msgstr ""
74
-
75
- #: admin/class-wp-notification-bars-admin.php:158
76
- msgid "Search Notification Bars"
77
- msgstr ""
78
-
79
- #: admin/class-wp-notification-bars-admin.php:159
80
- msgid "Parent Notification Bars:"
81
- msgstr ""
82
-
83
- #: admin/class-wp-notification-bars-admin.php:160
84
- msgid "No notification bars found."
85
- msgstr ""
86
-
87
- #: admin/class-wp-notification-bars-admin.php:161
88
- msgid "No notification bars found in Trash."
89
- msgstr ""
90
-
91
- #: admin/class-wp-notification-bars-admin.php:200
92
- msgid "Preview Bar"
93
- msgstr ""
94
-
95
- #: admin/class-wp-notification-bars-admin.php:214
96
- msgid "Settings"
97
- msgstr ""
98
-
99
- #: admin/class-wp-notification-bars-admin.php:233
100
- msgid "Hide/Close Button"
101
- msgstr ""
102
-
103
- #: admin/class-wp-notification-bars-admin.php:236
104
- msgid "No Button"
105
- msgstr ""
106
-
107
- #: admin/class-wp-notification-bars-admin.php:237
108
- msgid "Toggle Button"
109
- msgstr ""
110
-
111
- #: admin/class-wp-notification-bars-admin.php:238
112
- msgid "Close Button"
113
- msgstr ""
114
-
115
- #: admin/class-wp-notification-bars-admin.php:245
116
- msgid "Content Width (px)"
117
- msgstr ""
118
-
119
- #: admin/class-wp-notification-bars-admin.php:251
120
- msgid "Notification bar CSS position"
121
- msgstr ""
122
-
123
- #: admin/class-wp-notification-bars-admin.php:254
124
- msgid "Fixed"
125
- msgstr ""
126
-
127
- #: admin/class-wp-notification-bars-admin.php:255
128
- msgid "Absolute"
129
- msgstr ""
130
-
131
- #: admin/class-wp-notification-bars-admin.php:264
132
- msgid "Background Color"
133
- msgstr ""
134
-
135
- #: admin/class-wp-notification-bars-admin.php:270
136
- msgid "Text Color"
137
- msgstr ""
138
-
139
- #: admin/class-wp-notification-bars-admin.php:276
140
- msgid "Link Color/Button Color"
141
- msgstr ""
142
-
143
- #: admin/class-wp-notification-bars-admin.php:282
144
- msgid "Font size (px)"
145
- msgstr ""
146
-
147
- #: admin/class-wp-notification-bars-admin.php:291
148
- msgid "Link Style"
149
- msgstr ""
150
-
151
- #: admin/class-wp-notification-bars-admin.php:294
152
- msgid "Link"
153
- msgstr ""
154
-
155
- #: admin/class-wp-notification-bars-admin.php:295
156
- msgid "Button"
157
- msgstr ""
158
-
159
- #: admin/class-wp-notification-bars-admin.php:301
160
- msgid "Text"
161
- msgstr ""
162
-
163
- #: admin/class-wp-notification-bars-admin.php:307
164
- msgid "Link/Button Text"
165
- msgstr ""
166
-
167
- #: admin/class-wp-notification-bars-admin.php:313
168
- msgid "Link/Button Url"
169
- msgstr ""
170
-
171
- #: admin/class-wp-notification-bars-admin.php:322
172
- msgid "Add custom content, shortcodes allowed"
173
- msgstr ""
174
-
175
- #: admin/class-wp-notification-bars-admin.php:339
176
- msgid "General"
177
- msgstr ""
178
-
179
- #: admin/class-wp-notification-bars-admin.php:344
180
- msgid "Content"
181
- msgstr ""
182
-
183
- #: admin/class-wp-notification-bars-admin.php:349
184
- msgid "Style"
185
- msgstr ""
186
-
187
- #: admin/class-wp-notification-bars-admin.php:354
188
- msgid "Conditions"
189
- msgstr ""
190
-
191
- #: admin/class-wp-notification-bars-admin.php:360
192
- msgid ""
193
- "Select basic settings like close button type and CSS position of the bar."
194
- msgstr ""
195
-
196
- #: admin/class-wp-notification-bars-admin.php:370
197
- msgid ""
198
- "Set up notification bar content. Select content type and fill in the fields."
199
- msgstr ""
200
-
201
- #: admin/class-wp-notification-bars-admin.php:375
202
- msgid "Text and Link/Button"
203
- msgstr ""
204
-
205
- #: admin/class-wp-notification-bars-admin.php:376
206
- msgid "Custom"
207
- msgstr ""
208
-
209
- #: admin/class-wp-notification-bars-admin.php:397
210
- msgid "Change the appearance of the notification bar."
211
- msgstr ""
212
-
213
- #: admin/class-wp-notification-bars-admin.php:407
214
- msgid "Choose when and where to display the notification bar."
215
- msgstr ""
216
-
217
- #: admin/class-wp-notification-bars-admin.php:416
218
- #: admin/class-wp-notification-bars-admin.php:457
219
- msgid "On specific locations"
220
- msgstr ""
221
-
222
- #: admin/class-wp-notification-bars-admin.php:421
223
- #: admin/class-wp-notification-bars-admin.php:495
224
- msgid "Not on specific locations"
225
- msgstr ""
226
-
227
- #: admin/class-wp-notification-bars-admin.php:430
228
- #: admin/class-wp-notification-bars-admin.php:533
229
- msgid "From Google"
230
- msgstr ""
231
-
232
- #: admin/class-wp-notification-bars-admin.php:435
233
- #: admin/class-wp-notification-bars-admin.php:545
234
- msgid "Not from Google"
235
- msgstr ""
236
-
237
- #: admin/class-wp-notification-bars-admin.php:444
238
- #: admin/class-wp-notification-bars-admin.php:557
239
- msgid "From Facebook"
240
- msgstr ""
241
-
242
- #: admin/class-wp-notification-bars-admin.php:449
243
- #: admin/class-wp-notification-bars-admin.php:569
244
- msgid "Not from Facebook"
245
- msgstr ""
246
-
247
- #: admin/class-wp-notification-bars-admin.php:459
248
- msgid "Show Notification Bar on the following locations"
249
- msgstr ""
250
-
251
- #: admin/class-wp-notification-bars-admin.php:468
252
- #: admin/class-wp-notification-bars-admin.php:506
253
- msgid "Homepage."
254
- msgstr ""
255
-
256
- #: admin/class-wp-notification-bars-admin.php:475
257
- #: admin/class-wp-notification-bars-admin.php:513
258
- msgid "Blog Homepage."
259
- msgstr ""
260
-
261
- #: admin/class-wp-notification-bars-admin.php:482
262
- #: admin/class-wp-notification-bars-admin.php:520
263
- msgid "Pages."
264
- msgstr ""
265
-
266
- #: admin/class-wp-notification-bars-admin.php:488
267
- #: admin/class-wp-notification-bars-admin.php:526
268
- msgid "Posts."
269
- msgstr ""
270
-
271
- #: admin/class-wp-notification-bars-admin.php:497
272
- msgid "Hide Notification Bar on the following locations"
273
- msgstr ""
274
-
275
- #: admin/class-wp-notification-bars-admin.php:538
276
- msgid "Show Notification Bar if visitor arrived via Google search engine."
277
- msgstr ""
278
-
279
- #: admin/class-wp-notification-bars-admin.php:550
280
- msgid "Hide Notification Bar if visitor arrived via Google search engine."
281
- msgstr ""
282
-
283
- #: admin/class-wp-notification-bars-admin.php:562
284
- msgid "Show Notification Bar if visitor arrived from Facebook."
285
- msgstr ""
286
-
287
- #: admin/class-wp-notification-bars-admin.php:574
288
- msgid "Hide Notification Bar if visitor arrived from Facebook."
289
- msgstr ""
290
-
291
- #: admin/class-wp-notification-bars-admin.php:735
292
- msgid ""
293
- "Free version of WP Notification Bars plugin disabled. Pro version is active!"
294
- msgstr ""
295
-
296
- #: admin/class-wp-notification-bars-admin.php:759
297
- #: admin/class-wp-notification-bars-admin.php:762
298
- msgid "Notification Bar updated."
299
- msgstr ""
300
-
301
- #: admin/class-wp-notification-bars-admin.php:760
302
- msgid "Custom field updated."
303
- msgstr ""
304
-
305
- #: admin/class-wp-notification-bars-admin.php:761
306
- msgid "Custom field deleted."
307
- msgstr ""
308
-
309
- #: admin/class-wp-notification-bars-admin.php:763
310
- #, php-format
311
- msgid "Notification Bar restored to revision from %s"
312
- msgstr ""
313
-
314
- #: admin/class-wp-notification-bars-admin.php:764
315
- msgid "Notification Bar published."
316
- msgstr ""
317
-
318
- #: admin/class-wp-notification-bars-admin.php:765
319
- msgid "Notification Bar saved."
320
- msgstr ""
321
-
322
- #: admin/class-wp-notification-bars-admin.php:766
323
- msgid "Notification Bar submitted."
324
- msgstr ""
325
-
326
- #: admin/class-wp-notification-bars-admin.php:767
327
- #, php-format
328
- msgid "Notification Bar scheduled for: <strong>%1$s</strong>."
329
- msgstr ""
330
-
331
- #: admin/class-wp-notification-bars-admin.php:767
332
- msgid "M j, Y @ H:i"
333
- msgstr ""
334
-
335
- #: admin/class-wp-notification-bars-admin.php:768
336
- msgid "Notification Bar draft updated."
337
- msgstr ""
338
-
339
- #: admin/class-wp-notification-bars-admin.php:791
340
- msgid "Notification Bar"
341
- msgstr ""
342
-
343
- #: admin/class-wp-notification-bars-admin.php:831
344
- msgid "Select Notification Bar (optional):"
345
- msgstr ""
346
-
347
- #: admin/class-wp-notification-bars-admin.php:835
348
- msgid "Selected notification bar will override any other bar."
349
- msgstr ""
1
+ # Copyright (C) 2015 WP Backup
2
+ # This file is distributed under the same license as the WP Backup package.
3
+ #, fuzzy
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: WP Notification Bars\n"
7
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/my-wp-backup\n"
8
+ "POT-Creation-Date: 2015-09-17 11:30+0100\n"
9
+ "PO-Revision-Date: 2015-09-15 13:28+0530\n"
10
+ "Last-Translator: MyThemeShop <support-team@mythemeshop.com>\n"
11
+ "Language-Team: MyThemeShop <support-team@mythemeshop.com>\n"
12
+ "Language: en\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.8.1\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
18
+ "_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
19
+ "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;"
20
+ "esc_html_x:1,2c\n"
21
+ "X-Poedit-Basepath: ..\n"
22
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+ "X-Poedit-SearchPathExcluded-0: vendor\n"
25
+
26
+ #: admin/class-wp-notification-bars-admin.php:131
27
+ msgid "Enter Notification Bar Title"
28
+ msgstr ""
29
+
30
+ #: admin/class-wp-notification-bars-admin.php:148
31
+ msgctxt "post type general name"
32
+ msgid "Notification Bars"
33
+ msgstr ""
34
+
35
+ #: admin/class-wp-notification-bars-admin.php:149
36
+ msgctxt "post type singular name"
37
+ msgid "Notification Bar"
38
+ msgstr ""
39
+
40
+ #: admin/class-wp-notification-bars-admin.php:150
41
+ msgctxt "admin menu"
42
+ msgid "Notification Bars"
43
+ msgstr ""
44
+
45
+ #: admin/class-wp-notification-bars-admin.php:151
46
+ msgctxt "add new on admin bar"
47
+ msgid "Notification Bar"
48
+ msgstr ""
49
+
50
+ #: admin/class-wp-notification-bars-admin.php:152
51
+ msgctxt "notification bar"
52
+ msgid "Add New"
53
+ msgstr ""
54
+
55
+ #: admin/class-wp-notification-bars-admin.php:153
56
+ msgid "Add New Notification Bar"
57
+ msgstr ""
58
+
59
+ #: admin/class-wp-notification-bars-admin.php:154
60
+ msgid "New Notification Bar"
61
+ msgstr ""
62
+
63
+ #: admin/class-wp-notification-bars-admin.php:155
64
+ msgid "Edit Notification Bar"
65
+ msgstr ""
66
+
67
+ #: admin/class-wp-notification-bars-admin.php:156
68
+ msgid "View Notification Bar"
69
+ msgstr ""
70
+
71
+ #: admin/class-wp-notification-bars-admin.php:157
72
+ msgid "All Notification Bars"
73
+ msgstr ""
74
+
75
+ #: admin/class-wp-notification-bars-admin.php:158
76
+ msgid "Search Notification Bars"
77
+ msgstr ""
78
+
79
+ #: admin/class-wp-notification-bars-admin.php:159
80
+ msgid "Parent Notification Bars:"
81
+ msgstr ""
82
+
83
+ #: admin/class-wp-notification-bars-admin.php:160
84
+ msgid "No notification bars found."
85
+ msgstr ""
86
+
87
+ #: admin/class-wp-notification-bars-admin.php:161
88
+ msgid "No notification bars found in Trash."
89
+ msgstr ""
90
+
91
+ #: admin/class-wp-notification-bars-admin.php:200
92
+ msgid "Preview Bar"
93
+ msgstr ""
94
+
95
+ #: admin/class-wp-notification-bars-admin.php:214
96
+ msgid "Settings"
97
+ msgstr ""
98
+
99
+ #: admin/class-wp-notification-bars-admin.php:233
100
+ msgid "Hide/Close Button"
101
+ msgstr ""
102
+
103
+ #: admin/class-wp-notification-bars-admin.php:236
104
+ msgid "No Button"
105
+ msgstr ""
106
+
107
+ #: admin/class-wp-notification-bars-admin.php:237
108
+ msgid "Toggle Button"
109
+ msgstr ""
110
+
111
+ #: admin/class-wp-notification-bars-admin.php:238
112
+ msgid "Close Button"
113
+ msgstr ""
114
+
115
+ #: admin/class-wp-notification-bars-admin.php:245
116
+ msgid "Content Width (px)"
117
+ msgstr ""
118
+
119
+ #: admin/class-wp-notification-bars-admin.php:251
120
+ msgid "Notification bar CSS position"
121
+ msgstr ""
122
+
123
+ #: admin/class-wp-notification-bars-admin.php:254
124
+ msgid "Fixed"
125
+ msgstr ""
126
+
127
+ #: admin/class-wp-notification-bars-admin.php:255
128
+ msgid "Absolute"
129
+ msgstr ""
130
+
131
+ #: admin/class-wp-notification-bars-admin.php:264
132
+ msgid "Background Color"
133
+ msgstr ""
134
+
135
+ #: admin/class-wp-notification-bars-admin.php:270
136
+ msgid "Text Color"
137
+ msgstr ""
138
+
139
+ #: admin/class-wp-notification-bars-admin.php:276
140
+ msgid "Link Color/Button Color"
141
+ msgstr ""
142
+
143
+ #: admin/class-wp-notification-bars-admin.php:282
144
+ msgid "Font size (px)"
145
+ msgstr ""
146
+
147
+ #: admin/class-wp-notification-bars-admin.php:291
148
+ msgid "Link Style"
149
+ msgstr ""
150
+
151
+ #: admin/class-wp-notification-bars-admin.php:294
152
+ msgid "Link"
153
+ msgstr ""
154
+
155
+ #: admin/class-wp-notification-bars-admin.php:295
156
+ msgid "Button"
157
+ msgstr ""
158
+
159
+ #: admin/class-wp-notification-bars-admin.php:301
160
+ msgid "Text"
161
+ msgstr ""
162
+
163
+ #: admin/class-wp-notification-bars-admin.php:307
164
+ msgid "Link/Button Text"
165
+ msgstr ""
166
+
167
+ #: admin/class-wp-notification-bars-admin.php:313
168
+ msgid "Link/Button Url"
169
+ msgstr ""
170
+
171
+ #: admin/class-wp-notification-bars-admin.php:322
172
+ msgid "Add custom content, shortcodes allowed"
173
+ msgstr ""
174
+
175
+ #: admin/class-wp-notification-bars-admin.php:339
176
+ msgid "General"
177
+ msgstr ""
178
+
179
+ #: admin/class-wp-notification-bars-admin.php:344
180
+ msgid "Content"
181
+ msgstr ""
182
+
183
+ #: admin/class-wp-notification-bars-admin.php:349
184
+ msgid "Style"
185
+ msgstr ""
186
+
187
+ #: admin/class-wp-notification-bars-admin.php:354
188
+ msgid "Conditions"
189
+ msgstr ""
190
+
191
+ #: admin/class-wp-notification-bars-admin.php:360
192
+ msgid ""
193
+ "Select basic settings like close button type and CSS position of the bar."
194
+ msgstr ""
195
+
196
+ #: admin/class-wp-notification-bars-admin.php:370
197
+ msgid ""
198
+ "Set up notification bar content. Select content type and fill in the fields."
199
+ msgstr ""
200
+
201
+ #: admin/class-wp-notification-bars-admin.php:375
202
+ msgid "Text and Link/Button"
203
+ msgstr ""
204
+
205
+ #: admin/class-wp-notification-bars-admin.php:376
206
+ msgid "Custom"
207
+ msgstr ""
208
+
209
+ #: admin/class-wp-notification-bars-admin.php:397
210
+ msgid "Change the appearance of the notification bar."
211
+ msgstr ""
212
+
213
+ #: admin/class-wp-notification-bars-admin.php:407
214
+ msgid "Choose when and where to display the notification bar."
215
+ msgstr ""
216
+
217
+ #: admin/class-wp-notification-bars-admin.php:416
218
+ #: admin/class-wp-notification-bars-admin.php:457
219
+ msgid "On specific locations"
220
+ msgstr ""
221
+
222
+ #: admin/class-wp-notification-bars-admin.php:421
223
+ #: admin/class-wp-notification-bars-admin.php:495
224
+ msgid "Not on specific locations"
225
+ msgstr ""
226
+
227
+ #: admin/class-wp-notification-bars-admin.php:430
228
+ #: admin/class-wp-notification-bars-admin.php:533
229
+ msgid "From Google"
230
+ msgstr ""
231
+
232
+ #: admin/class-wp-notification-bars-admin.php:435
233
+ #: admin/class-wp-notification-bars-admin.php:545
234
+ msgid "Not from Google"
235
+ msgstr ""
236
+
237
+ #: admin/class-wp-notification-bars-admin.php:444
238
+ #: admin/class-wp-notification-bars-admin.php:557
239
+ msgid "From Facebook"
240
+ msgstr ""
241
+
242
+ #: admin/class-wp-notification-bars-admin.php:449
243
+ #: admin/class-wp-notification-bars-admin.php:569
244
+ msgid "Not from Facebook"
245
+ msgstr ""
246
+
247
+ #: admin/class-wp-notification-bars-admin.php:459
248
+ msgid "Show Notification Bar on the following locations"
249
+ msgstr ""
250
+
251
+ #: admin/class-wp-notification-bars-admin.php:468
252
+ #: admin/class-wp-notification-bars-admin.php:506
253
+ msgid "Homepage."
254
+ msgstr ""
255
+
256
+ #: admin/class-wp-notification-bars-admin.php:475
257
+ #: admin/class-wp-notification-bars-admin.php:513
258
+ msgid "Blog Homepage."
259
+ msgstr ""
260
+
261
+ #: admin/class-wp-notification-bars-admin.php:482
262
+ #: admin/class-wp-notification-bars-admin.php:520
263
+ msgid "Pages."
264
+ msgstr ""
265
+
266
+ #: admin/class-wp-notification-bars-admin.php:488
267
+ #: admin/class-wp-notification-bars-admin.php:526
268
+ msgid "Posts."
269
+ msgstr ""
270
+
271
+ #: admin/class-wp-notification-bars-admin.php:497
272
+ msgid "Hide Notification Bar on the following locations"
273
+ msgstr ""
274
+
275
+ #: admin/class-wp-notification-bars-admin.php:538
276
+ msgid "Show Notification Bar if visitor arrived via Google search engine."
277
+ msgstr ""
278
+
279
+ #: admin/class-wp-notification-bars-admin.php:550
280
+ msgid "Hide Notification Bar if visitor arrived via Google search engine."
281
+ msgstr ""
282
+
283
+ #: admin/class-wp-notification-bars-admin.php:562
284
+ msgid "Show Notification Bar if visitor arrived from Facebook."
285
+ msgstr ""
286
+
287
+ #: admin/class-wp-notification-bars-admin.php:574
288
+ msgid "Hide Notification Bar if visitor arrived from Facebook."
289
+ msgstr ""
290
+
291
+ #: admin/class-wp-notification-bars-admin.php:735
292
+ msgid ""
293
+ "Free version of WP Notification Bars plugin disabled. Pro version is active!"
294
+ msgstr ""
295
+
296
+ #: admin/class-wp-notification-bars-admin.php:759
297
+ #: admin/class-wp-notification-bars-admin.php:762
298
+ msgid "Notification Bar updated."
299
+ msgstr ""
300
+
301
+ #: admin/class-wp-notification-bars-admin.php:760
302
+ msgid "Custom field updated."
303
+ msgstr ""
304
+
305
+ #: admin/class-wp-notification-bars-admin.php:761
306
+ msgid "Custom field deleted."
307
+ msgstr ""
308
+
309
+ #: admin/class-wp-notification-bars-admin.php:763
310
+ #, php-format
311
+ msgid "Notification Bar restored to revision from %s"
312
+ msgstr ""
313
+
314
+ #: admin/class-wp-notification-bars-admin.php:764
315
+ msgid "Notification Bar published."
316
+ msgstr ""
317
+
318
+ #: admin/class-wp-notification-bars-admin.php:765
319
+ msgid "Notification Bar saved."
320
+ msgstr ""
321
+
322
+ #: admin/class-wp-notification-bars-admin.php:766
323
+ msgid "Notification Bar submitted."
324
+ msgstr ""
325
+
326
+ #: admin/class-wp-notification-bars-admin.php:767
327
+ #, php-format
328
+ msgid "Notification Bar scheduled for: <strong>%1$s</strong>."
329
+ msgstr ""
330
+
331
+ #: admin/class-wp-notification-bars-admin.php:767
332
+ msgid "M j, Y @ H:i"
333
+ msgstr ""
334
+
335
+ #: admin/class-wp-notification-bars-admin.php:768
336
+ msgid "Notification Bar draft updated."
337
+ msgstr ""
338
+
339
+ #: admin/class-wp-notification-bars-admin.php:791
340
+ msgid "Notification Bar"
341
+ msgstr ""
342
+
343
+ #: admin/class-wp-notification-bars-admin.php:831
344
+ msgid "Select Notification Bar (optional):"
345
+ msgstr ""
346
+
347
+ #: admin/class-wp-notification-bars-admin.php:835
348
+ msgid "Selected notification bar will override any other bar."
349
+ msgstr ""
public/class-wp-notification-bars-public.php CHANGED
File without changes
public/css/wp-notification-bars-public.css CHANGED
File without changes
public/index.php CHANGED
File without changes
public/js/wp-notification-bars-public.js CHANGED
File without changes
readme.txt CHANGED
@@ -1,87 +1,91 @@
1
- === WP Notification Bars ===
2
- Contributors: mythemeshop
3
- Creator's website link: http://mythemeshop.com/plugins/wp-notification-bars/
4
- Tags: notification, alert, notification bar, welcome google visitor, welcome facebook visitor, attention bar, floating bar, message, notice, sticky header, offer bar, hello bar
5
- Requires at least: 3.0.1
6
- Tested up to: 4.9.5
7
- Stable tag: 1.0.2
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- Create custom notification and alert bar for marketing promotions, alerts, increasing click throughs to other pages and so much more.
12
-
13
- == Description ==
14
-
15
- WP Notification Bars is a custom notification and alert bar plugin for WordPress which is perfect for marketing promotions, alerts, increasing click throughs to other pages and so much more.
16
-
17
- = Why WP Notification Bars from <a href="http://mythemeshop.com">MyThemeShop</a>: =
18
-
19
- * Easy to Use
20
- * Lightweight
21
- * Create Unlimited Notification Bars
22
- * Responsive
23
- * Unlimited Colors
24
- * Fixed or Absolute Position
25
- * Add CTA Button
26
- * Add Custom Code
27
- * Control Font Size
28
- * Show on HomePage / Posts / Pages
29
- * Show only to Google Visitors
30
- * Show only to Facebook Visitors
31
- * Translation Ready
32
- * 24/7/365 Support
33
-
34
- = Support =
35
-
36
- All support for this plugin is provided through our forums. If you have not registered yet, you can do so here for **FREE** <br>
37
- <a href=“https://mythemeshop.com/#signup”>https://mythemeshop.com/#signup</a>
38
-
39
- If after checking our Free WordPress video tutorials here:<br>
40
- <a href=“https://mythemeshop.com/wordpress-101/”>https://mythemeshop.com/wordpress-101/</a><br>
41
- &<br>
42
- <a href=“https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/“>https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/</a><br>
43
- <br>
44
- you are still stuck, please feel free to open a new thread, and a member of our support team will be happy to help.<br>
45
-
46
- Support link:<br>
47
- <a href=“https://community.mythemeshop.com/forum/11-free-plugin-support/”>https://community.mythemeshop.com/forum/11-free-plugin-support/</a><br>
48
- <br>
49
-
50
- = Feedback =
51
- If you like this plugin, then please leave us a good rating and review.<br> Consider following us on <a rel="author" href="https://plus.google.com/+Mythemeshop/">Google+</a>, <a href="https://twitter.com/MyThemeShopTeam">Twitter</a>, and <a href="https://www.facebook.com/MyThemeShop">Facebook</a>
52
-
53
- == Installation ==
54
-
55
- This section describes how to install the plugin and get it working.
56
-
57
- 1. Upload the `wp-notification-bar` folder to the to the `/wp-content/plugins/` directory
58
- 2. Activate the plugin through the 'Plugins' menu in WordPress
59
- 3. ‘Notification Bars’ Option will be available in Backend
60
- 4. Create new Notification and relax!
61
-
62
- == Frequently Asked Questions ==
63
-
64
- = Plugin is not working =
65
-
66
- Please disable all plugins and check if backup is working properly. Then you can enable all plugins one by one to find out which plugin is conflicting with WP Rating plugin.
67
-
68
- == Screenshots ==
69
-
70
- 1. General Settings
71
- 2. Content Settings
72
- 3. Style Settings
73
- 4. Conditions Settings
74
-
75
- == Changelog ==
76
- = 1.0.2 =
77
- * Minor code improvements
78
- * Checked compatibility with WordPress v4.9.5
79
-
80
- = 1.0.1 =
81
- * Added ability to choose notification bar on single post and page
82
- * Added "Blog Homepage" location if static front page is chosen in Settings->Reading
83
- * Referrer saved in session
84
- * Allowed html in "Text and Link/Button" content type
85
-
86
- = 1.0 =
87
- * Official plugin release.
 
 
 
 
1
+ === WP Notification Bars ===
2
+ Contributors: mythemeshop
3
+ Creator's website link: http://mythemeshop.com/plugins/wp-notification-bars/
4
+ Tags: notification, alert, notification bar, welcome google visitor, welcome facebook visitor, attention bar, floating bar, message, notice, sticky header, offer bar, hello bar
5
+ Requires at least: 3.0.1
6
+ Tested up to: 4.9.5
7
+ Stable tag: 1.0.3
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Create custom notification and alert bar for marketing promotions, alerts, increasing click throughs to other pages and so much more.
12
+
13
+ == Description ==
14
+
15
+ WP Notification Bars is a custom notification and alert bar plugin for WordPress which is perfect for marketing promotions, alerts, increasing click throughs to other pages and so much more.
16
+
17
+ = Why WP Notification Bars from <a href="http://mythemeshop.com">MyThemeShop</a>: =
18
+
19
+ * Easy to Use
20
+ * Lightweight
21
+ * Create Unlimited Notification Bars
22
+ * Responsive
23
+ * Unlimited Colors
24
+ * Fixed or Absolute Position
25
+ * Add CTA Button
26
+ * Add Custom Code
27
+ * Control Font Size
28
+ * Show on HomePage / Posts / Pages
29
+ * Show only to Google Visitors
30
+ * Show only to Facebook Visitors
31
+ * Translation Ready
32
+ * 24/7/365 Support
33
+
34
+ = Support =
35
+
36
+ All support for this plugin is provided through our forums. If you have not registered yet, you can do so here for **FREE** <br>
37
+ <a href=“https://mythemeshop.com/#signup”>https://mythemeshop.com/#signup</a>
38
+
39
+ If after checking our Free WordPress video tutorials here:<br>
40
+ <a href=“https://mythemeshop.com/wordpress-101/”>https://mythemeshop.com/wordpress-101/</a><br>
41
+ &<br>
42
+ <a href=“https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/“>https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/</a><br>
43
+ <br>
44
+ you are still stuck, please feel free to open a new thread, and a member of our support team will be happy to help.<br>
45
+
46
+ Support link:<br>
47
+ <a href=“https://community.mythemeshop.com/forum/11-free-plugin-support/”>https://community.mythemeshop.com/forum/11-free-plugin-support/</a><br>
48
+ <br>
49
+
50
+ = Feedback =
51
+ If you like this plugin, then please leave us a good rating and review.<br> Consider following us on <a rel="author" href="https://plus.google.com/+Mythemeshop/">Google+</a>, <a href="https://twitter.com/MyThemeShopTeam">Twitter</a>, and <a href="https://www.facebook.com/MyThemeShop">Facebook</a>
52
+
53
+ == Installation ==
54
+
55
+ This section describes how to install the plugin and get it working.
56
+
57
+ 1. Upload the `wp-notification-bar` folder to the to the `/wp-content/plugins/` directory
58
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
59
+ 3. ‘Notification Bars’ Option will be available in Backend
60
+ 4. Create new Notification and relax!
61
+
62
+ == Frequently Asked Questions ==
63
+
64
+ = Plugin is not working =
65
+
66
+ Please disable all plugins and check if backup is working properly. Then you can enable all plugins one by one to find out which plugin is conflicting with WP Rating plugin.
67
+
68
+ == Screenshots ==
69
+
70
+ 1. General Settings
71
+ 2. Content Settings
72
+ 3. Style Settings
73
+ 4. Conditions Settings
74
+
75
+ == Changelog ==
76
+
77
+ = 1.0.3 =
78
+ * Changed admin notices
79
+
80
+ = 1.0.2 =
81
+ * Minor code improvements
82
+ * Checked compatibility with WordPress v4.9.5
83
+
84
+ = 1.0.1 =
85
+ * Added ability to choose notification bar on single post and page
86
+ * Added "Blog Homepage" location if static front page is chosen in Settings->Reading
87
+ * Referrer saved in session
88
+ * Allowed html in "Text and Link/Button" content type
89
+
90
+ = 1.0 =
91
+ * Official plugin release.
uninstall.php CHANGED
File without changes
wp-notification-bars.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
2
-
3
  /**
4
  * @wordpress-plugin
5
  * Plugin Name: WP Notification Bars
6
  * Plugin URI: https://mythemeshop.com/plugins/wp-notification-bars/
7
  * Description: WP Notification Bars is a custom notification and alert bar plugin for WordPress which is perfect for marketing promotions, alerts, increasing click throughs to other pages and so much more.
8
- * Version: 1.0.2
9
  * Author: MyThemeShop
10
  * Author URI: https://mythemeshop.com/
11
  * Text Domain: wp-notification-bars
@@ -34,6 +33,7 @@ if ( !defined( 'MTSNBF_PLUGIN_BASE') )
34
  function activate_mts_notification_bar_f() {
35
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-notification-bars-activator.php';
36
  MTSNBF_Activator::activate();
 
37
  }
38
 
39
  /**
1
  <?php
 
2
  /**
3
  * @wordpress-plugin
4
  * Plugin Name: WP Notification Bars
5
  * Plugin URI: https://mythemeshop.com/plugins/wp-notification-bars/
6
  * Description: WP Notification Bars is a custom notification and alert bar plugin for WordPress which is perfect for marketing promotions, alerts, increasing click throughs to other pages and so much more.
7
+ * Version: 1.0.3
8
  * Author: MyThemeShop
9
  * Author URI: https://mythemeshop.com/
10
  * Text Domain: wp-notification-bars
33
  function activate_mts_notification_bar_f() {
34
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-notification-bars-activator.php';
35
  MTSNBF_Activator::activate();
36
+ update_option('wp_notification_bar_activated', time());
37
  }
38
 
39
  /**