Cookie Notice by dFactory - Version 1.2.47

Version Description

  • New: Option to select the privacy policy link position
  • Tweak: Do not relad the page on refuse button click
  • Tweak: Added aria-label attribute to cookie notice container
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Cookie Notice by dFactory
Version 1.2.47
Comparing to
See all releases

Code changes from version 1.2.46 to 1.2.47

Files changed (6) hide show
  1. cookie-notice.php +254 -68
  2. js/admin.js +8 -12
  3. js/front.js +19 -24
  4. js/front.min.js +1 -1
  5. languages/cookie-notice.pot +121 -101
  6. readme.txt +10 -5
cookie-notice.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Cookie Notice
4
  Description: Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law GDPR regulations.
5
- Version: 1.2.46
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
@@ -34,7 +34,7 @@ include_once( plugin_dir_path( __FILE__ ) . 'includes/upgrade.php' );
34
  * Cookie Notice class.
35
  *
36
  * @class Cookie_Notice
37
- * @version 1.2.46
38
  */
39
  class Cookie_Notice {
40
 
@@ -43,52 +43,58 @@ class Cookie_Notice {
43
  */
44
  private $defaults = array(
45
  'general' => array(
46
- 'position' => 'bottom',
47
- 'message_text' => '',
48
- 'css_style' => 'bootstrap',
49
- 'css_class' => 'button',
50
- 'accept_text' => '',
51
- 'refuse_text' => '',
52
- 'refuse_opt' => 'no',
53
- 'refuse_code' => '',
54
- 'refuse_code_head' => '',
55
- 'revoke_cookies' => false,
56
- 'revoke_cookies_opt' => 'automatic',
57
- 'revoke_text' => '',
58
- 'redirection' => false,
59
- 'see_more' => 'no',
60
- 'link_target' => '_blank',
61
- 'time' => 'month',
62
- 'hide_effect' => 'fade',
63
- 'on_scroll' => false,
64
- 'on_scroll_offset' => 100,
 
65
  'colors' => array(
66
- 'text' => '#fff',
67
- 'bar' => '#000'
68
  ),
69
  'see_more_opt' => array(
70
- 'text' => '',
71
- 'link_type' => 'page',
72
- 'id' => 'empty',
73
- 'link' => '',
74
- 'sync' => false
75
  ),
76
- 'script_placement' => 'header',
77
- 'translate' => true,
78
- 'deactivation_delete' => 'no'
 
 
 
79
  ),
80
- 'version' => '1.2.46'
81
  );
82
- private $positions = array();
83
- private $styles = array();
84
- private $choices = array();
85
- private $links = array();
86
- private $link_target = array();
87
- private $colors = array();
88
- private $options = array();
89
- private $effects = array();
90
- private $times = array();
91
- private $script_placements = array();
 
 
92
 
93
  /**
94
  * Constructor.
@@ -106,9 +112,10 @@ class Cookie_Notice {
106
  $this->options['general']['see_more_opt']['sync'] = $this->defaults['general']['see_more_opt']['sync'];
107
 
108
  // actions
109
- add_action( 'init', array( $this, 'register_shortcode' ) );
110
  add_action( 'init', array( $this, 'wpsc_add_cookie' ) );
111
  add_action( 'admin_init', array( $this, 'register_settings' ) );
 
112
  add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
113
  add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
114
  add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
@@ -117,6 +124,7 @@ class Cookie_Notice {
117
  add_action( 'wp_head', array( $this, 'wp_print_header_scripts' ) );
118
  add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
119
  add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
 
120
 
121
  // filters
122
  add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
@@ -152,11 +160,16 @@ class Cookie_Notice {
152
  'custom' => __( 'Custom link', 'cookie-notice' )
153
  );
154
 
155
- $this->link_target = array(
156
  '_blank',
157
  '_self'
158
  );
159
 
 
 
 
 
 
160
  $this->colors = array(
161
  'text' => __( 'Text color', 'cookie-notice' ),
162
  'bar' => __( 'Bar color', 'cookie-notice' ),
@@ -210,6 +223,150 @@ class Cookie_Notice {
210
  }
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  /**
214
  * Add new body classes.
215
  *
@@ -238,9 +395,10 @@ class Cookie_Notice {
238
  *
239
  * @return void
240
  */
241
- public function register_shortcode() {
242
  add_shortcode( 'cookies_accepted', array( $this, 'cookies_accepted_shortcode' ) );
243
  add_shortcode( 'cookies_revoke', array( $this, 'cookies_revoke_shortcode' ) );
 
244
  }
245
 
246
  /**
@@ -291,6 +449,24 @@ class Cookie_Notice {
291
  return '<a href="#" class="cn-revoke-cookie cn-button cn-revoke-inline' . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $args['class'] !== '' ? ' ' . $args['class'] : '' ) . '" title="' . esc_html( $args['title'] ) . '">' . esc_html( $args['title'] ) . '</a>';
292
  }
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  /**
295
  * Register WPML (>= 3.2) strings if needed.
296
  *
@@ -390,7 +566,6 @@ class Cookie_Notice {
390
  add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
391
  add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
392
  add_settings_field( 'cn_see_more', __( 'Privacy policy', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
393
- add_settings_field( 'cn_link_target', __( 'Link target', 'cookie-notice' ), array( $this, 'cn_link_target' ), 'cookie_notice_options', 'cookie_notice_configuration' );
394
  add_settings_field( 'cn_refuse_opt', __( 'Refuse cookies', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
395
  add_settings_field( 'cn_revoke_opt', __( 'Revoke cookies', 'cookie-notice' ), array( $this, 'cn_revoke_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
396
  add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' );
@@ -548,7 +723,6 @@ class Cookie_Notice {
548
  echo '
549
  <fieldset>
550
  <label><input id="cn_see_more" type="checkbox" name="cookie_notice_options[see_more]" value="1" ' . checked( 'yes', $this->options['general']['see_more'], false ) . ' />' . __( 'Enable privacy policy link.', 'cookie-notice' ) . '</label>
551
- <p class="description">' . sprintf( __( 'Need a Cookie Policy? Generate one with <a href="%s" target="_blank" title="iubenda">iubenda</a>.', 'cookie-notice' ), 'http://iubenda.refr.cc/MXRWXMP' ) . '</p>
552
  <div id="cn_see_more_opt"' . ($this->options['general']['see_more'] === 'no' ? ' style="display: none;"' : '') . '>
553
  <input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][text]" value="' . esc_attr( $this->options['general']['see_more_opt']['text'] ) . '" />
554
  <p class="description">' . __( 'The text of the privacy policy button.', 'cookie-notice' ) . '</p>
@@ -592,28 +766,26 @@ class Cookie_Notice {
592
  <input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][link]" value="' . esc_attr( $this->options['general']['see_more_opt']['link'] ) . '" />
593
  <p class="description">' . __( 'Enter the full URL starting with http(s)://', 'cookie-notice' ) . '</p>
594
  </div>
595
- </div>
596
- </fieldset>';
597
- }
 
 
 
598
 
599
- /**
600
- * Link target option.
601
- */
602
- public function cn_link_target() {
603
  echo '
604
- <fieldset>
605
- <div id="cn_link_target">
606
- <select name="cookie_notice_options[link_target]">';
607
 
608
- foreach ( $this->link_target as $target ) {
609
  echo '
610
- <option value="' . $target . '" ' . selected( $target, $this->options['general']['link_target'] ) . '>' . esc_html( $target ) . '</option>';
611
  }
612
 
613
  echo '
614
- </select>
615
- <p class="description">' . __( 'Select the privacy policy link target.', 'cookie-notice' ) . '</p>
616
- </div>
617
  </fieldset>';
618
  }
619
 
@@ -774,9 +946,6 @@ class Cookie_Notice {
774
  * @return array
775
  */
776
  public function validate_options( $input ) {
777
- if ( ! check_admin_referer( 'cookie_notice_options-options') )
778
- return $input;
779
-
780
  if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
781
  return $input;
782
 
@@ -813,7 +982,14 @@ class Cookie_Notice {
813
  $input['css_class'] = sanitize_text_field( isset( $input['css_class'] ) ? $input['css_class'] : $this->defaults['general']['css_class'] );
814
 
815
  // link target
816
- $input['link_target'] = sanitize_text_field( isset( $input['link_target'] ) && in_array( $input['link_target'], array_keys( $this->link_target ) ) ? $input['link_target'] : $this->defaults['general']['link_target'] );
 
 
 
 
 
 
 
817
 
818
  // time
819
  $input['time'] = sanitize_text_field( isset( $input['time'] ) && in_array( $input['time'], array_keys( $this->times ) ) ? $input['time'] : $this->defaults['general']['time'] );
@@ -851,6 +1027,9 @@ class Cookie_Notice {
851
  update_option( 'wp_page_for_privacy_policy', $input['see_more_opt']['id'] );
852
  }
853
 
 
 
 
854
  $input['translate'] = false;
855
 
856
  // WPML >= 3.2
@@ -918,17 +1097,24 @@ class Cookie_Notice {
918
  'see_more' => $this->options['general']['see_more'],
919
  'see_more_opt' => $this->options['general']['see_more_opt'],
920
  'link_target' => $this->options['general']['link_target'],
 
 
921
  ) );
922
 
 
 
 
 
 
923
  $options['css_class'] = esc_attr( $options['css_class'] );
924
 
925
  // message output
926
  $output = '
927
- <div id="cookie-notice" role="banner" class="cn-' . ( $options['position'] ) . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . '" style="color: ' . $options['colors']['text'] . '; background-color: ' . $options['colors']['bar'] . ';">'
928
  . '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>'
929
  . '<a href="#" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['accept_text'] . '</a>'
930
  . ( $options['refuse_opt'] === 'yes' ? '<a href="#" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['refuse_text'] . '</a>' : '' )
931
- . ( $options['see_more'] === 'yes' ? '<a href="' . ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['see_more_opt']['text'] . '</a>' : '' ) . '
932
  </div>
933
  ' . ( $options['refuse_opt'] === 'yes' ? '<div class="cookie-notice-revoke-container"><a href="#" class="cn-revoke-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . esc_html( $options['revoke_text'] ) . '</a></div>' : '' ) . '
934
  </div>';
2
  /*
3
  Plugin Name: Cookie Notice
4
  Description: Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law GDPR regulations.
5
+ Version: 1.2.47
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
34
  * Cookie Notice class.
35
  *
36
  * @class Cookie_Notice
37
+ * @version 1.2.47
38
  */
39
  class Cookie_Notice {
40
 
43
  */
44
  private $defaults = array(
45
  'general' => array(
46
+ 'position' => 'bottom',
47
+ 'message_text' => '',
48
+ 'css_style' => 'bootstrap',
49
+ 'css_class' => 'button',
50
+ 'accept_text' => '',
51
+ 'refuse_text' => '',
52
+ 'refuse_opt' => 'no',
53
+ 'refuse_code' => '',
54
+ 'refuse_code_head' => '',
55
+ 'revoke_cookies' => false,
56
+ 'revoke_cookies_opt' => 'automatic',
57
+ 'revoke_text' => '',
58
+ 'redirection' => false,
59
+ 'see_more' => 'no',
60
+ 'link_target' => '_blank',
61
+ 'link_position' => 'banner',
62
+ 'time' => 'month',
63
+ 'hide_effect' => 'fade',
64
+ 'on_scroll' => false,
65
+ 'on_scroll_offset' => 100,
66
  'colors' => array(
67
+ 'text' => '#fff',
68
+ 'bar' => '#000'
69
  ),
70
  'see_more_opt' => array(
71
+ 'text' => '',
72
+ 'link_type' => 'page',
73
+ 'id' => 'empty',
74
+ 'link' => '',
75
+ 'sync' => false
76
  ),
77
+ 'script_placement' => 'header',
78
+ 'translate' => true,
79
+ 'deactivation_delete' => 'no',
80
+ 'update_version' => 1,
81
+ 'update_notice' => true,
82
+ 'update_delay_date' => 0
83
  ),
84
+ 'version' => '1.2.47'
85
  );
86
+ private $positions = array();
87
+ private $styles = array();
88
+ private $choices = array();
89
+ private $links = array();
90
+ private $link_targets = array();
91
+ private $link_positions = array();
92
+ private $colors = array();
93
+ private $options = array();
94
+ private $effects = array();
95
+ private $times = array();
96
+ private $notices = array();
97
+ private $script_placements = array();
98
 
99
  /**
100
  * Constructor.
112
  $this->options['general']['see_more_opt']['sync'] = $this->defaults['general']['see_more_opt']['sync'];
113
 
114
  // actions
115
+ add_action( 'init', array( $this, 'register_shortcodes' ) );
116
  add_action( 'init', array( $this, 'wpsc_add_cookie' ) );
117
  add_action( 'admin_init', array( $this, 'register_settings' ) );
118
+ add_action( 'admin_init', array( $this, 'update_notice' ) );
119
  add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
120
  add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
121
  add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
124
  add_action( 'wp_head', array( $this, 'wp_print_header_scripts' ) );
125
  add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
126
  add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
127
+ add_action( 'wp_ajax_cn_dismiss_notice', array( $this, 'dismiss_notice' ) );
128
 
129
  // filters
130
  add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
160
  'custom' => __( 'Custom link', 'cookie-notice' )
161
  );
162
 
163
+ $this->link_targets = array(
164
  '_blank',
165
  '_self'
166
  );
167
 
168
+ $this->link_positions = array(
169
+ 'banner' => __( 'Banner', 'cookie-notice' ),
170
+ 'message' => __( 'Message', 'cookie-notice' )
171
+ );
172
+
173
  $this->colors = array(
174
  'text' => __( 'Text color', 'cookie-notice' ),
175
  'bar' => __( 'Bar color', 'cookie-notice' ),
223
  }
224
  }
225
 
226
+ /**
227
+ * Update notice.
228
+ */
229
+ public function update_notice() {
230
+ if ( ! current_user_can( 'install_plugins' ) )
231
+ return;
232
+
233
+ $current_update = 2;
234
+
235
+ // get current time
236
+ $current_time = time();
237
+
238
+ if ( $this->options['general']['update_version'] < $current_update ) {
239
+ // check version, if update version is lower than plugin version, set update notice to true
240
+ $this->options['general'] = array_merge( $this->options['general'], array( 'update_version' => $current_update, 'update_notice' => true ) );
241
+
242
+ update_option( 'cookie_notice_options', $this->options['general'] );
243
+
244
+ // set activation date
245
+ $activation_date = get_option( 'cookie_notice_activation_date' );
246
+ if ( $activation_date === false )
247
+ update_option( 'cookie_notice_activation_date', $current_time );
248
+ }
249
+
250
+ // display current version notice
251
+ if ( $this->options['general']['update_notice'] === true ) {
252
+ // include notice js, only if needed
253
+ add_action( 'admin_print_scripts', array( $this, 'admin_inline_js' ), 999 );
254
+
255
+ // get activation date
256
+ $activation_date = get_option( 'cookie_notice_activation_date' );
257
+
258
+ if ( (int) $this->options['general']['update_delay_date'] === 0 ) {
259
+ if ( $activation_date + 1209600 > $current_time )
260
+ $this->options['general']['update_delay_date'] = $activation_date + 1209600;
261
+ else
262
+ $this->options['general']['update_delay_date'] = $current_time;
263
+
264
+ update_option( 'cookie_notice_options', $this->options['general'] );
265
+ }
266
+
267
+ if ( ( ! empty( $this->options['general']['update_delay_date'] ) ? (int) $this->options['general']['update_delay_date'] : $current_time ) <= $current_time )
268
+ $this->add_notice( sprintf( __( "Hey, you've been using <strong>Cookie Notice</strong> for more than %s.", 'cookie-notice' ), human_time_diff( $activation_date, $current_time ) ) . '<br />' . __( 'Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation.', 'cookie-notice' ) . '<br /><br />' . __( 'Your help is much appreciated. Thank you very much', 'cookie-notice' ) . ' ~ <strong>Bartosz Arendt</strong>, ' . sprintf( __( 'founder of <a href="%s" target="_blank">dFactory</a> plugins.', 'cookie-notice' ), 'https://dfactory.eu/' ) . '<br /><br />' . sprintf( __( '<a href="%s" class="cn-dismissible-notice" target="_blank" rel="noopener">Ok, you deserve it</a><br /><a href="javascript:void(0);" class="cn-dismissible-notice cn-delay-notice" rel="noopener">Nope, maybe later</a><br /><a href="javascript:void(0);" class="cn-dismissible-notice" rel="noopener">I already did</a>', 'cookie-notice' ), 'https://wordpress.org/support/plugin/cookie-notice/reviews/?filter=5#new-post' ), 'notice notice-info is-dismissible cn-notice' );
269
+ }
270
+ }
271
+
272
+ /**
273
+ * Add admin notices.
274
+ *
275
+ * @param string $html
276
+ * @param string $status
277
+ * @param bool $paragraph
278
+ */
279
+ public function add_notice( $html = '', $status = 'error', $paragraph = true ) {
280
+ $this->notices[] = array(
281
+ 'html' => $html,
282
+ 'status' => $status,
283
+ 'paragraph' => $paragraph
284
+ );
285
+
286
+ add_action( 'admin_notices', array( $this, 'display_notice') );
287
+ }
288
+
289
+ /**
290
+ * Print admin notices.
291
+ *
292
+ * @return mixed
293
+ */
294
+ public function display_notice() {
295
+ foreach( $this->notices as $notice ) {
296
+ echo '
297
+ <div class="' . $notice['status'] . '">
298
+ ' . ( $notice['paragraph'] ? '<p>' : '' ) . '
299
+ ' . $notice['html'] . '
300
+ ' . ( $notice['paragraph'] ? '</p>' : '' ) . '
301
+ </div>';
302
+ }
303
+ }
304
+
305
+ /**
306
+ * Print admin scripts.
307
+ *
308
+ * @return mixed
309
+ */
310
+ public function admin_inline_js() {
311
+ if ( ! current_user_can( 'install_plugins' ) )
312
+ return;
313
+ ?>
314
+ <script type="text/javascript">
315
+ ( function ( $ ) {
316
+ $( document ).ready( function () {
317
+ // save dismiss state
318
+ $( '.cn-notice.is-dismissible' ).on( 'click', '.notice-dismiss, .cn-dismissible-notice', function ( e ) {
319
+ var notice_action = 'hide';
320
+
321
+ if ( $( e.currentTarget ).hasClass( 'cn-delay-notice' ) ) {
322
+ notice_action = 'delay'
323
+ }
324
+
325
+ $.post( ajaxurl, {
326
+ action: 'cn_dismiss_notice',
327
+ notice_action: notice_action,
328
+ url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
329
+ nonce: '<?php echo wp_create_nonce( 'cn_dismiss_notice' ); ?>'
330
+ } );
331
+
332
+ $( e.delegateTarget ).slideUp( 'fast' );
333
+ } );
334
+ } );
335
+ } )( jQuery );
336
+ </script>
337
+ <?php
338
+ }
339
+
340
+ /**
341
+ * Dismiss notice.
342
+ */
343
+ public function dismiss_notice() {
344
+ if ( ! current_user_can( 'install_plugins' ) )
345
+ return;
346
+
347
+ if ( wp_verify_nonce( esc_attr( $_REQUEST['nonce'] ), 'cn_dismiss_notice' ) ) {
348
+ $notice_action = empty( $_REQUEST['notice_action'] ) || $_REQUEST['notice_action'] === 'hide' ? 'hide' : esc_attr( $_REQUEST['notice_action'] );
349
+
350
+ switch ( $notice_action ) {
351
+ // delay notice
352
+ case 'delay':
353
+ // set delay period to 1 week from now
354
+ $this->options['general'] = array_merge( $this->options['general'], array( 'update_delay_date' => time() + 1209600 ) );
355
+ update_option( 'cookie_notice_options', $this->options['general'] );
356
+ break;
357
+
358
+ // hide notice
359
+ default:
360
+ $this->options['general'] = array_merge( $this->options['general'], array( 'update_notice' => false ) );
361
+ $this->options['general'] = array_merge( $this->options['general'], array( 'update_delay_date' => 0 ) );
362
+
363
+ update_option( 'cookie_notice_options', $this->options['general'] );
364
+ }
365
+ }
366
+
367
+ exit;
368
+ }
369
+
370
  /**
371
  * Add new body classes.
372
  *
395
  *
396
  * @return void
397
  */
398
+ public function register_shortcodes() {
399
  add_shortcode( 'cookies_accepted', array( $this, 'cookies_accepted_shortcode' ) );
400
  add_shortcode( 'cookies_revoke', array( $this, 'cookies_revoke_shortcode' ) );
401
+ add_shortcode( 'cookies_policy_link', array( $this, 'cookies_policy_link_shortcode' ) );
402
  }
403
 
404
  /**
449
  return '<a href="#" class="cn-revoke-cookie cn-button cn-revoke-inline' . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $args['class'] !== '' ? ' ' . $args['class'] : '' ) . '" title="' . esc_html( $args['title'] ) . '">' . esc_html( $args['title'] ) . '</a>';
450
  }
451
 
452
+ /**
453
+ * Register cookies policy link shortcode.
454
+ *
455
+ * @param array $args
456
+ * @param string $content
457
+ * @return string
458
+ */
459
+ public function cookies_policy_link_shortcode( $args, $content ) {
460
+ // get privacy policy options
461
+ $options = $this->options['general']['see_more_opt'];
462
+
463
+ // active message link position?
464
+ if ( $this->options['general']['see_more'] === 'yes' && $this->options['general']['link_position'] === 'message' )
465
+ return '<a href="' . ( $options['link_type'] === 'custom' ? $options['link'] : get_permalink( $options['id'] ) ) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="cn-privacy-policy-link cn-link">' . esc_html( $options['text'] !== '' ? $options['text'] : '&#x279c;' ) . '</a>';
466
+
467
+ return '';
468
+ }
469
+
470
  /**
471
  * Register WPML (>= 3.2) strings if needed.
472
  *
566
  add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
567
  add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
568
  add_settings_field( 'cn_see_more', __( 'Privacy policy', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
 
569
  add_settings_field( 'cn_refuse_opt', __( 'Refuse cookies', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
570
  add_settings_field( 'cn_revoke_opt', __( 'Revoke cookies', 'cookie-notice' ), array( $this, 'cn_revoke_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
571
  add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' );
723
  echo '
724
  <fieldset>
725
  <label><input id="cn_see_more" type="checkbox" name="cookie_notice_options[see_more]" value="1" ' . checked( 'yes', $this->options['general']['see_more'], false ) . ' />' . __( 'Enable privacy policy link.', 'cookie-notice' ) . '</label>
 
726
  <div id="cn_see_more_opt"' . ($this->options['general']['see_more'] === 'no' ? ' style="display: none;"' : '') . '>
727
  <input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][text]" value="' . esc_attr( $this->options['general']['see_more_opt']['text'] ) . '" />
728
  <p class="description">' . __( 'The text of the privacy policy button.', 'cookie-notice' ) . '</p>
766
  <input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][link]" value="' . esc_attr( $this->options['general']['see_more_opt']['link'] ) . '" />
767
  <p class="description">' . __( 'Enter the full URL starting with http(s)://', 'cookie-notice' ) . '</p>
768
  </div>
769
+ <div id="cn_see_more_link_target">';
770
+
771
+ foreach ( $this->link_targets as $target ) {
772
+ echo '
773
+ <label><input id="cn_see_more_link_target-' . $target . '" type="radio" name="cookie_notice_options[link_target]" value="' . $target . '" ' . checked( $target, $this->options['general']['link_target'], false ) . ' />' . $target . '</label>';
774
+ }
775
 
 
 
 
 
776
  echo '
777
+ <p class="description">' . esc_html__( 'Select the privacy policy link target.', 'cookie-notice' ) . '</p>
778
+ </div>
779
+ <div id="cn_see_more_link_position">';
780
 
781
+ foreach ( $this->link_positions as $position => $label ) {
782
  echo '
783
+ <label><input id="cn_see_more_link_position-' . $position . '" type="radio" name="cookie_notice_options[link_position]" value="' . $position . '" ' . checked( $position, $this->options['general']['link_position'], false ) . ' />' . esc_html( $label ) . '</label>';
784
  }
785
 
786
  echo '
787
+ <p class="description">' . esc_html__( 'Select the privacy policy link position.', 'cookie-notice' ) . '</p>
788
+ </div></div>
 
789
  </fieldset>';
790
  }
791
 
946
  * @return array
947
  */
948
  public function validate_options( $input ) {
 
 
 
949
  if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
950
  return $input;
951
 
982
  $input['css_class'] = sanitize_text_field( isset( $input['css_class'] ) ? $input['css_class'] : $this->defaults['general']['css_class'] );
983
 
984
  // link target
985
+ $input['link_target'] = sanitize_text_field( isset( $input['link_target'] ) && in_array( $input['link_target'], array_keys( $this->link_targets ) ) ? $input['link_target'] : $this->defaults['general']['link_target'] );
986
+
987
+ // link target
988
+ $input['link_position'] = sanitize_text_field( isset( $input['link_position'] ) && in_array( $input['link_position'], array_keys( $this->link_positions ) ) ? $input['link_position'] : $this->defaults['general']['link_position'] );
989
+
990
+ // message link position?
991
+ if ( $input['link_position'] === 'message' && strpos( $input['message_text'], '[cookies_policy_link]' ) === false )
992
+ $input['message_text'] .= ' [cookies_policy_link]';
993
 
994
  // time
995
  $input['time'] = sanitize_text_field( isset( $input['time'] ) && in_array( $input['time'], array_keys( $this->times ) ) ? $input['time'] : $this->defaults['general']['time'] );
1027
  update_option( 'wp_page_for_privacy_policy', $input['see_more_opt']['id'] );
1028
  }
1029
 
1030
+ $input['update_version'] = $this->options['general']['update_version'];
1031
+ $input['update_notice'] = $this->options['general']['update_notice'];
1032
+
1033
  $input['translate'] = false;
1034
 
1035
  // WPML >= 3.2
1097
  'see_more' => $this->options['general']['see_more'],
1098
  'see_more_opt' => $this->options['general']['see_more_opt'],
1099
  'link_target' => $this->options['general']['link_target'],
1100
+ 'link_position' => $this->options['general']['link_position'],
1101
+ 'aria_label' => __( 'Cookie Notice', 'cookie-notice' )
1102
  ) );
1103
 
1104
+ if ( $options['see_more'] === 'yes' && $options['link_position'] === 'message' )
1105
+ $options['message_text'] = nl2br( do_shortcode( esc_html( $options['message_text'] ) ) );
1106
+ else
1107
+ $options['message_text'] = nl2br( esc_html( $options['message_text'] ) );
1108
+
1109
  $options['css_class'] = esc_attr( $options['css_class'] );
1110
 
1111
  // message output
1112
  $output = '
1113
+ <div id="cookie-notice" role="banner" class="cn-' . $options['position'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . '" style="color: ' . $options['colors']['text'] . '; background-color: ' . $options['colors']['bar'] . ';" aria-label="' . $options['aria_label'] . '">'
1114
  . '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>'
1115
  . '<a href="#" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['accept_text'] . '</a>'
1116
  . ( $options['refuse_opt'] === 'yes' ? '<a href="#" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['refuse_text'] . '</a>' : '' )
1117
+ . ( $options['see_more'] === 'yes' && $options['link_position'] === 'banner' ? '<a href="' . ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['see_more_opt']['text'] . '</a>' : '' ) . '
1118
  </div>
1119
  ' . ( $options['refuse_opt'] === 'yes' ? '<div class="cookie-notice-revoke-container"><a href="#" class="cn-revoke-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . esc_html( $options['revoke_text'] ) . '</a></div>' : '' ) . '
1120
  </div>';
js/admin.js CHANGED
@@ -6,38 +6,34 @@
6
 
7
  // refuse option
8
  $( '#cn_refuse_opt' ).change( function () {
9
- if ( $( this ).is( ':checked' ) ) {
10
  $( '#cn_refuse_opt_container' ).slideDown( 'fast' );
11
- } else {
12
  $( '#cn_refuse_opt_container' ).slideUp( 'fast' );
13
- }
14
  } );
15
 
16
  // revoke option
17
  $( '#cn_revoke_cookies' ).change( function () {
18
- if ( $( this ).is( ':checked' ) ) {
19
  $( '#cn_revoke_opt_container' ).slideDown( 'fast' );
20
- } else {
21
  $( '#cn_revoke_opt_container' ).slideUp( 'fast' );
22
- }
23
  } );
24
 
25
  // privacy policy option
26
  $( '#cn_see_more' ).change( function () {
27
- if ( $( this ).is( ':checked' ) ) {
28
  $( '#cn_see_more_opt' ).slideDown( 'fast' );
29
- } else {
30
  $( '#cn_see_more_opt' ).slideUp( 'fast' );
31
- }
32
  } );
33
 
34
  // privacy policy option
35
  $( '#cn_on_scroll' ).change( function () {
36
- if ( $( this ).is( ':checked' ) ) {
37
  $( '#cn_on_scroll_offset' ).slideDown( 'fast' );
38
- } else {
39
  $( '#cn_on_scroll_offset' ).slideUp( 'fast' );
40
- }
41
  } );
42
 
43
  // privacy policy link
6
 
7
  // refuse option
8
  $( '#cn_refuse_opt' ).change( function () {
9
+ if ( $( this ).is( ':checked' ) )
10
  $( '#cn_refuse_opt_container' ).slideDown( 'fast' );
11
+ else
12
  $( '#cn_refuse_opt_container' ).slideUp( 'fast' );
 
13
  } );
14
 
15
  // revoke option
16
  $( '#cn_revoke_cookies' ).change( function () {
17
+ if ( $( this ).is( ':checked' ) )
18
  $( '#cn_revoke_opt_container' ).slideDown( 'fast' );
19
+ else
20
  $( '#cn_revoke_opt_container' ).slideUp( 'fast' );
 
21
  } );
22
 
23
  // privacy policy option
24
  $( '#cn_see_more' ).change( function () {
25
+ if ( $( this ).is( ':checked' ) )
26
  $( '#cn_see_more_opt' ).slideDown( 'fast' );
27
+ else
28
  $( '#cn_see_more_opt' ).slideUp( 'fast' );
 
29
  } );
30
 
31
  // privacy policy option
32
  $( '#cn_on_scroll' ).change( function () {
33
+ if ( $( this ).is( ':checked' ) )
34
  $( '#cn_on_scroll_offset' ).slideDown( 'fast' );
35
+ else
36
  $( '#cn_on_scroll_offset' ).slideUp( 'fast' );
 
37
  } );
38
 
39
  // privacy policy link
js/front.js CHANGED
@@ -32,15 +32,13 @@
32
  // is cookie notice hidden?
33
  if ( ! ( body.hasClass( 'cookies-revoke' ) || body.hasClass( 'cookies-not-set' ) ) ) {
34
  // display automatic revoke button?
35
- if ( cnArgs.revoke_cookies_opt === 'automatic' ) {
36
  notice.showCookieNotice( 3 );
37
- } else {
38
  notice.showCookieNotice( 2 );
39
- }
40
  }
41
- } else {
42
  notice.showCookieNotice( 1 );
43
- }
44
 
45
  // update cookie value
46
  cookie = $.fn.getCookieNotice();
@@ -54,9 +52,8 @@
54
  // cookie is not set
55
  if ( typeof cookie === 'undefined' ) {
56
  // handle on scroll
57
- if ( cnArgs.onScroll === 'yes' ) {
58
  $( window ).on( 'scroll', handleScroll );
59
- }
60
 
61
  notice.showCookieNotice( 0 );
62
 
@@ -64,9 +61,8 @@
64
  // active refuse button?
65
  } else if ( cnArgs.refuse === 'yes' ) {
66
  if ( cnArgs.revoke_cookies === '1' ) {
67
- if ( cnArgs.revoke_cookies_opt === 'automatic' ) {
68
  notice.hideCookieNotice( 1 );
69
- }
70
 
71
  $.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
72
  }
@@ -92,13 +88,13 @@
92
 
93
  // set Cookie Notice
94
  $.fn.setCookieNotice = function ( cookie_value ) {
95
- if ( cnArgs.onScroll === 'yes' ) {
96
  $( window ).off( 'scroll', handleScroll );
97
- }
98
 
99
  var date = new Date(),
100
  later_date = new Date(),
101
- notice = $( '#cookie-notice' );
 
102
 
103
  // set expiry time in seconds
104
  later_date.setTime( parseInt( date.getTime() ) + parseInt( cnArgs.cookieTime ) * 1000 );
@@ -118,16 +114,17 @@
118
  // add body class
119
  $.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie_value === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
120
 
121
- if ( cnArgs.refuse === 'yes' && cnArgs.revoke_cookies === '1' && cnArgs.revoke_cookies_opt === 'automatic' ) {
122
  notice.hideCookieNotice( 2 );
123
- } else {
124
  notice.hideCookieNotice( 0 );
125
- }
126
 
127
- if ( cookie_value && cnArgs.redirection === '1' ) {
 
128
  var url = window.location.protocol + '//',
129
  hostname = window.location.host + '/' + window.location.pathname;
130
 
 
131
  if ( cnArgs.cache === '1' ) {
132
  url = url + hostname.replace( '//', '/' ) + ( window.location.search === '' ? '?' : window.location.search + '&' ) + 'cn-reloaded=1' + window.location.hash;
133
 
@@ -250,23 +247,21 @@
250
 
251
  switch ( type ) {
252
  case 0:
253
- if ( cnArgs.hideEffect === 'fade' ) {
254
  notice.fadeOut( 400 );
255
- } else if ( cnArgs.hideEffect === 'slide' ) {
256
  notice.slideUp( 400 );
257
- } else {
258
  notice.css( { 'visibility': 'hidden' } );
259
- }
260
  break;
261
 
262
  case 1:
263
- if ( cnArgs.hideEffect === 'fade' ) {
264
  notice.find( '.cookie-notice-revoke-container' ).hide().fadeIn( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
265
- } else if ( cnArgs.hideEffect === 'slide' ) {
266
  notice.find( '.cookie-notice-revoke-container' ).hide().slideDown( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
267
- } else {
268
  notice.find( '.cookie-notice-revoke-container' ).css( { 'visibility': 'visible', 'display': 'block' } );
269
- }
270
  break;
271
 
272
  case 2:
32
  // is cookie notice hidden?
33
  if ( ! ( body.hasClass( 'cookies-revoke' ) || body.hasClass( 'cookies-not-set' ) ) ) {
34
  // display automatic revoke button?
35
+ if ( cnArgs.revoke_cookies_opt === 'automatic' )
36
  notice.showCookieNotice( 3 );
37
+ else
38
  notice.showCookieNotice( 2 );
 
39
  }
40
+ } else
41
  notice.showCookieNotice( 1 );
 
42
 
43
  // update cookie value
44
  cookie = $.fn.getCookieNotice();
52
  // cookie is not set
53
  if ( typeof cookie === 'undefined' ) {
54
  // handle on scroll
55
+ if ( cnArgs.onScroll === 'yes' )
56
  $( window ).on( 'scroll', handleScroll );
 
57
 
58
  notice.showCookieNotice( 0 );
59
 
61
  // active refuse button?
62
  } else if ( cnArgs.refuse === 'yes' ) {
63
  if ( cnArgs.revoke_cookies === '1' ) {
64
+ if ( cnArgs.revoke_cookies_opt === 'automatic' )
65
  notice.hideCookieNotice( 1 );
 
66
 
67
  $.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
68
  }
88
 
89
  // set Cookie Notice
90
  $.fn.setCookieNotice = function ( cookie_value ) {
91
+ if ( cnArgs.onScroll === 'yes' )
92
  $( window ).off( 'scroll', handleScroll );
 
93
 
94
  var date = new Date(),
95
  later_date = new Date(),
96
+ notice = $( '#cookie-notice' ),
97
+ cookie_before = $.fn.getCookieNotice();
98
 
99
  // set expiry time in seconds
100
  later_date.setTime( parseInt( date.getTime() ) + parseInt( cnArgs.cookieTime ) * 1000 );
114
  // add body class
115
  $.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie_value === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
116
 
117
+ if ( cnArgs.refuse === 'yes' && cnArgs.revoke_cookies === '1' && cnArgs.revoke_cookies_opt === 'automatic' )
118
  notice.hideCookieNotice( 2 );
119
+ else
120
  notice.hideCookieNotice( 0 );
 
121
 
122
+ // redirect?
123
+ if ( cnArgs.redirection === '1' && ( ( cookie_value === 'true' && typeof cookie_before === 'undefined' ) || ( cookie_value !== cookie_before && typeof cookie_before !== 'undefined' ) ) ) {
124
  var url = window.location.protocol + '//',
125
  hostname = window.location.host + '/' + window.location.pathname;
126
 
127
+ // enabled cache?
128
  if ( cnArgs.cache === '1' ) {
129
  url = url + hostname.replace( '//', '/' ) + ( window.location.search === '' ? '?' : window.location.search + '&' ) + 'cn-reloaded=1' + window.location.hash;
130
 
247
 
248
  switch ( type ) {
249
  case 0:
250
+ if ( cnArgs.hideEffect === 'fade' )
251
  notice.fadeOut( 400 );
252
+ else if ( cnArgs.hideEffect === 'slide' )
253
  notice.slideUp( 400 );
254
+ else
255
  notice.css( { 'visibility': 'hidden' } );
 
256
  break;
257
 
258
  case 1:
259
+ if ( cnArgs.hideEffect === 'fade' )
260
  notice.find( '.cookie-notice-revoke-container' ).hide().fadeIn( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
261
+ else if ( cnArgs.hideEffect === 'slide' )
262
  notice.find( '.cookie-notice-revoke-container' ).hide().slideDown( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
263
+ else
264
  notice.find( '.cookie-notice-revoke-container' ).css( { 'visibility': 'visible', 'display': 'block' } );
 
265
  break;
266
 
267
  case 2:
js/front.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){function d(e){var i=t(this);i.scrollTop()>parseInt(cnArgs.onScrollOffset)&&(i.setCookieNotice("accept"),i.off("scroll",d))}t(document).ready(function(){var s=t("#cookie-notice"),c=t.fn.getCookieNotice();t(document).on("click",".cn-set-cookie",function(e){e.preventDefault(),t(this).setCookieNotice(t(this).data("cookie-set"))}),t(document).on("click",".cn-revoke-cookie",function(e){if(e.preventDefault(),"yes"===cnArgs.refuse){var i=t(this);if("yes"===cnArgs.onScroll&&t(window).on("scroll",d),"1"===cnArgs.revoke_cookies){if(i.hasClass("cn-revoke-inline")){var o=t("body");o.hasClass("cookies-revoke")||o.hasClass("cookies-not-set")||("automatic"===cnArgs.revoke_cookies_opt?s.showCookieNotice(3):s.showCookieNotice(2))}else s.showCookieNotice(1);c=t.fn.getCookieNotice(),t.fn.setCookieNoticeBodyClass("cookies-set cookies-revoke "+("true"===c?"cookies-accepted":"cookies-refused"))}}}),void 0===c?("yes"===cnArgs.onScroll&&t(window).on("scroll",d),s.showCookieNotice(0),t.fn.setCookieNoticeBodyClass("cookies-not-set")):"yes"===cnArgs.refuse?"1"===cnArgs.revoke_cookies&&("automatic"===cnArgs.revoke_cookies_opt&&s.hideCookieNotice(1),t.fn.setCookieNoticeBodyClass("cookies-set "+("true"===c?"cookies-accepted":"cookies-refused"))):t.fn.setCookieNoticeBodyClass("cookies-set "+("true"===c?"cookies-accepted":"cookies-refused"))}),t.fn.setCookieNotice=function(e){"yes"===cnArgs.onScroll&&t(window).off("scroll",d);var i=new Date,o=new Date,s=t("#cookie-notice");if(o.setTime(parseInt(i.getTime())+1e3*parseInt(cnArgs.cookieTime)),e="accept"===e?"true":"false",document.cookie=cnArgs.cookieName+"="+e+";expires="+o.toUTCString()+";"+(void 0!==cnArgs.cookieDomain&&""!==cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(void 0!==cnArgs.cookiePath&&""!==cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":"")+("1"===cnArgs.secure?"secure;":""),t.event.trigger({type:"setCookieNotice",value:e,time:i,expires:o}),t.fn.setCookieNoticeBodyClass("cookies-set "+("true"===e?"cookies-accepted":"cookies-refused")),"yes"===cnArgs.refuse&&"1"===cnArgs.revoke_cookies&&"automatic"===cnArgs.revoke_cookies_opt?s.hideCookieNotice(2):s.hideCookieNotice(0),e&&"1"===cnArgs.redirection){var c=window.location.protocol+"//",n=window.location.host+"/"+window.location.pathname;"1"===cnArgs.cache?(c=c+n.replace("//","/")+(""===window.location.search?"?":window.location.search+"&")+"cn-reloaded=1"+window.location.hash,window.location.href=c):(c=c+n.replace("//","/")+window.location.search+window.location.hash,window.location.reload(!0))}else;},t.fn.setCookieNoticeBodyClass=function(e){t("body").removeClass("cookies-revoke cookies-accepted cookies-refused cookies-set cookies-not-set").addClass(e)},t.fn.getCookieNotice=function(){var e=("; "+document.cookie).split("; cookie_notice_accepted=");return 2===e.length?e.pop().split(";").shift():void 0},t.fn.showCookieNotice=function(e){t.event.trigger({type:"showCookieNotice",value:e,data:cnArgs});var i=this;switch(e){case 0:"fade"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).fadeIn(400):"slide"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).slideDown(400):i.css({visibility:"visible"}).show();break;case 1:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").fadeOut(400,function(){i.css({visibility:"visible",display:"none"}).fadeIn(400)}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").slideUp(400,function(){i.css({visibility:"visible",display:"none"}).slideDown(400)}):i.css({visibility:"visible"}).find(".cookie-notice-revoke-container").hide();break;case 2:"fade"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).fadeIn(400):"slide"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).slideDown(400):i.css({visibility:"visible"});break;case 3:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").fadeOut(400,function(){i.css({visibility:"visible",display:"none"}).fadeIn(400)}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").slideUp(400,function(){i.css({visibility:"visible",display:"none"}).slideDown(400)}):i.css({visibility:"visible"}).find(".cookie-notice-revoke-container").hide()}},t.fn.hideCookieNotice=function(e){t.event.trigger({type:"hideCookieNotice",value:e,data:cnArgs});var i=this,o=this.css("display");switch(e){case 0:"fade"===cnArgs.hideEffect?i.fadeOut(400):"slide"===cnArgs.hideEffect?i.slideUp(400):i.css({visibility:"hidden"});break;case 1:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").hide().fadeIn(400).css({visibility:"visible",display:"block"}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").hide().slideDown(400).css({visibility:"visible",display:"block"}):i.find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"});break;case 2:"fade"===cnArgs.hideEffect?i.fadeOut(400,function(){i.css({visibility:"hidden",display:o}).find(".cookie-notice-revoke-container").hide().fadeIn(400).css({visibility:"visible",display:"block"})}):"slide"===cnArgs.hideEffect?i.slideUp(400,function(){i.css({visibility:"hidden",display:o}).find(".cookie-notice-revoke-container").hide().slideDown(400).css({visibility:"visible",display:"block"})}):i.css({visibility:"hidden"}).find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"})}}}(jQuery);
1
+ !function(d){function a(e){var i=d(this);i.scrollTop()>parseInt(cnArgs.onScrollOffset)&&(i.setCookieNotice("accept"),i.off("scroll",a))}d(document).ready(function(){var s=d("#cookie-notice"),c=d.fn.getCookieNotice();d(document).on("click",".cn-set-cookie",function(e){e.preventDefault(),d(this).setCookieNotice(d(this).data("cookie-set"))}),d(document).on("click",".cn-revoke-cookie",function(e){if(e.preventDefault(),"yes"===cnArgs.refuse){var i=d(this);if("yes"===cnArgs.onScroll&&d(window).on("scroll",a),"1"===cnArgs.revoke_cookies){if(i.hasClass("cn-revoke-inline")){var o=d("body");o.hasClass("cookies-revoke")||o.hasClass("cookies-not-set")||("automatic"===cnArgs.revoke_cookies_opt?s.showCookieNotice(3):s.showCookieNotice(2))}else s.showCookieNotice(1);c=d.fn.getCookieNotice(),d.fn.setCookieNoticeBodyClass("cookies-set cookies-revoke "+("true"===c?"cookies-accepted":"cookies-refused"))}}}),void 0===c?("yes"===cnArgs.onScroll&&d(window).on("scroll",a),s.showCookieNotice(0),d.fn.setCookieNoticeBodyClass("cookies-not-set")):"yes"===cnArgs.refuse?"1"===cnArgs.revoke_cookies&&("automatic"===cnArgs.revoke_cookies_opt&&s.hideCookieNotice(1),d.fn.setCookieNoticeBodyClass("cookies-set "+("true"===c?"cookies-accepted":"cookies-refused"))):d.fn.setCookieNoticeBodyClass("cookies-set "+("true"===c?"cookies-accepted":"cookies-refused"))}),d.fn.setCookieNotice=function(e){"yes"===cnArgs.onScroll&&d(window).off("scroll",a);var i=new Date,o=new Date,s=d("#cookie-notice"),c=d.fn.getCookieNotice();if(o.setTime(parseInt(i.getTime())+1e3*parseInt(cnArgs.cookieTime)),e="accept"===e?"true":"false",document.cookie=cnArgs.cookieName+"="+e+";expires="+o.toUTCString()+";"+(void 0!==cnArgs.cookieDomain&&""!==cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(void 0!==cnArgs.cookiePath&&""!==cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":"")+("1"===cnArgs.secure?"secure;":""),d.event.trigger({type:"setCookieNotice",value:e,time:i,expires:o}),d.fn.setCookieNoticeBodyClass("cookies-set "+("true"===e?"cookies-accepted":"cookies-refused")),"yes"===cnArgs.refuse&&"1"===cnArgs.revoke_cookies&&"automatic"===cnArgs.revoke_cookies_opt?s.hideCookieNotice(2):s.hideCookieNotice(0),"1"===cnArgs.redirection&&("true"===e&&void 0===c||e!==c&&void 0!==c)){var n=window.location.protocol+"//",t=window.location.host+"/"+window.location.pathname;"1"===cnArgs.cache?(n=n+t.replace("//","/")+(""===window.location.search?"?":window.location.search+"&")+"cn-reloaded=1"+window.location.hash,window.location.href=n):(n=n+t.replace("//","/")+window.location.search+window.location.hash,window.location.reload(!0))}else;},d.fn.setCookieNoticeBodyClass=function(e){d("body").removeClass("cookies-revoke cookies-accepted cookies-refused cookies-set cookies-not-set").addClass(e)},d.fn.getCookieNotice=function(){var e=("; "+document.cookie).split("; cookie_notice_accepted=");return 2===e.length?e.pop().split(";").shift():void 0},d.fn.showCookieNotice=function(e){d.event.trigger({type:"showCookieNotice",value:e,data:cnArgs});var i=this;switch(e){case 0:"fade"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).fadeIn(400):"slide"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).slideDown(400):i.css({visibility:"visible"}).show();break;case 1:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").fadeOut(400,function(){i.css({visibility:"visible",display:"none"}).fadeIn(400)}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").slideUp(400,function(){i.css({visibility:"visible",display:"none"}).slideDown(400)}):i.css({visibility:"visible"}).find(".cookie-notice-revoke-container").hide();break;case 2:"fade"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).fadeIn(400):"slide"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).slideDown(400):i.css({visibility:"visible"});break;case 3:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").fadeOut(400,function(){i.css({visibility:"visible",display:"none"}).fadeIn(400)}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").slideUp(400,function(){i.css({visibility:"visible",display:"none"}).slideDown(400)}):i.css({visibility:"visible"}).find(".cookie-notice-revoke-container").hide()}},d.fn.hideCookieNotice=function(e){d.event.trigger({type:"hideCookieNotice",value:e,data:cnArgs});var i=this,o=this.css("display");switch(e){case 0:"fade"===cnArgs.hideEffect?i.fadeOut(400):"slide"===cnArgs.hideEffect?i.slideUp(400):i.css({visibility:"hidden"});break;case 1:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").hide().fadeIn(400).css({visibility:"visible",display:"block"}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").hide().slideDown(400).css({visibility:"visible",display:"block"}):i.find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"});break;case 2:"fade"===cnArgs.hideEffect?i.fadeOut(400,function(){i.css({visibility:"hidden",display:o}).find(".cookie-notice-revoke-container").hide().fadeIn(400).css({visibility:"visible",display:"block"})}):"slide"===cnArgs.hideEffect?i.slideUp(400,function(){i.css({visibility:"hidden",display:o}).find(".cookie-notice-revoke-container").hide().slideDown(400).css({visibility:"visible",display:"block"})}):i.css({visibility:"hidden"}).find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"})}}}(jQuery);
languages/cookie-notice.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
- "POT-Creation-Date: 2018-06-11 10:36+0200\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
@@ -10,369 +10,389 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.0.8\n"
14
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;_n\n"
15
  "X-Poedit-Basepath: .\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../cookie-notice.php:134
20
  msgid "Top"
21
  msgstr ""
22
 
23
- #: ../cookie-notice.php:135
24
  msgid "Bottom"
25
  msgstr ""
26
 
27
- #: ../cookie-notice.php:139 ../cookie-notice.php:176
28
  msgid "None"
29
  msgstr ""
30
 
31
- #: ../cookie-notice.php:140
32
  msgid "WordPress"
33
  msgstr ""
34
 
35
- #: ../cookie-notice.php:141
36
  msgid "Bootstrap"
37
  msgstr ""
38
 
39
- #: ../cookie-notice.php:145
40
  msgid "Automatic"
41
  msgstr ""
42
 
43
- #: ../cookie-notice.php:146
44
  msgid "Manual"
45
  msgstr ""
46
 
47
- #: ../cookie-notice.php:150
48
  msgid "Page link"
49
  msgstr ""
50
 
51
- #: ../cookie-notice.php:151
52
  msgid "Custom link"
53
  msgstr ""
54
 
55
- #: ../cookie-notice.php:160
 
 
 
 
 
 
 
 
56
  msgid "Text color"
57
  msgstr ""
58
 
59
- #: ../cookie-notice.php:161
60
  msgid "Bar color"
61
  msgstr ""
62
 
63
- #: ../cookie-notice.php:165
64
  msgid "An hour"
65
  msgstr ""
66
 
67
- #: ../cookie-notice.php:166
68
  msgid "1 day"
69
  msgstr ""
70
 
71
- #: ../cookie-notice.php:167
72
  msgid "1 week"
73
  msgstr ""
74
 
75
- #: ../cookie-notice.php:168
76
  msgid "1 month"
77
  msgstr ""
78
 
79
- #: ../cookie-notice.php:169
80
  msgid "3 months"
81
  msgstr ""
82
 
83
- #: ../cookie-notice.php:170
84
  msgid "6 months"
85
  msgstr ""
86
 
87
- #: ../cookie-notice.php:171
88
  msgid "1 year"
89
  msgstr ""
90
 
91
- #: ../cookie-notice.php:172
92
  msgid "infinity"
93
  msgstr ""
94
 
95
- #: ../cookie-notice.php:177
96
  msgid "Fade"
97
  msgstr ""
98
 
99
- #: ../cookie-notice.php:178
100
  msgid "Slide"
101
  msgstr ""
102
 
103
- #: ../cookie-notice.php:182
104
  msgid "Header"
105
  msgstr ""
106
 
107
- #: ../cookie-notice.php:183
108
  msgid "Footer"
109
  msgstr ""
110
 
111
- #: ../cookie-notice.php:189
112
  msgid "We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it."
113
  msgstr ""
114
 
115
- #: ../cookie-notice.php:190
116
  msgid "Ok"
117
  msgstr ""
118
 
119
- #: ../cookie-notice.php:191
120
  msgid "No"
121
  msgstr ""
122
 
123
- #: ../cookie-notice.php:192 ../cookie-notice.php:394
124
  msgid "Revoke cookies"
125
  msgstr ""
126
 
127
- #: ../cookie-notice.php:193 ../cookie-notice.php:391
128
  msgid "Privacy policy"
129
  msgstr ""
130
 
131
- #: ../cookie-notice.php:335 ../cookie-notice.php:346 ../cookie-notice.php:349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  msgid "Cookie Notice"
133
  msgstr ""
134
 
135
- #: ../cookie-notice.php:351
136
  msgid "Need support?"
137
  msgstr ""
138
 
139
- #: ../cookie-notice.php:352
140
  #, php-format
141
  msgid "If you are having problems with this plugin, please browse it's <a href=\"%s\" target=\"_blank\">Documentation</a> or talk about them in the <a href=\"%s\" target=\"_blank\">Support forum</a>"
142
  msgstr ""
143
 
144
- #: ../cookie-notice.php:354
145
  msgid "Do you like this plugin?"
146
  msgstr ""
147
 
148
- #: ../cookie-notice.php:355
149
  #, php-format
150
  msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
151
  msgstr ""
152
 
153
- #: ../cookie-notice.php:356
154
  #, php-format
155
  msgid "Blog about it & link to the <a href=\"%s\" target=\"_blank\">plugin page</a>."
156
  msgstr ""
157
 
158
- #: ../cookie-notice.php:357
159
  #, php-format
160
  msgid "Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
161
  msgstr ""
162
 
163
- #: ../cookie-notice.php:372
164
  msgid "Reset to defaults"
165
  msgstr ""
166
 
167
- #: ../cookie-notice.php:388
168
  msgid "Configuration"
169
  msgstr ""
170
 
171
- #: ../cookie-notice.php:389
172
- msgid "Message"
173
- msgstr ""
174
-
175
- #: ../cookie-notice.php:390
176
  msgid "Button text"
177
  msgstr ""
178
 
179
- #: ../cookie-notice.php:392
180
- msgid "Link target"
181
- msgstr ""
182
-
183
- #: ../cookie-notice.php:393
184
  msgid "Refuse cookies"
185
  msgstr ""
186
 
187
- #: ../cookie-notice.php:395
188
  msgid "Script blocking"
189
  msgstr ""
190
 
191
- #: ../cookie-notice.php:396
192
  msgid "Reloading"
193
  msgstr ""
194
 
195
- #: ../cookie-notice.php:397
196
  msgid "On scroll"
197
  msgstr ""
198
 
199
- #: ../cookie-notice.php:398
200
  msgid "Cookie expiry"
201
  msgstr ""
202
 
203
- #: ../cookie-notice.php:399
204
  msgid "Script placement"
205
  msgstr ""
206
 
207
- #: ../cookie-notice.php:400
208
  msgid "Deactivation"
209
  msgstr ""
210
 
211
- #: ../cookie-notice.php:403
212
  msgid "Design"
213
  msgstr ""
214
 
215
- #: ../cookie-notice.php:404
216
  msgid "Position"
217
  msgstr ""
218
 
219
- #: ../cookie-notice.php:405
220
  msgid "Animation"
221
  msgstr ""
222
 
223
- #: ../cookie-notice.php:406
224
  msgid "Button style"
225
  msgstr ""
226
 
227
- #: ../cookie-notice.php:407
228
  msgid "Button class"
229
  msgstr ""
230
 
231
- #: ../cookie-notice.php:408
232
  msgid "Colors"
233
  msgstr ""
234
 
235
- #: ../cookie-notice.php:423
236
  msgid "Enable if you want all plugin data to be deleted on deactivation."
237
  msgstr ""
238
 
239
- #: ../cookie-notice.php:435
240
  msgid "Enter the cookie notice message."
241
  msgstr ""
242
 
243
- #: ../cookie-notice.php:448
244
  msgid "The text of the option to accept the usage of the cookies and make the notification disappear."
245
  msgstr ""
246
 
247
- #: ../cookie-notice.php:459
248
  msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
249
  msgstr ""
250
 
251
- #: ../cookie-notice.php:463
252
  msgid "The text of the button to refuse the usage of the cookies."
253
  msgstr ""
254
 
255
- #: ../cookie-notice.php:481
256
  msgid "Head"
257
  msgstr ""
258
 
259
- #: ../cookie-notice.php:482
260
  msgid "Body"
261
  msgstr ""
262
 
263
- #: ../cookie-notice.php:485
264
  msgid "The code to be used in your site header, before the closing head tag."
265
  msgstr ""
266
 
267
- #: ../cookie-notice.php:489
268
  msgid "The code to be used in your site footer, before the closing body tag."
269
  msgstr ""
270
 
271
- #: ../cookie-notice.php:493
272
  msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted."
273
  msgstr ""
274
 
275
- #: ../cookie-notice.php:493
276
  msgid "To get the cookie notice status use <code>cn_cookies_accepted()</code> function."
277
  msgstr ""
278
 
279
- #: ../cookie-notice.php:504
280
  msgid "Enable to give to the user the possibility to revoke their cookie consent <i>(requires \"Refuse cookies\" option enabled)</i>."
281
  msgstr ""
282
 
283
- #: ../cookie-notice.php:507
284
  msgid "The text of the button to revoke the cookie consent."
285
  msgstr ""
286
 
287
- #: ../cookie-notice.php:515
288
  msgid "Select the method for displaying the revoke button - automatic (in the Cookie Notice container) or manual using <code>[cookies_revoke]</code> shortcode."
289
  msgstr ""
290
 
291
- #: ../cookie-notice.php:526
292
  msgid "Enable to reload the page after cookies are accepted."
293
  msgstr ""
294
 
295
- #: ../cookie-notice.php:549
296
  msgid "Enable privacy policy link."
297
  msgstr ""
298
 
299
- #: ../cookie-notice.php:550
300
  #, php-format
301
  msgid "Need a Cookie Policy? Generate one with <a href=\"%s\" target=\"_blank\" title=\"iubenda\">iubenda</a>."
302
  msgstr ""
303
 
304
- #: ../cookie-notice.php:553
305
  msgid "The text of the privacy policy button."
306
  msgstr ""
307
 
308
- #: ../cookie-notice.php:565
309
  msgid "Select where to redirect user for more information about cookies."
310
  msgstr ""
311
 
312
- #: ../cookie-notice.php:568
313
  msgid "-- select page --"
314
  msgstr ""
315
 
316
- #: ../cookie-notice.php:579
317
  msgid "Select from one of your site's pages."
318
  msgstr ""
319
 
320
- #: ../cookie-notice.php:585
321
  msgid "Synchronize with WordPress Privacy Policy page."
322
  msgstr ""
323
 
324
- #: ../cookie-notice.php:592
325
  msgid "Enter the full URL starting with http(s)://"
326
  msgstr ""
327
 
328
- #: ../cookie-notice.php:614
329
- msgid "Select the privacy policy link target."
330
  msgstr ""
331
 
332
- #: ../cookie-notice.php:637
333
- msgid "The ammount of time that cookie should be stored for."
334
- msgstr ""
335
-
336
- #: ../cookie-notice.php:655
337
  msgid "Select where all the plugin scripts should be placed."
338
  msgstr ""
339
 
340
- #: ../cookie-notice.php:675
341
  msgid "Select location for your cookie notice."
342
  msgstr ""
343
 
344
- #: ../cookie-notice.php:696
345
  msgid "Cookie notice acceptance animation."
346
  msgstr ""
347
 
348
- #: ../cookie-notice.php:707
349
  msgid "Enable cookie notice acceptance when users scroll."
350
  msgstr ""
351
 
352
- #: ../cookie-notice.php:710
353
  msgid "Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear."
354
  msgstr ""
355
 
356
- #: ../cookie-notice.php:731
357
  msgid "Choose buttons style."
358
  msgstr ""
359
 
360
- #: ../cookie-notice.php:744
361
  msgid "Enter additional button CSS classes separated by spaces."
362
  msgstr ""
363
 
364
- #: ../cookie-notice.php:870
365
  msgid "Settings restored to defaults."
366
  msgstr ""
367
 
368
- #: ../cookie-notice.php:976
369
  msgid "Support"
370
  msgstr ""
371
 
372
- #: ../cookie-notice.php:993
373
  msgid "Settings"
374
  msgstr ""
375
 
376
- #: ../cookie-notice.php:1060
377
  msgid "Are you sure you want to reset these settings to defaults?"
378
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
+ "POT-Creation-Date: 2019-11-08 13:47+0100\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.2.4\n"
14
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;_n\n"
15
  "X-Poedit-Basepath: .\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../cookie-notice.php:143
20
  msgid "Top"
21
  msgstr ""
22
 
23
+ #: ../cookie-notice.php:144
24
  msgid "Bottom"
25
  msgstr ""
26
 
27
+ #: ../cookie-notice.php:148 ../cookie-notice.php:190
28
  msgid "None"
29
  msgstr ""
30
 
31
+ #: ../cookie-notice.php:149
32
  msgid "WordPress"
33
  msgstr ""
34
 
35
+ #: ../cookie-notice.php:150
36
  msgid "Bootstrap"
37
  msgstr ""
38
 
39
+ #: ../cookie-notice.php:154
40
  msgid "Automatic"
41
  msgstr ""
42
 
43
+ #: ../cookie-notice.php:155
44
  msgid "Manual"
45
  msgstr ""
46
 
47
+ #: ../cookie-notice.php:159
48
  msgid "Page link"
49
  msgstr ""
50
 
51
+ #: ../cookie-notice.php:160
52
  msgid "Custom link"
53
  msgstr ""
54
 
55
+ #: ../cookie-notice.php:169
56
+ msgid "Banner"
57
+ msgstr ""
58
+
59
+ #: ../cookie-notice.php:170 ../cookie-notice.php:566
60
+ msgid "Message"
61
+ msgstr ""
62
+
63
+ #: ../cookie-notice.php:174
64
  msgid "Text color"
65
  msgstr ""
66
 
67
+ #: ../cookie-notice.php:175
68
  msgid "Bar color"
69
  msgstr ""
70
 
71
+ #: ../cookie-notice.php:179
72
  msgid "An hour"
73
  msgstr ""
74
 
75
+ #: ../cookie-notice.php:180
76
  msgid "1 day"
77
  msgstr ""
78
 
79
+ #: ../cookie-notice.php:181
80
  msgid "1 week"
81
  msgstr ""
82
 
83
+ #: ../cookie-notice.php:182
84
  msgid "1 month"
85
  msgstr ""
86
 
87
+ #: ../cookie-notice.php:183
88
  msgid "3 months"
89
  msgstr ""
90
 
91
+ #: ../cookie-notice.php:184
92
  msgid "6 months"
93
  msgstr ""
94
 
95
+ #: ../cookie-notice.php:185
96
  msgid "1 year"
97
  msgstr ""
98
 
99
+ #: ../cookie-notice.php:186
100
  msgid "infinity"
101
  msgstr ""
102
 
103
+ #: ../cookie-notice.php:191
104
  msgid "Fade"
105
  msgstr ""
106
 
107
+ #: ../cookie-notice.php:192
108
  msgid "Slide"
109
  msgstr ""
110
 
111
+ #: ../cookie-notice.php:196
112
  msgid "Header"
113
  msgstr ""
114
 
115
+ #: ../cookie-notice.php:197
116
  msgid "Footer"
117
  msgstr ""
118
 
119
+ #: ../cookie-notice.php:203
120
  msgid "We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it."
121
  msgstr ""
122
 
123
+ #: ../cookie-notice.php:204
124
  msgid "Ok"
125
  msgstr ""
126
 
127
+ #: ../cookie-notice.php:205
128
  msgid "No"
129
  msgstr ""
130
 
131
+ #: ../cookie-notice.php:206 ../cookie-notice.php:570
132
  msgid "Revoke cookies"
133
  msgstr ""
134
 
135
+ #: ../cookie-notice.php:207 ../cookie-notice.php:568
136
  msgid "Privacy policy"
137
  msgstr ""
138
 
139
+ #: ../cookie-notice.php:268
140
+ #, php-format
141
+ msgid "Hey, you've been using <strong>Cookie Notice</strong> for more than %s."
142
+ msgstr ""
143
+
144
+ #: ../cookie-notice.php:268
145
+ msgid "Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation."
146
+ msgstr ""
147
+
148
+ #: ../cookie-notice.php:268
149
+ msgid "Your help is much appreciated. Thank you very much"
150
+ msgstr ""
151
+
152
+ #: ../cookie-notice.php:268
153
+ #, php-format
154
+ msgid "founder of <a href=\"%s\" target=\"_blank\">dFactory</a> plugins."
155
+ msgstr ""
156
+
157
+ #: ../cookie-notice.php:268
158
+ #, php-format
159
+ msgid "<a href=\"%s\" class=\"cn-dismissible-notice\" target=\"_blank\" rel=\"noopener\">Ok, you deserve it</a><br /><a href=\"javascript:void(0);\" class=\"cn-dismissible-notice cn-delay-notice\" rel=\"noopener\">Nope, maybe later</a><br /><a href=\"javascript:void(0);\" class=\"cn-dismissible-notice\" rel=\"noopener\">I already did</a>"
160
+ msgstr ""
161
+
162
+ #: ../cookie-notice.php:512 ../cookie-notice.php:523 ../cookie-notice.php:526
163
+ #: ../cookie-notice.php:1102
164
  msgid "Cookie Notice"
165
  msgstr ""
166
 
167
+ #: ../cookie-notice.php:528
168
  msgid "Need support?"
169
  msgstr ""
170
 
171
+ #: ../cookie-notice.php:529
172
  #, php-format
173
  msgid "If you are having problems with this plugin, please browse it's <a href=\"%s\" target=\"_blank\">Documentation</a> or talk about them in the <a href=\"%s\" target=\"_blank\">Support forum</a>"
174
  msgstr ""
175
 
176
+ #: ../cookie-notice.php:531
177
  msgid "Do you like this plugin?"
178
  msgstr ""
179
 
180
+ #: ../cookie-notice.php:532
181
  #, php-format
182
  msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
183
  msgstr ""
184
 
185
+ #: ../cookie-notice.php:533
186
  #, php-format
187
  msgid "Blog about it & link to the <a href=\"%s\" target=\"_blank\">plugin page</a>."
188
  msgstr ""
189
 
190
+ #: ../cookie-notice.php:534
191
  #, php-format
192
  msgid "Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
193
  msgstr ""
194
 
195
+ #: ../cookie-notice.php:549
196
  msgid "Reset to defaults"
197
  msgstr ""
198
 
199
+ #: ../cookie-notice.php:565
200
  msgid "Configuration"
201
  msgstr ""
202
 
203
+ #: ../cookie-notice.php:567
 
 
 
 
204
  msgid "Button text"
205
  msgstr ""
206
 
207
+ #: ../cookie-notice.php:569
 
 
 
 
208
  msgid "Refuse cookies"
209
  msgstr ""
210
 
211
+ #: ../cookie-notice.php:571
212
  msgid "Script blocking"
213
  msgstr ""
214
 
215
+ #: ../cookie-notice.php:572
216
  msgid "Reloading"
217
  msgstr ""
218
 
219
+ #: ../cookie-notice.php:573
220
  msgid "On scroll"
221
  msgstr ""
222
 
223
+ #: ../cookie-notice.php:574
224
  msgid "Cookie expiry"
225
  msgstr ""
226
 
227
+ #: ../cookie-notice.php:575
228
  msgid "Script placement"
229
  msgstr ""
230
 
231
+ #: ../cookie-notice.php:576
232
  msgid "Deactivation"
233
  msgstr ""
234
 
235
+ #: ../cookie-notice.php:579
236
  msgid "Design"
237
  msgstr ""
238
 
239
+ #: ../cookie-notice.php:580
240
  msgid "Position"
241
  msgstr ""
242
 
243
+ #: ../cookie-notice.php:581
244
  msgid "Animation"
245
  msgstr ""
246
 
247
+ #: ../cookie-notice.php:582
248
  msgid "Button style"
249
  msgstr ""
250
 
251
+ #: ../cookie-notice.php:583
252
  msgid "Button class"
253
  msgstr ""
254
 
255
+ #: ../cookie-notice.php:584
256
  msgid "Colors"
257
  msgstr ""
258
 
259
+ #: ../cookie-notice.php:599
260
  msgid "Enable if you want all plugin data to be deleted on deactivation."
261
  msgstr ""
262
 
263
+ #: ../cookie-notice.php:611
264
  msgid "Enter the cookie notice message."
265
  msgstr ""
266
 
267
+ #: ../cookie-notice.php:624
268
  msgid "The text of the option to accept the usage of the cookies and make the notification disappear."
269
  msgstr ""
270
 
271
+ #: ../cookie-notice.php:635
272
  msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
273
  msgstr ""
274
 
275
+ #: ../cookie-notice.php:639
276
  msgid "The text of the button to refuse the usage of the cookies."
277
  msgstr ""
278
 
279
+ #: ../cookie-notice.php:657
280
  msgid "Head"
281
  msgstr ""
282
 
283
+ #: ../cookie-notice.php:658
284
  msgid "Body"
285
  msgstr ""
286
 
287
+ #: ../cookie-notice.php:661
288
  msgid "The code to be used in your site header, before the closing head tag."
289
  msgstr ""
290
 
291
+ #: ../cookie-notice.php:665
292
  msgid "The code to be used in your site footer, before the closing body tag."
293
  msgstr ""
294
 
295
+ #: ../cookie-notice.php:669
296
  msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted."
297
  msgstr ""
298
 
299
+ #: ../cookie-notice.php:669
300
  msgid "To get the cookie notice status use <code>cn_cookies_accepted()</code> function."
301
  msgstr ""
302
 
303
+ #: ../cookie-notice.php:680
304
  msgid "Enable to give to the user the possibility to revoke their cookie consent <i>(requires \"Refuse cookies\" option enabled)</i>."
305
  msgstr ""
306
 
307
+ #: ../cookie-notice.php:683
308
  msgid "The text of the button to revoke the cookie consent."
309
  msgstr ""
310
 
311
+ #: ../cookie-notice.php:691
312
  msgid "Select the method for displaying the revoke button - automatic (in the Cookie Notice container) or manual using <code>[cookies_revoke]</code> shortcode."
313
  msgstr ""
314
 
315
+ #: ../cookie-notice.php:702
316
  msgid "Enable to reload the page after cookies are accepted."
317
  msgstr ""
318
 
319
+ #: ../cookie-notice.php:725
320
  msgid "Enable privacy policy link."
321
  msgstr ""
322
 
323
+ #: ../cookie-notice.php:726
324
  #, php-format
325
  msgid "Need a Cookie Policy? Generate one with <a href=\"%s\" target=\"_blank\" title=\"iubenda\">iubenda</a>."
326
  msgstr ""
327
 
328
+ #: ../cookie-notice.php:729
329
  msgid "The text of the privacy policy button."
330
  msgstr ""
331
 
332
+ #: ../cookie-notice.php:741
333
  msgid "Select where to redirect user for more information about cookies."
334
  msgstr ""
335
 
336
+ #: ../cookie-notice.php:744
337
  msgid "-- select page --"
338
  msgstr ""
339
 
340
+ #: ../cookie-notice.php:755
341
  msgid "Select from one of your site's pages."
342
  msgstr ""
343
 
344
+ #: ../cookie-notice.php:761
345
  msgid "Synchronize with WordPress Privacy Policy page."
346
  msgstr ""
347
 
348
+ #: ../cookie-notice.php:768
349
  msgid "Enter the full URL starting with http(s)://"
350
  msgstr ""
351
 
352
+ #: ../cookie-notice.php:811
353
+ msgid "The amount of time that cookie should be stored for."
354
  msgstr ""
355
 
356
+ #: ../cookie-notice.php:829
 
 
 
 
357
  msgid "Select where all the plugin scripts should be placed."
358
  msgstr ""
359
 
360
+ #: ../cookie-notice.php:849
361
  msgid "Select location for your cookie notice."
362
  msgstr ""
363
 
364
+ #: ../cookie-notice.php:870
365
  msgid "Cookie notice acceptance animation."
366
  msgstr ""
367
 
368
+ #: ../cookie-notice.php:881
369
  msgid "Enable cookie notice acceptance when users scroll."
370
  msgstr ""
371
 
372
+ #: ../cookie-notice.php:884
373
  msgid "Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear."
374
  msgstr ""
375
 
376
+ #: ../cookie-notice.php:905
377
  msgid "Choose buttons style."
378
  msgstr ""
379
 
380
+ #: ../cookie-notice.php:918
381
  msgid "Enter additional button CSS classes separated by spaces."
382
  msgstr ""
383
 
384
+ #: ../cookie-notice.php:1051
385
  msgid "Settings restored to defaults."
386
  msgstr ""
387
 
388
+ #: ../cookie-notice.php:1178
389
  msgid "Support"
390
  msgstr ""
391
 
392
+ #: ../cookie-notice.php:1195
393
  msgid "Settings"
394
  msgstr ""
395
 
396
+ #: ../cookie-notice.php:1267
397
  msgid "Are you sure you want to reset these settings to defaults?"
398
  msgstr ""
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://www.dfactory.eu/
4
  Tags: gdpr, cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent
5
  Requires at least: 3.3
6
  Requires PHP: 5.2.4
7
- Tested up to: 5.0.3
8
- Stable tag: 1.2.46
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
@@ -66,6 +66,11 @@ No questions yet.
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
69
  = 1.2.46 =
70
  * Tweak: Remove WP Super Cache cookie on deactivation
71
  * Tweak: Remove plugin version from the db on deactivation
@@ -262,6 +267,6 @@ Initial release
262
 
263
  == Upgrade Notice ==
264
 
265
- = 1.2.46 =
266
- * Tweak: Remove WP Super Cache cookie on deactivation
267
- * Tweak: Remove plugin version from the db on deactivation
4
  Tags: gdpr, cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent
5
  Requires at least: 3.3
6
  Requires PHP: 5.2.4
7
+ Tested up to: 5.3
8
+ Stable tag: 1.2.47
9
  License: MIT License
10
  License URI: http://opensource.org/licenses/MIT
11
 
66
 
67
  == Changelog ==
68
 
69
+ = 1.2.47 =
70
+ * New: Option to select the privacy policy link position
71
+ * Tweak: Do not relad the page on refuse button click
72
+ * Tweak: Added aria-label attribute to cookie notice container
73
+
74
  = 1.2.46 =
75
  * Tweak: Remove WP Super Cache cookie on deactivation
76
  * Tweak: Remove plugin version from the db on deactivation
267
 
268
  == Upgrade Notice ==
269
 
270
+ = 1.2.47 =
271
+ * New: Option to select the privacy policy link position
272
+ * Tweak: Do not relad the page on refuse button click