Version Description
- New: Option to revoke the user consent
- New: Script blocking extended to header and footer
- New: Synchronization with WordPress 4.9.6 Privacy Policy page
- New: Custom button class option
- Tweak: Added 1 hour cookie expiry option
Download this release
Release Info
Developer | dfactory |
Plugin | Cookie Notice by dFactory |
Version | 1.2.43 |
Comparing to | |
See all releases |
Code changes from version 1.2.42 to 1.2.43
- cookie-notice.php +372 -192
- css/admin.css +17 -7
- css/admin.min.css +1 -1
- css/front.css +1 -107
- css/front.min.css +1 -1
- js/admin.js +59 -40
- js/admin.min.js +1 -1
- js/front.js +256 -59
- js/front.min.js +1 -1
- languages/cookie-notice.pot +147 -87
- readme.txt +23 -11
cookie-notice.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
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 regulations.
|
5 |
-
Version: 1.2.
|
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.
|
38 |
*/
|
39 |
class Cookie_Notice {
|
40 |
|
@@ -46,10 +46,15 @@ class Cookie_Notice {
|
|
46 |
'position' => 'bottom',
|
47 |
'message_text' => '',
|
48 |
'css_style' => 'bootstrap',
|
|
|
49 |
'accept_text' => '',
|
50 |
'refuse_text' => '',
|
51 |
'refuse_opt' => 'no',
|
52 |
'refuse_code' => '',
|
|
|
|
|
|
|
|
|
53 |
'redirection' => false,
|
54 |
'see_more' => 'no',
|
55 |
'link_target' => '_blank',
|
@@ -59,19 +64,20 @@ class Cookie_Notice {
|
|
59 |
'on_scroll_offset' => 100,
|
60 |
'colors' => array(
|
61 |
'text' => '#fff',
|
62 |
-
'bar' => '#000'
|
63 |
),
|
64 |
'see_more_opt' => array(
|
65 |
'text' => '',
|
66 |
-
'link_type' => '
|
67 |
'id' => 'empty',
|
68 |
-
'link' => ''
|
|
|
69 |
),
|
70 |
'script_placement' => 'header',
|
71 |
'translate' => true,
|
72 |
'deactivation_delete' => 'no'
|
73 |
),
|
74 |
-
'version' => '1.2.
|
75 |
);
|
76 |
private $positions = array();
|
77 |
private $styles = array();
|
@@ -84,14 +90,6 @@ class Cookie_Notice {
|
|
84 |
private $times = array();
|
85 |
private $script_placements = array();
|
86 |
|
87 |
-
/**
|
88 |
-
* @var $cookie, holds cookie name
|
89 |
-
*/
|
90 |
-
private static $cookie = array(
|
91 |
-
'name' => 'cookie_notice_accepted',
|
92 |
-
'value' => 'TRUE'
|
93 |
-
);
|
94 |
-
|
95 |
/**
|
96 |
* Constructor.
|
97 |
*/
|
@@ -104,6 +102,9 @@ class Cookie_Notice {
|
|
104 |
'general' => array_merge( $this->defaults['general'], get_option( 'cookie_notice_options', $this->defaults['general'] ) )
|
105 |
);
|
106 |
|
|
|
|
|
|
|
107 |
// actions
|
108 |
add_action( 'init', array( $this, 'register_shortcode' ) );
|
109 |
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
@@ -112,12 +113,14 @@ class Cookie_Notice {
|
|
112 |
add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
|
113 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
114 |
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
|
|
115 |
add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
|
116 |
add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
|
117 |
|
118 |
// filters
|
119 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
120 |
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
|
|
121 |
}
|
122 |
|
123 |
/**
|
@@ -134,10 +137,15 @@ class Cookie_Notice {
|
|
134 |
'wp-default' => __( 'WordPress', 'cookie-notice' ),
|
135 |
'bootstrap' => __( 'Bootstrap', 'cookie-notice' )
|
136 |
);
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
$this->links = array(
|
139 |
-
'
|
140 |
-
'
|
141 |
);
|
142 |
|
143 |
$this->link_target = array(
|
@@ -151,6 +159,7 @@ class Cookie_Notice {
|
|
151 |
);
|
152 |
|
153 |
$this->times = array(
|
|
|
154 |
'day' => array( __( '1 day', 'cookie-notice' ), 86400 ),
|
155 |
'week' => array( __( '1 week', 'cookie-notice' ), 604800 ),
|
156 |
'month' => array( __( '1 month', 'cookie-notice' ), 2592000 ),
|
@@ -177,6 +186,7 @@ class Cookie_Notice {
|
|
177 |
$this->options['general']['message_text'] = __( '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.', 'cookie-notice' );
|
178 |
$this->options['general']['accept_text'] = __( 'Ok', 'cookie-notice' );
|
179 |
$this->options['general']['refuse_text'] = __( 'No', 'cookie-notice' );
|
|
|
180 |
$this->options['general']['see_more_opt']['text'] = __( 'Read more', 'cookie-notice' );
|
181 |
|
182 |
update_option( 'cookie_notice_options', $this->options['general'] );
|
@@ -190,18 +200,43 @@ class Cookie_Notice {
|
|
190 |
icl_register_string( 'Cookie Notice', 'Message in the notice', $this->options['general']['message_text'] );
|
191 |
icl_register_string( 'Cookie Notice', 'Button text', $this->options['general']['accept_text'] );
|
192 |
icl_register_string( 'Cookie Notice', 'Refuse button text', $this->options['general']['refuse_text'] );
|
|
|
193 |
icl_register_string( 'Cookie Notice', 'Read more text', $this->options['general']['see_more_opt']['text'] );
|
194 |
icl_register_string( 'Cookie Notice', 'Custom link', $this->options['general']['see_more_opt']['link'] );
|
195 |
}
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
/**
|
199 |
* Register shortcode.
|
200 |
*
|
201 |
* @return void
|
202 |
*/
|
203 |
public function register_shortcode() {
|
204 |
-
add_shortcode( 'cookies_accepted', array( $this, '
|
|
|
205 |
}
|
206 |
|
207 |
/**
|
@@ -211,20 +246,9 @@ class Cookie_Notice {
|
|
211 |
* @param mixed $content
|
212 |
* @return mixed
|
213 |
*/
|
214 |
-
public function
|
215 |
if ( $this->cookies_accepted() ) {
|
216 |
-
|
217 |
-
$allowed_html = apply_filters( 'cn_refuse_code_allowed_html', array_merge( wp_kses_allowed_html( 'post' ), array(
|
218 |
-
'script' => array(
|
219 |
-
'type' => array(),
|
220 |
-
'src' => array(),
|
221 |
-
'charset' => array(),
|
222 |
-
'async' => array()
|
223 |
-
),
|
224 |
-
'noscript' => array()
|
225 |
-
) ) );
|
226 |
-
|
227 |
-
$scripts = html_entity_decode( trim( wp_kses( $content, $allowed_html ) ) );
|
228 |
|
229 |
if ( ! empty( $scripts ) )
|
230 |
return $scripts;
|
@@ -233,6 +257,32 @@ class Cookie_Notice {
|
|
233 |
return '';
|
234 |
}
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
/**
|
237 |
* Register WPML (>= 3.2) strings if needed.
|
238 |
*
|
@@ -246,6 +296,7 @@ class Cookie_Notice {
|
|
246 |
'Message in the notice' => $this->options['general']['message_text'],
|
247 |
'Button text' => $this->options['general']['accept_text'],
|
248 |
'Refuse button text' => $this->options['general']['refuse_text'],
|
|
|
249 |
'Read more text' => $this->options['general']['see_more_opt']['text'],
|
250 |
'Custom link' => $this->options['general']['see_more_opt']['link']
|
251 |
);
|
@@ -274,9 +325,7 @@ class Cookie_Notice {
|
|
274 |
* Add submenu.
|
275 |
*/
|
276 |
public function admin_menu_options() {
|
277 |
-
add_options_page(
|
278 |
-
__( 'Cookie Notice', 'cookie-notice' ), __( 'Cookie Notice', 'cookie-notice' ), apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ), 'cookie-notice', array( $this, 'options_page' )
|
279 |
-
);
|
280 |
}
|
281 |
|
282 |
/**
|
@@ -332,9 +381,10 @@ class Cookie_Notice {
|
|
332 |
add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
|
333 |
add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
334 |
add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
335 |
-
add_settings_field( 'cn_see_more', __( '
|
336 |
add_settings_field( 'cn_link_target', __( 'Link target', 'cookie-notice' ), array( $this, 'cn_link_target' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
337 |
-
add_settings_field( 'cn_refuse_opt', __( 'Refuse
|
|
|
338 |
add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
339 |
add_settings_field( 'cn_redirection', __( 'Reloading', 'cookie-notice' ), array( $this, 'cn_redirection' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
340 |
add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
@@ -347,6 +397,7 @@ class Cookie_Notice {
|
|
347 |
add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
|
348 |
add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
|
349 |
add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
|
|
|
350 |
add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
|
351 |
}
|
352 |
|
@@ -361,7 +412,9 @@ class Cookie_Notice {
|
|
361 |
*/
|
362 |
public function cn_deactivation_delete() {
|
363 |
echo '
|
364 |
-
<
|
|
|
|
|
365 |
}
|
366 |
|
367 |
/**
|
@@ -369,10 +422,12 @@ class Cookie_Notice {
|
|
369 |
*/
|
370 |
public function cn_message_text() {
|
371 |
echo '
|
372 |
-
<
|
373 |
-
<
|
374 |
-
|
375 |
-
|
|
|
|
|
376 |
}
|
377 |
|
378 |
/**
|
@@ -380,10 +435,12 @@ class Cookie_Notice {
|
|
380 |
*/
|
381 |
public function cn_accept_text() {
|
382 |
echo '
|
383 |
-
<
|
384 |
-
<
|
|
|
385 |
<p class="description">' . __( 'The text of the option to accept the usage of the cookies and make the notification disappear.', 'cookie-notice' ) . '</p>
|
386 |
-
|
|
|
387 |
}
|
388 |
|
389 |
/**
|
@@ -392,14 +449,12 @@ class Cookie_Notice {
|
|
392 |
public function cn_refuse_opt() {
|
393 |
echo '
|
394 |
<fieldset>
|
395 |
-
<label><input id="cn_refuse_opt" type="checkbox" name="cookie_notice_options[refuse_opt]" value="1" ' . checked( 'yes', $this->options['general']['refuse_opt'], false ) . ' />' . __( '
|
396 |
-
|
397 |
-
echo '
|
398 |
<div id="cn_refuse_text">
|
399 |
<input type="text" class="regular-text" name="cookie_notice_options[refuse_text]" value="' . esc_attr( $this->options['general']['refuse_text'] ) . '" />
|
400 |
-
<p class="description">' . __( 'The text of the
|
401 |
-
</div>
|
402 |
-
echo '
|
403 |
</div>
|
404 |
</fieldset>';
|
405 |
}
|
@@ -408,21 +463,51 @@ class Cookie_Notice {
|
|
408 |
* Non functional cookies code.
|
409 |
*/
|
410 |
public function cn_refuse_code() {
|
411 |
-
$allowed_html =
|
412 |
-
|
413 |
-
|
414 |
-
'src' => array(),
|
415 |
-
'charset' => array(),
|
416 |
-
'async' => array()
|
417 |
-
),
|
418 |
-
'noscript' => array()
|
419 |
-
) ) );
|
420 |
-
|
421 |
echo '
|
|
|
422 |
<div id="cn_refuse_code">
|
423 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
<p class="description">' . __( 'Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted.', 'cookie-notice' ) . '</br>' . __( 'To get the cookie notice status use <code>cn_cookies_accepted()</code> function.', 'cookie-notice' ) . '</p>
|
425 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
}
|
427 |
|
428 |
/**
|
@@ -430,14 +515,15 @@ class Cookie_Notice {
|
|
430 |
*/
|
431 |
public function cn_redirection() {
|
432 |
echo '
|
433 |
-
|
|
|
|
|
434 |
}
|
435 |
|
436 |
/**
|
437 |
* Read more link option.
|
438 |
*/
|
439 |
public function cn_see_more() {
|
440 |
-
|
441 |
$pages = get_pages(
|
442 |
array(
|
443 |
'sort_order' => 'ASC',
|
@@ -450,33 +536,29 @@ class Cookie_Notice {
|
|
450 |
'post_status' => 'publish'
|
451 |
)
|
452 |
);
|
453 |
-
|
454 |
-
echo '
|
455 |
-
<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 Read more link.', 'cookie-notice' ) . '</label>
|
456 |
-
<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>';
|
457 |
|
458 |
echo '
|
459 |
<fieldset>
|
460 |
-
|
461 |
-
<
|
462 |
-
<
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
468 |
|
469 |
-
|
470 |
<label><input id="cn_see_more_link-' . $value . '" type="radio" name="cookie_notice_options[see_more_opt][link_type]" value="' . $value . '" ' . checked( $value, $this->options['general']['see_more_opt']['link_type'], false ) . ' />' . esc_html( $label ) . '</label>';
|
471 |
-
}
|
472 |
}
|
473 |
|
474 |
echo '
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
|
481 |
if ( $pages ) {
|
482 |
foreach ( $pages as $page ) {
|
@@ -486,14 +568,23 @@ class Cookie_Notice {
|
|
486 |
}
|
487 |
|
488 |
echo '
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
</div>
|
496 |
-
</div>
|
497 |
</fieldset>';
|
498 |
}
|
499 |
|
@@ -502,17 +593,20 @@ class Cookie_Notice {
|
|
502 |
*/
|
503 |
public function cn_link_target() {
|
504 |
echo '
|
505 |
-
<
|
506 |
-
<
|
|
|
507 |
|
508 |
foreach ( $this->link_target as $target ) {
|
509 |
-
echo '
|
|
|
510 |
}
|
511 |
|
512 |
echo '
|
513 |
-
|
514 |
-
|
515 |
-
|
|
|
516 |
}
|
517 |
|
518 |
/**
|
@@ -520,32 +614,39 @@ class Cookie_Notice {
|
|
520 |
*/
|
521 |
public function cn_time() {
|
522 |
echo '
|
523 |
-
<
|
524 |
-
<
|
|
|
525 |
|
526 |
foreach ( $this->times as $time => $arr ) {
|
527 |
$time = esc_attr( $time );
|
528 |
|
529 |
-
echo '
|
|
|
530 |
}
|
531 |
|
532 |
echo '
|
533 |
-
|
534 |
-
|
535 |
-
|
|
|
536 |
}
|
537 |
|
538 |
/**
|
539 |
* Script placement option.
|
540 |
*/
|
541 |
public function cn_script_placement() {
|
|
|
|
|
|
|
542 |
foreach ( $this->script_placements as $value => $label ) {
|
543 |
echo '
|
544 |
<label><input id="cn_script_placement-' . $value . '" type="radio" name="cookie_notice_options[script_placement]" value="' . esc_attr( $value ) . '" ' . checked( $value, $this->options['general']['script_placement'], false ) . ' />' . esc_html( $label ) . '</label>';
|
545 |
}
|
546 |
|
547 |
echo '
|
548 |
-
<p class="description">' . __( 'Select where all the plugin scripts should be placed.', 'cookie-notice' ) . '</p>
|
|
|
549 |
}
|
550 |
|
551 |
/**
|
@@ -553,18 +654,20 @@ class Cookie_Notice {
|
|
553 |
*/
|
554 |
public function cn_position() {
|
555 |
echo '
|
556 |
-
<
|
|
|
557 |
|
558 |
foreach ( $this->positions as $value => $label ) {
|
559 |
$value = esc_attr( $value );
|
560 |
|
561 |
echo '
|
562 |
-
|
563 |
}
|
564 |
|
565 |
echo '
|
566 |
-
|
567 |
-
|
|
|
568 |
}
|
569 |
|
570 |
/**
|
@@ -572,18 +675,20 @@ class Cookie_Notice {
|
|
572 |
*/
|
573 |
public function cn_hide_effect() {
|
574 |
echo '
|
575 |
-
<
|
|
|
576 |
|
577 |
foreach ( $this->effects as $value => $label ) {
|
578 |
$value = esc_attr( $value );
|
579 |
|
580 |
echo '
|
581 |
-
|
582 |
}
|
583 |
|
584 |
echo '
|
585 |
-
|
586 |
-
|
|
|
587 |
}
|
588 |
|
589 |
/**
|
@@ -592,8 +697,7 @@ class Cookie_Notice {
|
|
592 |
public function cn_on_scroll() {
|
593 |
echo '
|
594 |
<fieldset>
|
595 |
-
<label><input id="cn_on_scroll" type="checkbox" name="cookie_notice_options[on_scroll]" value="1" ' . checked( 'yes', $this->options['general']['on_scroll'], false ) . ' />' . __( 'Enable cookie notice acceptance when users scroll.', 'cookie-notice' ) . '</label>
|
596 |
-
echo '
|
597 |
<div id="cn_on_scroll_offset"' . ( $this->options['general']['on_scroll'] === 'no' || $this->options['general']['on_scroll'] == false ? ' style="display: none;"' : '' ) . '>
|
598 |
<input type="text" class="text" name="cookie_notice_options[on_scroll_offset]" value="' . esc_attr( $this->options['general']['on_scroll_offset'] ) . '" /> <span>px</span>
|
599 |
<p class="description">' . __( 'Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear.', 'cookie-notice' ) . '</p>
|
@@ -606,18 +710,33 @@ class Cookie_Notice {
|
|
606 |
*/
|
607 |
public function cn_css_style() {
|
608 |
echo '
|
609 |
-
<
|
|
|
610 |
|
611 |
foreach ( $this->styles as $value => $label ) {
|
612 |
$value = esc_attr( $value );
|
613 |
|
614 |
echo '
|
615 |
-
|
616 |
}
|
617 |
|
618 |
echo '
|
619 |
-
|
620 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
}
|
622 |
|
623 |
/**
|
@@ -647,10 +766,9 @@ class Cookie_Notice {
|
|
647 |
* @return array
|
648 |
*/
|
649 |
public function validate_options( $input ) {
|
650 |
-
|
651 |
if ( ! check_admin_referer( 'cookie_notice_options-options') )
|
652 |
return $input;
|
653 |
-
|
654 |
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
655 |
return $input;
|
656 |
|
@@ -666,23 +784,26 @@ class Cookie_Notice {
|
|
666 |
$input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : $this->defaults['general']['message_text'] );
|
667 |
$input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : $this->defaults['general']['accept_text'] );
|
668 |
$input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : $this->defaults['general']['refuse_text'] );
|
|
|
669 |
$input['refuse_opt'] = (bool) isset( $input['refuse_opt'] ) ? 'yes' : 'no';
|
670 |
-
|
671 |
-
$
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
),
|
678 |
-
'noscript' => array()
|
679 |
-
) ) );
|
680 |
-
|
681 |
$input['refuse_code'] = wp_kses( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : $this->defaults['general']['refuse_code'], $allowed_html );
|
682 |
|
683 |
-
//
|
|
|
|
|
|
|
684 |
$input['css_style'] = sanitize_text_field( isset( $input['css_style'] ) && in_array( $input['css_style'], array_keys( $this->styles ) ) ? $input['css_style'] : $this->defaults['general']['css_style'] );
|
685 |
|
|
|
|
|
|
|
686 |
// link target
|
687 |
$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'] );
|
688 |
|
@@ -714,8 +835,13 @@ class Cookie_Notice {
|
|
714 |
|
715 |
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
716 |
$input['see_more_opt']['link'] = esc_url( $input['see_more'] === 'yes' ? $input['see_more_opt']['link'] : 'empty' );
|
717 |
-
elseif ( $input['see_more_opt']['link_type'] === 'page' )
|
718 |
$input['see_more_opt']['id'] = ( $input['see_more'] === 'yes' ? (int) $input['see_more_opt']['id'] : 'empty' );
|
|
|
|
|
|
|
|
|
|
|
719 |
|
720 |
$input['translate'] = false;
|
721 |
|
@@ -724,6 +850,7 @@ class Cookie_Notice {
|
|
724 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Message in the notice', $input['message_text'] );
|
725 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Button text', $input['accept_text'] );
|
726 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Refuse button text', $input['refuse_text'] );
|
|
|
727 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Read more text', $input['see_more_opt']['text'] );
|
728 |
|
729 |
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
@@ -746,12 +873,13 @@ class Cookie_Notice {
|
|
746 |
* @return mixed
|
747 |
*/
|
748 |
public function add_cookie_notice() {
|
749 |
-
if ( ! $this->cookies_set() ) {
|
750 |
// WPML >= 3.2
|
751 |
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
752 |
$this->options['general']['message_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['message_text'], 'Cookie Notice', 'Message in the notice' );
|
753 |
$this->options['general']['accept_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['accept_text'], 'Cookie Notice', 'Button text' );
|
754 |
$this->options['general']['refuse_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['refuse_text'], 'Cookie Notice', 'Refuse button text' );
|
|
|
755 |
$this->options['general']['see_more_opt']['text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['see_more_opt']['text'], 'Cookie Notice', 'Read more text' );
|
756 |
$this->options['general']['see_more_opt']['link'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['see_more_opt']['link'], 'Cookie Notice', 'Custom link' );
|
757 |
// WPML and Polylang compatibility
|
@@ -759,6 +887,7 @@ class Cookie_Notice {
|
|
759 |
$this->options['general']['message_text'] = icl_t( 'Cookie Notice', 'Message in the notice', $this->options['general']['message_text'] );
|
760 |
$this->options['general']['accept_text'] = icl_t( 'Cookie Notice', 'Button text', $this->options['general']['accept_text'] );
|
761 |
$this->options['general']['refuse_text'] = icl_t( 'Cookie Notice', 'Refuse button text', $this->options['general']['refuse_text'] );
|
|
|
762 |
$this->options['general']['see_more_opt']['text'] = icl_t( 'Cookie Notice', 'Read more text', $this->options['general']['see_more_opt']['text'] );
|
763 |
$this->options['general']['see_more_opt']['link'] = icl_t( 'Cookie Notice', 'Custom link', $this->options['general']['see_more_opt']['link'] );
|
764 |
}
|
@@ -770,25 +899,30 @@ class Cookie_Notice {
|
|
770 |
$options = apply_filters( 'cn_cookie_notice_args', array(
|
771 |
'position' => $this->options['general']['position'],
|
772 |
'css_style' => $this->options['general']['css_style'],
|
773 |
-
'
|
|
|
774 |
'colors' => $this->options['general']['colors'],
|
775 |
'message_text' => $this->options['general']['message_text'],
|
776 |
'accept_text' => $this->options['general']['accept_text'],
|
777 |
'refuse_text' => $this->options['general']['refuse_text'],
|
|
|
778 |
'refuse_opt' => $this->options['general']['refuse_opt'],
|
779 |
'see_more' => $this->options['general']['see_more'],
|
780 |
'see_more_opt' => $this->options['general']['see_more_opt'],
|
781 |
'link_target' => $this->options['general']['link_target'],
|
782 |
) );
|
783 |
|
|
|
|
|
784 |
// message output
|
785 |
$output = '
|
786 |
-
<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'] . ';">'
|
787 |
. '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>'
|
788 |
-
. '<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['accept_text'] . '</a>'
|
789 |
-
. ($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['refuse_text'] . '</a>' : '' )
|
790 |
-
. ($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['see_more_opt']['text'] . '</a>' : '') . '
|
791 |
</div>
|
|
|
792 |
</div>';
|
793 |
|
794 |
echo apply_filters( 'cn_cookie_notice_output', $output, $options );
|
@@ -796,30 +930,30 @@ class Cookie_Notice {
|
|
796 |
}
|
797 |
|
798 |
/**
|
799 |
-
*
|
800 |
*
|
801 |
* @return bool
|
802 |
*/
|
803 |
-
public function
|
804 |
-
return apply_filters( '
|
805 |
}
|
806 |
|
807 |
/**
|
808 |
-
*
|
809 |
-
*
|
810 |
-
* @return
|
811 |
*/
|
812 |
-
public
|
813 |
-
return apply_filters( '
|
814 |
}
|
815 |
-
|
816 |
/**
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
/**
|
824 |
* Add links to support forum.
|
825 |
*
|
@@ -831,9 +965,7 @@ class Cookie_Notice {
|
|
831 |
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
832 |
return $links;
|
833 |
|
834 |
-
$
|
835 |
-
|
836 |
-
if ( $file == $plugin )
|
837 |
return array_merge( $links, array( sprintf( '<a href="http://www.dfactory.eu/support/forum/cookie-notice/" target="_blank">%s</a>', __( 'Support', 'cookie-notice' ) ) ) );
|
838 |
|
839 |
return $links;
|
@@ -850,9 +982,7 @@ class Cookie_Notice {
|
|
850 |
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
851 |
return $links;
|
852 |
|
853 |
-
$
|
854 |
-
|
855 |
-
if ( $file == $plugin )
|
856 |
array_unshift( $links, sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=cookie-notice' ), __( 'Settings', 'cookie-notice' ) ) );
|
857 |
|
858 |
return $links;
|
@@ -874,6 +1004,39 @@ class Cookie_Notice {
|
|
874 |
delete_option( 'cookie_notice_options' );
|
875 |
}
|
876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
/**
|
878 |
* Load scripts and styles - admin.
|
879 |
*/
|
@@ -907,53 +1070,70 @@ class Cookie_Notice {
|
|
907 |
'cookie-notice-front',
|
908 |
'cnArgs',
|
909 |
array(
|
910 |
-
'ajaxurl'
|
911 |
-
'hideEffect'
|
912 |
-
'onScroll'
|
913 |
-
'onScrollOffset'
|
914 |
-
'cookieName'
|
915 |
-
'cookieValue'
|
916 |
-
'cookieTime'
|
917 |
-
'cookiePath'
|
918 |
-
'cookieDomain'
|
919 |
-
'redirection'
|
920 |
-
'cache'
|
|
|
|
|
|
|
|
|
921 |
)
|
922 |
);
|
923 |
|
924 |
wp_enqueue_style( 'cookie-notice-front', plugins_url( 'css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
925 |
}
|
926 |
-
|
927 |
/**
|
928 |
-
* Print non functional
|
929 |
-
*
|
930 |
* @return mixed
|
931 |
*/
|
932 |
public function wp_print_footer_scripts() {
|
933 |
-
|
934 |
-
'
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
}
|
948 |
-
|
949 |
}
|
950 |
|
951 |
/**
|
952 |
-
*
|
953 |
-
*
|
954 |
-
* @return boolean
|
955 |
*/
|
956 |
function cn_cookies_accepted() {
|
957 |
return (bool) Cookie_Notice::cookies_accepted();
|
958 |
}
|
959 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
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.43
|
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.43
|
38 |
*/
|
39 |
class Cookie_Notice {
|
40 |
|
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',
|
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.43'
|
81 |
);
|
82 |
private $positions = array();
|
83 |
private $styles = array();
|
90 |
private $times = array();
|
91 |
private $script_placements = array();
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
/**
|
94 |
* Constructor.
|
95 |
*/
|
102 |
'general' => array_merge( $this->defaults['general'], get_option( 'cookie_notice_options', $this->defaults['general'] ) )
|
103 |
);
|
104 |
|
105 |
+
if ( ! isset( $this->options['general']['see_more_opt']['sync'] ) )
|
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( 'admin_init', array( $this, 'register_settings' ) );
|
113 |
add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
|
114 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
115 |
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
116 |
+
add_action( 'wp_head', array( $this, 'wp_print_header_scripts' ) );
|
117 |
add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
|
118 |
add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
|
119 |
|
120 |
// filters
|
121 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
122 |
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
123 |
+
add_filter( 'body_class', array( $this, 'change_body_class' ) );
|
124 |
}
|
125 |
|
126 |
/**
|
137 |
'wp-default' => __( 'WordPress', 'cookie-notice' ),
|
138 |
'bootstrap' => __( 'Bootstrap', 'cookie-notice' )
|
139 |
);
|
140 |
+
|
141 |
+
$this->revoke_opts = array(
|
142 |
+
'automatic' => __( 'Automatic', 'cookie-notice' ),
|
143 |
+
'manual' => __( 'Manual', 'cookie-notice' )
|
144 |
+
);
|
145 |
|
146 |
$this->links = array(
|
147 |
+
'page' => __( 'Page link', 'cookie-notice' ),
|
148 |
+
'custom' => __( 'Custom link', 'cookie-notice' )
|
149 |
);
|
150 |
|
151 |
$this->link_target = array(
|
159 |
);
|
160 |
|
161 |
$this->times = array(
|
162 |
+
'hour' => array( __( 'An hour', 'cookie-notice' ), 3600 ),
|
163 |
'day' => array( __( '1 day', 'cookie-notice' ), 86400 ),
|
164 |
'week' => array( __( '1 week', 'cookie-notice' ), 604800 ),
|
165 |
'month' => array( __( '1 month', 'cookie-notice' ), 2592000 ),
|
186 |
$this->options['general']['message_text'] = __( '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.', 'cookie-notice' );
|
187 |
$this->options['general']['accept_text'] = __( 'Ok', 'cookie-notice' );
|
188 |
$this->options['general']['refuse_text'] = __( 'No', 'cookie-notice' );
|
189 |
+
$this->options['general']['revoke_text'] = __( 'Revoke Cookies', 'cookie-notice' );
|
190 |
$this->options['general']['see_more_opt']['text'] = __( 'Read more', 'cookie-notice' );
|
191 |
|
192 |
update_option( 'cookie_notice_options', $this->options['general'] );
|
200 |
icl_register_string( 'Cookie Notice', 'Message in the notice', $this->options['general']['message_text'] );
|
201 |
icl_register_string( 'Cookie Notice', 'Button text', $this->options['general']['accept_text'] );
|
202 |
icl_register_string( 'Cookie Notice', 'Refuse button text', $this->options['general']['refuse_text'] );
|
203 |
+
icl_register_string( 'Cookie Notice', 'Revoke button text', $this->options['general']['revoke_text'] );
|
204 |
icl_register_string( 'Cookie Notice', 'Read more text', $this->options['general']['see_more_opt']['text'] );
|
205 |
icl_register_string( 'Cookie Notice', 'Custom link', $this->options['general']['see_more_opt']['link'] );
|
206 |
}
|
207 |
}
|
208 |
|
209 |
+
/**
|
210 |
+
* Add new body classes.
|
211 |
+
*
|
212 |
+
* @param array $classes Body classes
|
213 |
+
* @return array
|
214 |
+
*/
|
215 |
+
public function change_body_class( $classes ) {
|
216 |
+
if ( is_admin() )
|
217 |
+
return $classes;
|
218 |
+
|
219 |
+
if ( $this->cookies_set() ) {
|
220 |
+
$classes[] = 'cookies-set';
|
221 |
+
|
222 |
+
if ( $this->cookies_accepted() )
|
223 |
+
$classes[] = 'cookies-accepted';
|
224 |
+
else
|
225 |
+
$classes[] = 'cookies-refused';
|
226 |
+
} else
|
227 |
+
$classes[] = 'cookies-not-set';
|
228 |
+
|
229 |
+
return $classes;
|
230 |
+
}
|
231 |
+
|
232 |
/**
|
233 |
* Register shortcode.
|
234 |
*
|
235 |
* @return void
|
236 |
*/
|
237 |
public function register_shortcode() {
|
238 |
+
add_shortcode( 'cookies_accepted', array( $this, 'cookies_accepted_shortcode' ) );
|
239 |
+
add_shortcode( 'cookies_revoke', array( $this, 'cookies_revoke_shortcode' ) );
|
240 |
}
|
241 |
|
242 |
/**
|
246 |
* @param mixed $content
|
247 |
* @return mixed
|
248 |
*/
|
249 |
+
public function cookies_accepted_shortcode( $args, $content ) {
|
250 |
if ( $this->cookies_accepted() ) {
|
251 |
+
$scripts = html_entity_decode( trim( wp_kses( $content, $this->get_allowed_html() ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
|
253 |
if ( ! empty( $scripts ) )
|
254 |
return $scripts;
|
257 |
return '';
|
258 |
}
|
259 |
|
260 |
+
/**
|
261 |
+
* Register cookies accepted shortcode.
|
262 |
+
*
|
263 |
+
* @param array $args
|
264 |
+
* @param mixed $content
|
265 |
+
* @return mixed
|
266 |
+
*/
|
267 |
+
public function cookies_revoke_shortcode( $args, $content ) {
|
268 |
+
// get options
|
269 |
+
$options = $this->options['general'];
|
270 |
+
|
271 |
+
// defaults
|
272 |
+
$defaults = array(
|
273 |
+
'title' => __( 'Revoke Cookies', 'cookie-notice' ),
|
274 |
+
'class' => $options['css_class']
|
275 |
+
);
|
276 |
+
|
277 |
+
// combine shortcode arguments
|
278 |
+
$args = shortcode_atts( $defaults, $args );
|
279 |
+
|
280 |
+
// escape class(es)
|
281 |
+
$args['class'] = esc_attr( $args['class'] );
|
282 |
+
|
283 |
+
return '<a href="#" class="cn-revoke-cookie cn-button cn-revoke-inline' . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $args['class'] !== '' ? ' ' . $args['class'] : '' ) . '">' . esc_html( $args['title'] ) . '</a>';
|
284 |
+
}
|
285 |
+
|
286 |
/**
|
287 |
* Register WPML (>= 3.2) strings if needed.
|
288 |
*
|
296 |
'Message in the notice' => $this->options['general']['message_text'],
|
297 |
'Button text' => $this->options['general']['accept_text'],
|
298 |
'Refuse button text' => $this->options['general']['refuse_text'],
|
299 |
+
'Revoke button text' => $this->options['general']['revoke_text'],
|
300 |
'Read more text' => $this->options['general']['see_more_opt']['text'],
|
301 |
'Custom link' => $this->options['general']['see_more_opt']['link']
|
302 |
);
|
325 |
* Add submenu.
|
326 |
*/
|
327 |
public function admin_menu_options() {
|
328 |
+
add_options_page( __( 'Cookie Notice', 'cookie-notice' ), __( 'Cookie Notice', 'cookie-notice' ), apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ), 'cookie-notice', array( $this, 'options_page' ) );
|
|
|
|
|
329 |
}
|
330 |
|
331 |
/**
|
381 |
add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
|
382 |
add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
383 |
add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
384 |
+
add_settings_field( 'cn_see_more', __( 'Privacy policy', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
385 |
add_settings_field( 'cn_link_target', __( 'Link target', 'cookie-notice' ), array( $this, 'cn_link_target' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
386 |
+
add_settings_field( 'cn_refuse_opt', __( 'Refuse cookies', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
387 |
+
add_settings_field( 'cn_revoke_opt', __( 'Revoke cookies', 'cookie-notice' ), array( $this, 'cn_revoke_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
388 |
add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
389 |
add_settings_field( 'cn_redirection', __( 'Reloading', 'cookie-notice' ), array( $this, 'cn_redirection' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
390 |
add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
397 |
add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
|
398 |
add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
|
399 |
add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
|
400 |
+
add_settings_field( 'cn_css_class', __( 'Button class', 'cookie-notice' ), array( $this, 'cn_css_class' ), 'cookie_notice_options', 'cookie_notice_design' );
|
401 |
add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
|
402 |
}
|
403 |
|
412 |
*/
|
413 |
public function cn_deactivation_delete() {
|
414 |
echo '
|
415 |
+
<fieldset>
|
416 |
+
<label><input id="cn_deactivation_delete" type="checkbox" name="cookie_notice_options[deactivation_delete]" value="1" ' . checked( 'yes', $this->options['general']['deactivation_delete'], false ) . '/>' . __( 'Enable if you want all plugin data to be deleted on deactivation.', 'cookie-notice' ) . '</label>
|
417 |
+
</fieldset>';
|
418 |
}
|
419 |
|
420 |
/**
|
422 |
*/
|
423 |
public function cn_message_text() {
|
424 |
echo '
|
425 |
+
<fieldset>
|
426 |
+
<div id="cn_message_text">
|
427 |
+
<textarea name="cookie_notice_options[message_text]" class="large-text" cols="50" rows="5">' . esc_textarea( $this->options['general']['message_text'] ) . '</textarea>
|
428 |
+
<p class="description">' . __( 'Enter the cookie notice message.', 'cookie-notice' ) . '</p>
|
429 |
+
</div>
|
430 |
+
</fieldset>';
|
431 |
}
|
432 |
|
433 |
/**
|
435 |
*/
|
436 |
public function cn_accept_text() {
|
437 |
echo '
|
438 |
+
<fieldset>
|
439 |
+
<div id="cn_accept_text">
|
440 |
+
<input type="text" class="regular-text" name="cookie_notice_options[accept_text]" value="' . esc_attr( $this->options['general']['accept_text'] ) . '" />
|
441 |
<p class="description">' . __( 'The text of the option to accept the usage of the cookies and make the notification disappear.', 'cookie-notice' ) . '</p>
|
442 |
+
</div>
|
443 |
+
</fieldset>';
|
444 |
}
|
445 |
|
446 |
/**
|
449 |
public function cn_refuse_opt() {
|
450 |
echo '
|
451 |
<fieldset>
|
452 |
+
<label><input id="cn_refuse_opt" type="checkbox" name="cookie_notice_options[refuse_opt]" value="1" ' . checked( 'yes', $this->options['general']['refuse_opt'], false ) . ' />' . __( 'Enable to give to the user the possibility to refuse third party non functional cookies.', 'cookie-notice' ) . '</label>
|
453 |
+
<div id="cn_refuse_opt_container"' . ( $this->options['general']['refuse_opt'] === 'no' ? ' style="display: none;"' : '' ) . '>
|
|
|
454 |
<div id="cn_refuse_text">
|
455 |
<input type="text" class="regular-text" name="cookie_notice_options[refuse_text]" value="' . esc_attr( $this->options['general']['refuse_text'] ) . '" />
|
456 |
+
<p class="description">' . __( 'The text of the button to refuse the usage of the cookies.', 'cookie-notice' ) . '</p>
|
457 |
+
</div>
|
|
|
458 |
</div>
|
459 |
</fieldset>';
|
460 |
}
|
463 |
* Non functional cookies code.
|
464 |
*/
|
465 |
public function cn_refuse_code() {
|
466 |
+
$allowed_html = $this->get_allowed_html();
|
467 |
+
$active = ! empty( $this->options['general']['refuse_code'] ) && empty( $this->options['general']['refuse_code_head'] ) ? 'body' : 'head';
|
468 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
echo '
|
470 |
+
<fieldset>
|
471 |
<div id="cn_refuse_code">
|
472 |
+
<div id="cn_refuse_code_fields">
|
473 |
+
<h2 class="nav-tab-wrapper">
|
474 |
+
<a id="refuse_head-tab" class="nav-tab' . ( $active === 'head' ? ' nav-tab-active' : '' ) . '" href="#refuse_head">' . __( 'Head', 'cookie-notice' ) . '</a>
|
475 |
+
<a id="refuse_body-tab" class="nav-tab' . ( $active === 'body' ? ' nav-tab-active' : '' ) . '" href="#refuse_body">' . __( 'Body', 'cookie-notice' ) . '</a>
|
476 |
+
</h2>
|
477 |
+
<div id="refuse_head" class="refuse-code-tab' . ( $active === 'head' ? ' active' : '' ) . '">
|
478 |
+
<p class="description">' . __( 'The code to be used in your site header, before the closing head tag.', 'cookie-notice' ) . '</p>
|
479 |
+
<textarea name="cookie_notice_options[refuse_code_head]" class="large-text" cols="50" rows="8">' . html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code_head'], $allowed_html ) ) ) . '</textarea>
|
480 |
+
</div>
|
481 |
+
<div id="refuse_body" class="refuse-code-tab' . ( $active === 'body' ? ' active' : '' ) . '">
|
482 |
+
<p class="description">' . __( 'The code to be used in your site footer, before the closing body tag.', 'cookie-notice' ) . '</p>
|
483 |
+
<textarea name="cookie_notice_options[refuse_code]" class="large-text" cols="50" rows="8">' . html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code'], $allowed_html ) ) ) . '</textarea>
|
484 |
+
</div>
|
485 |
+
</div>
|
486 |
<p class="description">' . __( 'Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted.', 'cookie-notice' ) . '</br>' . __( 'To get the cookie notice status use <code>cn_cookies_accepted()</code> function.', 'cookie-notice' ) . '</p>
|
487 |
+
</div>
|
488 |
+
</fieldset>';
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Revoke cookies option.
|
493 |
+
*/
|
494 |
+
public function cn_revoke_opt() {
|
495 |
+
echo '
|
496 |
+
<fieldset>
|
497 |
+
<label><input id="cn_revoke_cookies" type="checkbox" name="cookie_notice_options[revoke_cookies]" value="1" ' . checked( true, $this->options['general']['revoke_cookies'], false ) . ' />' . __( 'Enable to give to the user the possibility to revoke their cookie consent <i>(requires "Refuse cookies" option enabled)</i>.', 'cookie-notice' ) . '</label>
|
498 |
+
<div id="cn_revoke_opt_container"' . ( $this->options['general']['revoke_cookies'] ? '' : ' style="display: none;"' ) . '>
|
499 |
+
<input type="text" class="regular-text" name="cookie_notice_options[revoke_text]" value="' . esc_attr( $this->options['general']['revoke_text'] ) . '" />
|
500 |
+
<p class="description">' . __( 'The text of the button to revoke the cookie consent.', 'cookie-notice' ) . '</p>';
|
501 |
+
|
502 |
+
foreach ( $this->revoke_opts as $value => $label ) {
|
503 |
+
echo '
|
504 |
+
<label><input id="cn_revoke_cookies-' . $value . '" type="radio" name="cookie_notice_options[revoke_cookies_opt]" value="' . $value . '" ' . checked( $value, $this->options['general']['revoke_cookies_opt'], false ) . ' />' . esc_html( $label ) . '</label>';
|
505 |
+
}
|
506 |
+
|
507 |
+
echo '
|
508 |
+
<p class="description">' . __( 'Select the method for displaying the revoke button - automatic (in the Cookie Notice container) or manual using <code>[cookies_revoke]</code> shortcode.', 'cookie-notice' ) . '</p>
|
509 |
+
</div>
|
510 |
+
</fieldset>';
|
511 |
}
|
512 |
|
513 |
/**
|
515 |
*/
|
516 |
public function cn_redirection() {
|
517 |
echo '
|
518 |
+
<fieldset>
|
519 |
+
<label><input id="cn_redirection" type="checkbox" name="cookie_notice_options[redirection]" value="1" ' . checked( true, $this->options['general']['redirection'], false ) . ' />' . __( 'Enable to reload the page after cookies are accepted.', 'cookie-notice' ) . '</label>
|
520 |
+
</fieldset>';
|
521 |
}
|
522 |
|
523 |
/**
|
524 |
* Read more link option.
|
525 |
*/
|
526 |
public function cn_see_more() {
|
|
|
527 |
$pages = get_pages(
|
528 |
array(
|
529 |
'sort_order' => 'ASC',
|
536 |
'post_status' => 'publish'
|
537 |
)
|
538 |
);
|
|
|
|
|
|
|
|
|
539 |
|
540 |
echo '
|
541 |
<fieldset>
|
542 |
+
<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>
|
543 |
+
<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>
|
544 |
+
<div id="cn_see_more_opt"' . ($this->options['general']['see_more'] === 'no' ? ' style="display: none;"' : '') . '>
|
545 |
+
<input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][text]" value="' . esc_attr( $this->options['general']['see_more_opt']['text'] ) . '" />
|
546 |
+
<p class="description">' . __( 'The text of the more info button.', 'cookie-notice' ) . '</p>
|
547 |
+
<div id="cn_see_more_opt_custom_link">';
|
548 |
+
|
549 |
+
foreach ( $this->links as $value => $label ) {
|
550 |
+
$value = esc_attr( $value );
|
551 |
|
552 |
+
echo '
|
553 |
<label><input id="cn_see_more_link-' . $value . '" type="radio" name="cookie_notice_options[see_more_opt][link_type]" value="' . $value . '" ' . checked( $value, $this->options['general']['see_more_opt']['link_type'], false ) . ' />' . esc_html( $label ) . '</label>';
|
|
|
554 |
}
|
555 |
|
556 |
echo '
|
557 |
+
</div>
|
558 |
+
<p class="description">' . __( 'Select where to redirect user for more information about cookies.', 'cookie-notice' ) . '</p>
|
559 |
+
<div id="cn_see_more_opt_page"' . ($this->options['general']['see_more_opt']['link_type'] === 'custom' ? ' style="display: none;"' : '') . '>
|
560 |
+
<select name="cookie_notice_options[see_more_opt][id]">
|
561 |
+
<option value="empty" ' . selected( 'empty', $this->options['general']['see_more_opt']['id'], false ) . '>' . __( '-- select page --', 'cookie-notice' ) . '</option>';
|
562 |
|
563 |
if ( $pages ) {
|
564 |
foreach ( $pages as $page ) {
|
568 |
}
|
569 |
|
570 |
echo '
|
571 |
+
</select>
|
572 |
+
<p class="description">' . __( 'Select from one of your site\'s pages.', 'cookie-notice' ) . '</p>';
|
573 |
+
|
574 |
+
global $wp_version;
|
575 |
+
|
576 |
+
if ( version_compare( $wp_version, '4.9.6', '>=' ) ) {
|
577 |
+
echo '
|
578 |
+
<label><input id="cn_see_more_opt_sync" type="checkbox" name="cookie_notice_options[see_more_opt][sync]" value="1" ' . checked( true, $this->options['general']['see_more_opt']['sync'], false ) . ' />' . __( 'Synchronize with WordPress Privacy Policy page.', 'cookie-notice' ) . '</label>';
|
579 |
+
}
|
580 |
+
|
581 |
+
echo '
|
582 |
+
</div>
|
583 |
+
<div id="cn_see_more_opt_link"' . ($this->options['general']['see_more_opt']['link_type'] === 'page' ? ' style="display: none;"' : '') . '>
|
584 |
+
<input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][link]" value="' . esc_attr( $this->options['general']['see_more_opt']['link'] ) . '" />
|
585 |
+
<p class="description">' . __( 'Enter the full URL starting with http(s)://', 'cookie-notice' ) . '</p>
|
586 |
+
</div>
|
587 |
</div>
|
|
|
588 |
</fieldset>';
|
589 |
}
|
590 |
|
593 |
*/
|
594 |
public function cn_link_target() {
|
595 |
echo '
|
596 |
+
<fieldset>
|
597 |
+
<div id="cn_link_target">
|
598 |
+
<select name="cookie_notice_options[link_target]">';
|
599 |
|
600 |
foreach ( $this->link_target as $target ) {
|
601 |
+
echo '
|
602 |
+
<option value="' . $target . '" ' . selected( $target, $this->options['general']['link_target'] ) . '>' . esc_html( $target ) . '</option>';
|
603 |
}
|
604 |
|
605 |
echo '
|
606 |
+
</select>
|
607 |
+
<p class="description">' . __( 'Select the privacy policy link target.', 'cookie-notice' ) . '</p>
|
608 |
+
</div>
|
609 |
+
</fieldset>';
|
610 |
}
|
611 |
|
612 |
/**
|
614 |
*/
|
615 |
public function cn_time() {
|
616 |
echo '
|
617 |
+
<fieldset>
|
618 |
+
<div id="cn_time">
|
619 |
+
<select name="cookie_notice_options[time]">';
|
620 |
|
621 |
foreach ( $this->times as $time => $arr ) {
|
622 |
$time = esc_attr( $time );
|
623 |
|
624 |
+
echo '
|
625 |
+
<option value="' . $time . '" ' . selected( $time, $this->options['general']['time'] ) . '>' . esc_html( $arr[0] ) . '</option>';
|
626 |
}
|
627 |
|
628 |
echo '
|
629 |
+
</select>
|
630 |
+
<p class="description">' . __( 'The ammount of time that cookie should be stored for.', 'cookie-notice' ) . '</p>
|
631 |
+
</div>
|
632 |
+
</fieldset>';
|
633 |
}
|
634 |
|
635 |
/**
|
636 |
* Script placement option.
|
637 |
*/
|
638 |
public function cn_script_placement() {
|
639 |
+
echo '
|
640 |
+
<fieldset>';
|
641 |
+
|
642 |
foreach ( $this->script_placements as $value => $label ) {
|
643 |
echo '
|
644 |
<label><input id="cn_script_placement-' . $value . '" type="radio" name="cookie_notice_options[script_placement]" value="' . esc_attr( $value ) . '" ' . checked( $value, $this->options['general']['script_placement'], false ) . ' />' . esc_html( $label ) . '</label>';
|
645 |
}
|
646 |
|
647 |
echo '
|
648 |
+
<p class="description">' . __( 'Select where all the plugin scripts should be placed.', 'cookie-notice' ) . '</p>
|
649 |
+
</fieldset>';
|
650 |
}
|
651 |
|
652 |
/**
|
654 |
*/
|
655 |
public function cn_position() {
|
656 |
echo '
|
657 |
+
<fieldset>
|
658 |
+
<div id="cn_position">';
|
659 |
|
660 |
foreach ( $this->positions as $value => $label ) {
|
661 |
$value = esc_attr( $value );
|
662 |
|
663 |
echo '
|
664 |
+
<label><input id="cn_position-' . $value . '" type="radio" name="cookie_notice_options[position]" value="' . $value . '" ' . checked( $value, $this->options['general']['position'], false ) . ' />' . esc_html( $label ) . '</label>';
|
665 |
}
|
666 |
|
667 |
echo '
|
668 |
+
<p class="description">' . __( 'Select location for your cookie notice.', 'cookie-notice' ) . '</p>
|
669 |
+
</div>
|
670 |
+
</fieldset>';
|
671 |
}
|
672 |
|
673 |
/**
|
675 |
*/
|
676 |
public function cn_hide_effect() {
|
677 |
echo '
|
678 |
+
<fieldset>
|
679 |
+
<div id="cn_hide_effect">';
|
680 |
|
681 |
foreach ( $this->effects as $value => $label ) {
|
682 |
$value = esc_attr( $value );
|
683 |
|
684 |
echo '
|
685 |
+
<label><input id="cn_hide_effect-' . $value . '" type="radio" name="cookie_notice_options[hide_effect]" value="' . $value . '" ' . checked( $value, $this->options['general']['hide_effect'], false ) . ' />' . esc_html( $label ) . '</label>';
|
686 |
}
|
687 |
|
688 |
echo '
|
689 |
+
<p class="description">' . __( 'Cookie notice acceptance animation.', 'cookie-notice' ) . '</p>
|
690 |
+
</div>
|
691 |
+
</fieldset>';
|
692 |
}
|
693 |
|
694 |
/**
|
697 |
public function cn_on_scroll() {
|
698 |
echo '
|
699 |
<fieldset>
|
700 |
+
<label><input id="cn_on_scroll" type="checkbox" name="cookie_notice_options[on_scroll]" value="1" ' . checked( 'yes', $this->options['general']['on_scroll'], false ) . ' />' . __( 'Enable cookie notice acceptance when users scroll.', 'cookie-notice' ) . '</label>
|
|
|
701 |
<div id="cn_on_scroll_offset"' . ( $this->options['general']['on_scroll'] === 'no' || $this->options['general']['on_scroll'] == false ? ' style="display: none;"' : '' ) . '>
|
702 |
<input type="text" class="text" name="cookie_notice_options[on_scroll_offset]" value="' . esc_attr( $this->options['general']['on_scroll_offset'] ) . '" /> <span>px</span>
|
703 |
<p class="description">' . __( 'Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear.', 'cookie-notice' ) . '</p>
|
710 |
*/
|
711 |
public function cn_css_style() {
|
712 |
echo '
|
713 |
+
<fieldset>
|
714 |
+
<div id="cn_css_style">';
|
715 |
|
716 |
foreach ( $this->styles as $value => $label ) {
|
717 |
$value = esc_attr( $value );
|
718 |
|
719 |
echo '
|
720 |
+
<label><input id="cn_css_style-' . $value . '" type="radio" name="cookie_notice_options[css_style]" value="' . $value . '" ' . checked( $value, $this->options['general']['css_style'], false ) . ' />' . esc_html( $label ) . '</label>';
|
721 |
}
|
722 |
|
723 |
echo '
|
724 |
+
<p class="description">' . __( 'Choose buttons style.', 'cookie-notice' ) . '</p>
|
725 |
+
</div>
|
726 |
+
</fieldset>';
|
727 |
+
}
|
728 |
+
|
729 |
+
/**
|
730 |
+
* CSS style option.
|
731 |
+
*/
|
732 |
+
public function cn_css_class() {
|
733 |
+
echo '
|
734 |
+
<fieldset>
|
735 |
+
<div id="cn_css_class">
|
736 |
+
<input type="text" class="regular-text" name="cookie_notice_options[css_class]" value="' . esc_attr( $this->options['general']['css_class'] ) . '" />
|
737 |
+
<p class="description">' . __( 'Enter additional button CSS classes separated by spaces.', 'cookie-notice' ) . '</p>
|
738 |
+
</div>
|
739 |
+
</fieldset>';
|
740 |
}
|
741 |
|
742 |
/**
|
766 |
* @return array
|
767 |
*/
|
768 |
public function validate_options( $input ) {
|
|
|
769 |
if ( ! check_admin_referer( 'cookie_notice_options-options') )
|
770 |
return $input;
|
771 |
+
|
772 |
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
773 |
return $input;
|
774 |
|
784 |
$input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : $this->defaults['general']['message_text'] );
|
785 |
$input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : $this->defaults['general']['accept_text'] );
|
786 |
$input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : $this->defaults['general']['refuse_text'] );
|
787 |
+
$input['revoke_text'] = sanitize_text_field( isset( $input['revoke_text'] ) && $input['revoke_text'] !== '' ? $input['revoke_text'] : $this->defaults['general']['revoke_text'] );
|
788 |
$input['refuse_opt'] = (bool) isset( $input['refuse_opt'] ) ? 'yes' : 'no';
|
789 |
+
$input['revoke_cookies'] = isset( $input['revoke_cookies'] );
|
790 |
+
$input['revoke_cookies_opt'] = isset( $input['revoke_cookies_opt'] ) && array_key_exists( $input['revoke_cookies_opt'], $this->revoke_opts ) ? $input['revoke_cookies_opt'] : $this->defaults['general']['revoke_cookies_opt'];
|
791 |
+
|
792 |
+
// get allowed HTML
|
793 |
+
$allowed_html = $this->get_allowed_html();
|
794 |
+
|
795 |
+
// body refuse code
|
|
|
|
|
|
|
|
|
796 |
$input['refuse_code'] = wp_kses( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : $this->defaults['general']['refuse_code'], $allowed_html );
|
797 |
|
798 |
+
// head refuse code
|
799 |
+
$input['refuse_code_head'] = wp_kses( isset( $input['refuse_code_head'] ) && $input['refuse_code_head'] !== '' ? $input['refuse_code_head'] : $this->defaults['general']['refuse_code_head'], $allowed_html );
|
800 |
+
|
801 |
+
// css button style
|
802 |
$input['css_style'] = sanitize_text_field( isset( $input['css_style'] ) && in_array( $input['css_style'], array_keys( $this->styles ) ) ? $input['css_style'] : $this->defaults['general']['css_style'] );
|
803 |
|
804 |
+
// css button class
|
805 |
+
$input['css_class'] = sanitize_text_field( isset( $input['css_class'] ) ? $input['css_class'] : $this->defaults['general']['css_class'] );
|
806 |
+
|
807 |
// link target
|
808 |
$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'] );
|
809 |
|
835 |
|
836 |
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
837 |
$input['see_more_opt']['link'] = esc_url( $input['see_more'] === 'yes' ? $input['see_more_opt']['link'] : 'empty' );
|
838 |
+
elseif ( $input['see_more_opt']['link_type'] === 'page' ) {
|
839 |
$input['see_more_opt']['id'] = ( $input['see_more'] === 'yes' ? (int) $input['see_more_opt']['id'] : 'empty' );
|
840 |
+
$input['see_more_opt']['sync'] = isset( $input['see_more_opt']['sync'] );
|
841 |
+
|
842 |
+
if ( $input['see_more_opt']['sync'] )
|
843 |
+
update_option( 'wp_page_for_privacy_policy', $input['see_more_opt']['id'] );
|
844 |
+
}
|
845 |
|
846 |
$input['translate'] = false;
|
847 |
|
850 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Message in the notice', $input['message_text'] );
|
851 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Button text', $input['accept_text'] );
|
852 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Refuse button text', $input['refuse_text'] );
|
853 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke button text', $input['revoke_text'] );
|
854 |
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Read more text', $input['see_more_opt']['text'] );
|
855 |
|
856 |
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
873 |
* @return mixed
|
874 |
*/
|
875 |
public function add_cookie_notice() {
|
876 |
+
if ( ! $this->cookies_set() || $this->options['general']['refuse_opt'] === 'yes' ) {
|
877 |
// WPML >= 3.2
|
878 |
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
879 |
$this->options['general']['message_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['message_text'], 'Cookie Notice', 'Message in the notice' );
|
880 |
$this->options['general']['accept_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['accept_text'], 'Cookie Notice', 'Button text' );
|
881 |
$this->options['general']['refuse_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['refuse_text'], 'Cookie Notice', 'Refuse button text' );
|
882 |
+
$this->options['general']['revoke_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['revoke_text'], 'Cookie Notice', 'Revoke button text' );
|
883 |
$this->options['general']['see_more_opt']['text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['see_more_opt']['text'], 'Cookie Notice', 'Read more text' );
|
884 |
$this->options['general']['see_more_opt']['link'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['see_more_opt']['link'], 'Cookie Notice', 'Custom link' );
|
885 |
// WPML and Polylang compatibility
|
887 |
$this->options['general']['message_text'] = icl_t( 'Cookie Notice', 'Message in the notice', $this->options['general']['message_text'] );
|
888 |
$this->options['general']['accept_text'] = icl_t( 'Cookie Notice', 'Button text', $this->options['general']['accept_text'] );
|
889 |
$this->options['general']['refuse_text'] = icl_t( 'Cookie Notice', 'Refuse button text', $this->options['general']['refuse_text'] );
|
890 |
+
$this->options['general']['revoke_text'] = icl_t( 'Cookie Notice', 'Revoke button text', $this->options['general']['revoke_text'] );
|
891 |
$this->options['general']['see_more_opt']['text'] = icl_t( 'Cookie Notice', 'Read more text', $this->options['general']['see_more_opt']['text'] );
|
892 |
$this->options['general']['see_more_opt']['link'] = icl_t( 'Cookie Notice', 'Custom link', $this->options['general']['see_more_opt']['link'] );
|
893 |
}
|
899 |
$options = apply_filters( 'cn_cookie_notice_args', array(
|
900 |
'position' => $this->options['general']['position'],
|
901 |
'css_style' => $this->options['general']['css_style'],
|
902 |
+
'css_class' => $this->options['general']['css_class'],
|
903 |
+
'button_class' => 'cn-button',
|
904 |
'colors' => $this->options['general']['colors'],
|
905 |
'message_text' => $this->options['general']['message_text'],
|
906 |
'accept_text' => $this->options['general']['accept_text'],
|
907 |
'refuse_text' => $this->options['general']['refuse_text'],
|
908 |
+
'revoke_text' => $this->options['general']['revoke_text'],
|
909 |
'refuse_opt' => $this->options['general']['refuse_opt'],
|
910 |
'see_more' => $this->options['general']['see_more'],
|
911 |
'see_more_opt' => $this->options['general']['see_more_opt'],
|
912 |
'link_target' => $this->options['general']['link_target'],
|
913 |
) );
|
914 |
|
915 |
+
$options['css_class'] = esc_attr( $options['css_class'] );
|
916 |
+
|
917 |
// message output
|
918 |
$output = '
|
919 |
+
<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'] . ';">'
|
920 |
. '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>'
|
921 |
+
. '<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>'
|
922 |
+
. ( $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>' : '' )
|
923 |
+
. ( $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>' : '' ) . '
|
924 |
</div>
|
925 |
+
' . ( $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>' : '' ) . '
|
926 |
</div>';
|
927 |
|
928 |
echo apply_filters( 'cn_cookie_notice_output', $output, $options );
|
930 |
}
|
931 |
|
932 |
/**
|
933 |
+
* Check if cookies are accepted.
|
934 |
*
|
935 |
* @return bool
|
936 |
*/
|
937 |
+
public static function cookies_accepted() {
|
938 |
+
return apply_filters( 'cn_is_cookie_accepted', isset( $_COOKIE['cookie_notice_accepted'] ) && $_COOKIE['cookie_notice_accepted'] === 'true' );
|
939 |
}
|
940 |
|
941 |
/**
|
942 |
+
* Check if cookies are set.
|
943 |
+
*
|
944 |
+
* @return boolean Whether cookies are set
|
945 |
*/
|
946 |
+
public function cookies_set() {
|
947 |
+
return apply_filters( 'cn_is_cookie_set', isset( $_COOKIE['cookie_notice_accepted'] ) );
|
948 |
}
|
949 |
+
|
950 |
/**
|
951 |
+
* Get default settings.
|
952 |
+
*/
|
953 |
+
public function get_defaults() {
|
954 |
+
return $this->defaults;
|
955 |
+
}
|
956 |
+
|
957 |
/**
|
958 |
* Add links to support forum.
|
959 |
*
|
965 |
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
966 |
return $links;
|
967 |
|
968 |
+
if ( $file == plugin_basename( __FILE__ ) )
|
|
|
|
|
969 |
return array_merge( $links, array( sprintf( '<a href="http://www.dfactory.eu/support/forum/cookie-notice/" target="_blank">%s</a>', __( 'Support', 'cookie-notice' ) ) ) );
|
970 |
|
971 |
return $links;
|
982 |
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
983 |
return $links;
|
984 |
|
985 |
+
if ( $file == plugin_basename( __FILE__ ) )
|
|
|
|
|
986 |
array_unshift( $links, sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=cookie-notice' ), __( 'Settings', 'cookie-notice' ) ) );
|
987 |
|
988 |
return $links;
|
1004 |
delete_option( 'cookie_notice_options' );
|
1005 |
}
|
1006 |
|
1007 |
+
/**
|
1008 |
+
* Get allowed script blocking HTML.
|
1009 |
+
*
|
1010 |
+
* @return array
|
1011 |
+
*/
|
1012 |
+
public function get_allowed_html() {
|
1013 |
+
return apply_filters(
|
1014 |
+
'cn_refuse_code_allowed_html',
|
1015 |
+
array_merge(
|
1016 |
+
wp_kses_allowed_html( 'post' ),
|
1017 |
+
array(
|
1018 |
+
'script' => array(
|
1019 |
+
'type' => array(),
|
1020 |
+
'src' => array(),
|
1021 |
+
'charset' => array(),
|
1022 |
+
'async' => array()
|
1023 |
+
),
|
1024 |
+
'noscript' => array(),
|
1025 |
+
'style' => array(
|
1026 |
+
'types' => array()
|
1027 |
+
),
|
1028 |
+
'iframe' => array(
|
1029 |
+
'src' => array(),
|
1030 |
+
'height' => array(),
|
1031 |
+
'width' => array(),
|
1032 |
+
'frameborder' => array(),
|
1033 |
+
'allowfullscreen' => array()
|
1034 |
+
)
|
1035 |
+
)
|
1036 |
+
)
|
1037 |
+
);
|
1038 |
+
}
|
1039 |
+
|
1040 |
/**
|
1041 |
* Load scripts and styles - admin.
|
1042 |
*/
|
1070 |
'cookie-notice-front',
|
1071 |
'cnArgs',
|
1072 |
array(
|
1073 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
1074 |
+
'hideEffect' => $this->options['general']['hide_effect'],
|
1075 |
+
'onScroll' => $this->options['general']['on_scroll'],
|
1076 |
+
'onScrollOffset' => $this->options['general']['on_scroll_offset'],
|
1077 |
+
'cookieName' => 'cookie_notice_accepted',
|
1078 |
+
'cookieValue' => 'true',
|
1079 |
+
'cookieTime' => $this->times[$this->options['general']['time']][1],
|
1080 |
+
'cookiePath' => ( defined( 'COOKIEPATH' ) ? COOKIEPATH : '' ),
|
1081 |
+
'cookieDomain' => ( defined( 'COOKIE_DOMAIN' ) ? COOKIE_DOMAIN : '' ),
|
1082 |
+
'redirection' => $this->options['general']['redirection'],
|
1083 |
+
'cache' => defined( 'WP_CACHE' ) && WP_CACHE,
|
1084 |
+
'refuse' => $this->options['general']['refuse_opt'],
|
1085 |
+
'revoke_cookies' => (int) $this->options['general']['revoke_cookies'],
|
1086 |
+
'revoke_cookies_opt' => $this->options['general']['revoke_cookies_opt'],
|
1087 |
+
'secure' => (int) is_ssl()
|
1088 |
)
|
1089 |
);
|
1090 |
|
1091 |
wp_enqueue_style( 'cookie-notice-front', plugins_url( 'css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
1092 |
}
|
1093 |
+
|
1094 |
/**
|
1095 |
+
* Print non functional JavaScript in body.
|
1096 |
+
*
|
1097 |
* @return mixed
|
1098 |
*/
|
1099 |
public function wp_print_footer_scripts() {
|
1100 |
+
if ( $this->cookies_accepted() ) {
|
1101 |
+
$scripts = apply_filters( 'cn_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code'], $this->get_allowed_html() ) ) ) );
|
1102 |
+
|
1103 |
+
if ( ! empty( $scripts ) )
|
1104 |
+
echo $scripts;
|
1105 |
+
}
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
/**
|
1109 |
+
* Print non functional JavaScript in header.
|
1110 |
+
*
|
1111 |
+
* @return mixed
|
1112 |
+
*/
|
1113 |
+
public function wp_print_header_scripts() {
|
1114 |
+
if ( $this->cookies_accepted() ) {
|
1115 |
+
$scripts = apply_filters( 'cn_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code_head'], $this->get_allowed_html() ) ) ) );
|
1116 |
+
|
1117 |
+
if ( ! empty( $scripts ) )
|
1118 |
+
echo $scripts;
|
1119 |
+
}
|
1120 |
}
|
|
|
1121 |
}
|
1122 |
|
1123 |
/**
|
1124 |
+
* Check if cookies are accepted.
|
1125 |
+
*
|
1126 |
+
* @return boolean Whether cookies are accepted
|
1127 |
*/
|
1128 |
function cn_cookies_accepted() {
|
1129 |
return (bool) Cookie_Notice::cookies_accepted();
|
1130 |
}
|
1131 |
+
|
1132 |
+
/**
|
1133 |
+
* Check if cookies are set.
|
1134 |
+
*
|
1135 |
+
* @return boolean Whether cookies are set
|
1136 |
+
*/
|
1137 |
+
function cn_cookies_set() {
|
1138 |
+
return (bool) Cookie_Notice::cookies_set();
|
1139 |
+
}
|
css/admin.css
CHANGED
@@ -64,12 +64,6 @@
|
|
64 |
width: 100%;
|
65 |
}
|
66 |
|
67 |
-
.cookie-notice-settings fieldset span.description {
|
68 |
-
margin-bottom: 8px;
|
69 |
-
margin-top: 4px;
|
70 |
-
display: block;
|
71 |
-
}
|
72 |
-
|
73 |
.cookie-notice-settings .ui-button {
|
74 |
margin-bottom: 5px;
|
75 |
}
|
@@ -88,6 +82,22 @@
|
|
88 |
vertical-align: middle;
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
/* All Mobile Sizes (devices and browser) */
|
92 |
@media only screen and (max-width: 959px) {
|
93 |
.df-credits {
|
@@ -99,4 +109,4 @@
|
|
99 |
.cookie-notice-settings {
|
100 |
margin-right: 0;
|
101 |
}
|
102 |
-
}
|
64 |
width: 100%;
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
.cookie-notice-settings .ui-button {
|
68 |
margin-bottom: 5px;
|
69 |
}
|
82 |
vertical-align: middle;
|
83 |
}
|
84 |
|
85 |
+
#cn_refuse_code .nav-tab-wrapper {
|
86 |
+
padding-top: 0;
|
87 |
+
}
|
88 |
+
|
89 |
+
#cn_refuse_code .refuse-code-tab {
|
90 |
+
display: none;
|
91 |
+
}
|
92 |
+
|
93 |
+
#cn_refuse_code .refuse-code-tab.active {
|
94 |
+
display: block;
|
95 |
+
}
|
96 |
+
|
97 |
+
#cn_refuse_code .refuse-code-tab .description {
|
98 |
+
margin-top: 10px;
|
99 |
+
}
|
100 |
+
|
101 |
/* All Mobile Sizes (devices and browser) */
|
102 |
@media only screen and (max-width: 959px) {
|
103 |
.df-credits {
|
109 |
.cookie-notice-settings {
|
110 |
margin-right: 0;
|
111 |
}
|
112 |
+
}
|
css/admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.df-credits{float:right;width:280px;background:#fff;margin:20px -300px 20px 20px;position:relative;box-shadow:0 0 0 1px rgba(0,0,0
|
1 |
+
.df-credits{float:right;width:280px;background:#fff;margin:20px -300px 20px 20px;position:relative;box-shadow:0 0 0 1px rgba(0,0,0,0.05)}.df-credits .inner{padding-left:10px;padding-right:10px}.df-credits h3{font-size:14px;line-height:1.4;margin:0;padding:8px 12px;border-bottom:1px solid #eee}.df-credits .df-link{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-style:italic;padding-bottom:10px;margin:0}.df-credits .df-link a{vertical-align:middle;padding:5px 0 0 4px}.df-promo h4{margin-bottom:0}.cookie-notice-settings .df-credits form{min-width:260px;margin-bottom:1em}.cookie-notice-settings .df-credits form input{margin:0;padding:0}.cookie-notice-settings{margin-right:300px}.cookie-notice-settings hr,.df-credits hr{border:solid #eee;border-width:1px 0 0;clear:both;height:0}.cookie-notice-settings form{float:left;min-width:463px;width:100%}.cookie-notice-settings .ui-button{margin-bottom:5px}.cookie-notice-settings .description{font-size:13px;margin-bottom:8px}#cn_colors label{min-width:10em;display:inline-block}#cn_colors div{vertical-align:middle}#cn_refuse_code .nav-tab-wrapper{padding-top:0}#cn_refuse_code .refuse-code-tab{display:none}#cn_refuse_code .refuse-code-tab.active{display:block}#cn_refuse_code .refuse-code-tab .description{margin-top:10px}@media only screen and (max-width: 959px){.df-credits{width:100%;float:none;margin:20px 0}.cookie-notice-settings{margin-right:0}}
|
css/front.css
CHANGED
@@ -1,107 +1 @@
|
|
1 |
-
#cookie-notice {
|
2 |
-
display: none;
|
3 |
-
position: fixed;
|
4 |
-
min-width: 100%;
|
5 |
-
height: auto;
|
6 |
-
z-index: 100000;
|
7 |
-
font-size: 13px;
|
8 |
-
line-height: 20px;
|
9 |
-
left: 0;
|
10 |
-
text-align: center;
|
11 |
-
}
|
12 |
-
|
13 |
-
.cookie-notice-container {
|
14 |
-
padding: 10px;
|
15 |
-
text-align: center;
|
16 |
-
}
|
17 |
-
|
18 |
-
.cn-top {
|
19 |
-
top: 0;
|
20 |
-
}
|
21 |
-
|
22 |
-
.cn-bottom {
|
23 |
-
bottom: 0;
|
24 |
-
}
|
25 |
-
|
26 |
-
#cookie-notice .button {
|
27 |
-
margin-left: 10px;
|
28 |
-
}
|
29 |
-
|
30 |
-
#cookie-notice .button.wp-default {
|
31 |
-
font-family: sans-serif;
|
32 |
-
line-height: 18px;
|
33 |
-
padding: 2px 12px;
|
34 |
-
background: linear-gradient(to bottom, #FEFEFE, #F4F4F4) repeat scroll 0 0 #F3F3F3;
|
35 |
-
border-color: #BBB;
|
36 |
-
color: #333;
|
37 |
-
text-shadow: 0 1px 0 #FFF;
|
38 |
-
-moz-box-sizing: border-box;
|
39 |
-
border-radius: 3px 3px 3px 3px;
|
40 |
-
border-style: solid;
|
41 |
-
border-width: 1px;
|
42 |
-
cursor: pointer;
|
43 |
-
display: inline-block;
|
44 |
-
font-size: 12px;
|
45 |
-
font-style: normal;
|
46 |
-
text-decoration: none;
|
47 |
-
white-space: nowrap;
|
48 |
-
outline: none;
|
49 |
-
}
|
50 |
-
|
51 |
-
#cookie-notice .button.wp-default:hover, #cookie-notice .button.wp-default:focus {
|
52 |
-
background: linear-gradient(to bottom, #FFFFFF, #F3F3F3) repeat scroll 0 0 #F3F3F3;
|
53 |
-
border-color: #999999;
|
54 |
-
color: #222222;
|
55 |
-
}
|
56 |
-
|
57 |
-
#cookie-notice .button.bootstrap {
|
58 |
-
font-family: sans-serif;
|
59 |
-
display: inline-block;
|
60 |
-
*display: inline;
|
61 |
-
padding: 4px 12px;
|
62 |
-
margin-right: 0.3em;
|
63 |
-
margin-bottom: 0;
|
64 |
-
*margin-left: .3em;
|
65 |
-
line-height: 20px;
|
66 |
-
color: #333333;
|
67 |
-
text-align: center;
|
68 |
-
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
69 |
-
font-style: normal;
|
70 |
-
vertical-align: middle;
|
71 |
-
cursor: pointer;
|
72 |
-
color: #ffffff;
|
73 |
-
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
74 |
-
background-color: #006dcc;
|
75 |
-
*background-color: #0044cc;
|
76 |
-
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
77 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
78 |
-
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
79 |
-
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
80 |
-
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
|
81 |
-
background-repeat: repeat-x;
|
82 |
-
border-style: solid;
|
83 |
-
border-width: 1px;
|
84 |
-
border-color: #0044cc #0044cc #002a80;
|
85 |
-
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
86 |
-
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
|
87 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
|
88 |
-
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
89 |
-
padding: 2px 10px;
|
90 |
-
font-size: 12px;
|
91 |
-
text-decoration: none;
|
92 |
-
-webkit-border-radius: 3px;
|
93 |
-
-moz-border-radius: 3px;
|
94 |
-
border-radius: 3px;
|
95 |
-
outline: none;
|
96 |
-
}
|
97 |
-
|
98 |
-
#cookie-notice .button.bootstrap:hover, #cookie-notice .button.bootstrap:focus {
|
99 |
-
color: #ffffff;
|
100 |
-
background-color: #0044cc;
|
101 |
-
*background-color: #003bb3;
|
102 |
-
background-position: 0 -15px;
|
103 |
-
-webkit-transition: background-position 0.1s linear;
|
104 |
-
-moz-transition: background-position 0.1s linear;
|
105 |
-
-o-transition: background-position 0.1s linear;
|
106 |
-
transition: background-position 0.1s linear;
|
107 |
-
}
|
1 |
+
#cookie-notice{display:none;position:fixed;min-width:100%;height:auto;z-index:100000;font-size:13px;line-height:20px;left:0;text-align:center}.cookie-notice-container{padding:10px;text-align:center}.cookie-notice-revoke-container{position:absolute;bottom:0;width:100%;z-index:1;visibility:hidden}#cookie-notice.cn-bottom .cn-revoke-cookie{bottom:0}#cookie-notice.cn-top .cn-revoke-cookie{top:0}.cn-top{top:0}.cn-bottom{bottom:0}.cn-button.wp-default,.cn-button.wp-default:hover,.cn-button.bootstrap,.cn-button.bootstrap:hover{box-shadow:none;text-decoration:none}#cookie-notice .cn-button{margin-left:10px}.cn-button.wp-default{font-family:sans-serif;line-height:18px;padding:2px 12px;background:linear-gradient(to bottom,#FEFEFE,#F4F4F4) repeat scroll 0 0 #F3F3F3;border-color:#BBB;color:#333;text-shadow:0 1px 0 #FFF;-moz-box-sizing:border-box;border-radius:3px 3px 3px 3px;border-style:solid;border-width:1px;cursor:pointer;display:inline-block;font-size:12px;font-style:normal;text-decoration:none;white-space:nowrap;outline:none}.cn-button.wp-default:hover{background:linear-gradient(to bottom,#FFFFFF,#F3F3F3) repeat scroll 0 0 #F3F3F3;border-color:#999;color:#222}.cn-button.bootstrap{font-family:sans-serif;display:inline-block;*display:inline;padding:4px 12px;margin-right:.3em;margin-bottom:0;*margin-left:.3em;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);font-style:normal;vertical-align:middle;cursor:pointer;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#0088cc,#0044cc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#0088cc),to(#0044cc));background-image:-webkit-linear-gradient(top,#0088cc,#0044cc);background-image:-o-linear-gradient(top,#0088cc,#0044cc);background-image:linear-gradient(to bottom,#0088cc,#0044cc);background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 1px 2px rgba(0,0,0,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);padding:2px 10px;font-size:12px;text-decoration:none;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;outline:none}.cn-button.bootstrap:hover{color:#fff;background-color:#04c;*background-color:#003bb3;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/front.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#cookie-notice{display:none;position:fixed;min-width:100%;height:auto;z-index:100000;font-size:13px;line-height:20px;left:0;text-align:center}
|
1 |
+
#cookie-notice.cn-bottom .cn-revoke-cookie,.cn-bottom{bottom:0}#cookie-notice.cn-top .cn-revoke-cookie,.cn-top{top:0}#cookie-notice{display:none;position:fixed;min-width:100%;height:auto;z-index:100000;font-size:13px;line-height:20px;left:0;text-align:center}.cn-button.bootstrap,.cn-button.wp-default{font-family:sans-serif;display:inline-block;font-style:normal;cursor:pointer;border-style:solid;border-width:1px;font-size:12px;text-decoration:none;outline:0}.cookie-notice-container{padding:10px;text-align:center}.cn-button.bootstrap,.cn-button.bootstrap:hover,.cn-button.wp-default,.cn-button.wp-default:hover{box-shadow:none;text-decoration:none}#cookie-notice .cn-button{margin-left:10px}.cn-button.wp-default{line-height:18px;padding:2px 12px;background:linear-gradient(to bottom,#FEFEFE,#F4F4F4) #F3F3F3;border-color:#BBB;color:#333;text-shadow:0 1px 0 #FFF;-moz-box-sizing:border-box;border-radius:3px;white-space:nowrap}.cn-button.wp-default:hover{background:linear-gradient(to bottom,#FFF,#F3F3F3) #F3F3F3;border-color:#999;color:#222}.cn-button.bootstrap{margin-right:.3em;margin-bottom:0;line-height:20px;text-align:center;vertical-align:middle;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 1px 2px rgba(0,0,0,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);padding:2px 10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cn-button.bootstrap:hover{color:#fff;background-color:#04c;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}#cookie-notice .cn-revoke-cookie.cn-button{position:relative;visibility:visible;display:none;left:0;right:0;margin:0}
|
js/admin.js
CHANGED
@@ -1,54 +1,73 @@
|
|
1 |
( function ( $ ) {
|
2 |
|
3 |
$( document ).ready( function () {
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
} );
|
41 |
-
|
42 |
-
$( '#
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
} );
|
45 |
-
|
46 |
-
} );
|
47 |
|
48 |
$( document ).on( 'click', 'input#reset_cookie_notice_options', function () {
|
49 |
-
|
50 |
} );
|
51 |
|
52 |
-
} );
|
53 |
-
|
54 |
} )( jQuery );
|
1 |
( function ( $ ) {
|
2 |
|
3 |
$( document ).ready( function () {
|
4 |
+
// initialize color picker
|
5 |
+
$( '.cn_color' ).wpColorPicker();
|
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 |
+
// read more 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 |
+
// read more 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 |
+
// read more link
|
44 |
+
$( '#cn_see_more_link-custom, #cn_see_more_link-page' ).change( function () {
|
45 |
+
if ( $( '#cn_see_more_link-custom:checked' ).val() === 'custom' ) {
|
46 |
+
$( '#cn_see_more_opt_page' ).slideUp( 'fast', function () {
|
47 |
+
$( '#cn_see_more_opt_link' ).slideDown( 'fast' );
|
48 |
+
} );
|
49 |
+
} else if ( $( '#cn_see_more_link-page:checked' ).val() === 'page' ) {
|
50 |
+
$( '#cn_see_more_opt_link' ).slideUp( 'fast', function () {
|
51 |
+
$( '#cn_see_more_opt_page' ).slideDown( 'fast' );
|
52 |
+
} );
|
53 |
+
}
|
54 |
} );
|
55 |
+
|
56 |
+
$( '#cn_refuse_code_fields' ).find( 'a' ).click( function ( e ) {
|
57 |
+
e.preventDefault();
|
58 |
+
|
59 |
+
$( '#cn_refuse_code_fields' ).find( 'a' ).removeClass( 'nav-tab-active' );
|
60 |
+
$( '.refuse-code-tab' ).removeClass( 'active' );
|
61 |
+
|
62 |
+
var id = $( this ).attr( 'id' ).replace( '-tab', '' );
|
63 |
+
|
64 |
+
$( '#' + id ).addClass( 'active' );
|
65 |
+
$( this ).addClass( 'nav-tab-active' );
|
66 |
} );
|
67 |
+
} );
|
|
|
68 |
|
69 |
$( document ).on( 'click', 'input#reset_cookie_notice_options', function () {
|
70 |
+
return confirm( cnArgs.resetToDefaults );
|
71 |
} );
|
72 |
|
|
|
|
|
73 |
} )( jQuery );
|
js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){e(document).ready(function(){e(".cn_color").wpColorPicker(),e("#cn_refuse_opt").change(function(){e(this).is(":checked")?e("#cn_refuse_opt_container").slideDown("fast"):e("#cn_refuse_opt_container").slideUp("fast")}),e("#cn_see_more").change(function(){e(this).is(":checked")?e("#cn_see_more_opt").slideDown("fast"):e("#cn_see_more_opt").slideUp("fast")}),e("#cn_on_scroll").change(function(){e(this).is(":checked")?e("#cn_on_scroll_offset").slideDown("fast"):e("#cn_on_scroll_offset").slideUp("fast")}),e("#cn_see_more_link-custom, #cn_see_more_link-page").change(function(){"custom"===e("#cn_see_more_link-custom:checked").val()?e("#cn_see_more_opt_page").slideUp("fast",function(){e("#cn_see_more_opt_link").slideDown("fast")}):"page"===e("#cn_see_more_link-page:checked").val()&&e("#cn_see_more_opt_link").slideUp("fast",function(){e("#cn_see_more_opt_page").slideDown("fast")})}),e(document).on("click","input#reset_cookie_notice_options",function(){return confirm(cnArgs.resetToDefaults)})}
|
1 |
+
!function(e){e(document).ready(function(){e(".cn_color").wpColorPicker(),e("#cn_refuse_opt").change(function(){e(this).is(":checked")?e("#cn_refuse_opt_container").slideDown("fast"):e("#cn_refuse_opt_container").slideUp("fast")}),e("#cn_revoke_cookies").change(function(){e(this).is(":checked")?e("#cn_revoke_opt_container").slideDown("fast"):e("#cn_revoke_opt_container").slideUp("fast")}),e("#cn_see_more").change(function(){e(this).is(":checked")?e("#cn_see_more_opt").slideDown("fast"):e("#cn_see_more_opt").slideUp("fast")}),e("#cn_on_scroll").change(function(){e(this).is(":checked")?e("#cn_on_scroll_offset").slideDown("fast"):e("#cn_on_scroll_offset").slideUp("fast")}),e("#cn_see_more_link-custom, #cn_see_more_link-page").change(function(){"custom"===e("#cn_see_more_link-custom:checked").val()?e("#cn_see_more_opt_page").slideUp("fast",function(){e("#cn_see_more_opt_link").slideDown("fast")}):"page"===e("#cn_see_more_link-page:checked").val()&&e("#cn_see_more_opt_link").slideUp("fast",function(){e("#cn_see_more_opt_page").slideDown("fast")})}),e("#cn_refuse_code_fields").find("a").click(function(n){n.preventDefault(),e("#cn_refuse_code_fields").find("a").removeClass("nav-tab-active"),e(".refuse-code-tab").removeClass("active");var c=e(this).attr("id").replace("-tab","");e("#"+c).addClass("active"),e(this).addClass("nav-tab-active")})}),e(document).on("click","input#reset_cookie_notice_options",function(){return confirm(cnArgs.resetToDefaults)})}(jQuery);
|
js/front.js
CHANGED
@@ -1,42 +1,127 @@
|
|
1 |
( function ( $ ) {
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
// set Cookie Notice
|
4 |
$.fn.setCookieNotice = function ( cookie_value ) {
|
5 |
if ( cnArgs.onScroll === 'yes' ) {
|
6 |
-
$( window ).off( 'scroll',
|
7 |
}
|
8 |
|
9 |
-
var
|
10 |
-
|
11 |
-
|
12 |
-
cnSelf = this;
|
13 |
|
14 |
// set expiry time in seconds
|
15 |
-
|
16 |
|
17 |
// set cookie
|
18 |
-
cookie_value = cookie_value === 'accept' ? true : false;
|
19 |
-
document.cookie = cnArgs.cookieName + '=' + cookie_value + ';expires=' +
|
20 |
|
21 |
// trigger custom event
|
22 |
$.event.trigger( {
|
23 |
type: 'setCookieNotice',
|
24 |
value: cookie_value,
|
25 |
-
time:
|
26 |
-
expires:
|
27 |
} );
|
28 |
|
29 |
-
//
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
} else if ( cnArgs.hideEffect === 'slide' ) {
|
35 |
-
cnDomNode.slideUp( 300, function () {
|
36 |
-
cnSelf.removeCookieNotice();
|
37 |
-
} );
|
38 |
} else {
|
39 |
-
|
40 |
}
|
41 |
|
42 |
if ( cookie_value && cnArgs.redirection === '1' ) {
|
@@ -57,56 +142,168 @@
|
|
57 |
}
|
58 |
};
|
59 |
|
60 |
-
//
|
61 |
-
$.fn.
|
62 |
-
$( '
|
63 |
-
|
64 |
-
};
|
65 |
|
66 |
-
|
67 |
-
|
|
|
|
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
-
|
82 |
-
}
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
e.preventDefault();
|
87 |
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
} );
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
} else if ( cnArgs.hideEffect === 'slide' ) {
|
101 |
-
cnDomNode.slideDown( 300 );
|
102 |
-
} else {
|
103 |
-
cnDomNode.show();
|
104 |
-
}
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
-
}
|
111 |
|
112 |
} )( jQuery );
|
1 |
( function ( $ ) {
|
2 |
|
3 |
+
// ready event
|
4 |
+
$( document ).ready( function () {
|
5 |
+
var notice = $( '#cookie-notice' ),
|
6 |
+
cookie = $.fn.getCookieNotice();
|
7 |
+
|
8 |
+
// handle set-cookie button click
|
9 |
+
$( document ).on( 'click', '.cn-set-cookie', function ( e ) {
|
10 |
+
e.preventDefault();
|
11 |
+
|
12 |
+
$( this ).setCookieNotice( $( this ).data( 'cookie-set' ) );
|
13 |
+
} );
|
14 |
+
|
15 |
+
// handle revoke button click
|
16 |
+
$( document ).on( 'click', '.cn-revoke-cookie', function ( e ) {
|
17 |
+
e.preventDefault();
|
18 |
+
|
19 |
+
if ( cnArgs.refuse === 'yes' ) {
|
20 |
+
var revoke = $( this );
|
21 |
+
|
22 |
+
if ( cnArgs.onScroll === 'yes' ) {
|
23 |
+
// enable cookie acceptance by scrolling again
|
24 |
+
$( window ).on( 'scroll', handleScroll );
|
25 |
+
}
|
26 |
+
|
27 |
+
if ( cnArgs.revoke_cookies === '1' ) {
|
28 |
+
// clicked shortcode button?
|
29 |
+
if ( revoke.hasClass( 'cn-revoke-inline' ) ) {
|
30 |
+
var body = $( 'body' );
|
31 |
+
|
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();
|
47 |
+
|
48 |
+
// add body class
|
49 |
+
$.fn.setCookieNoticeBodyClass( 'cookies-set cookies-revoke ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
} );
|
53 |
+
|
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 |
+
|
63 |
+
$.fn.setCookieNoticeBodyClass( 'cookies-not-set' );
|
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 |
+
}
|
73 |
+
// remove cookie notice
|
74 |
+
} else {
|
75 |
+
// add body class
|
76 |
+
$.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
|
77 |
+
}
|
78 |
+
} );
|
79 |
+
|
80 |
+
// handle mouse scrolling
|
81 |
+
function handleScroll( event ) {
|
82 |
+
var win = $( this );
|
83 |
+
|
84 |
+
if ( win.scrollTop() > parseInt( cnArgs.onScrollOffset ) ) {
|
85 |
+
// accept cookie
|
86 |
+
win.setCookieNotice( 'accept' );
|
87 |
+
|
88 |
+
// remove itself after cookie accept
|
89 |
+
win.off( 'scroll', handleScroll );
|
90 |
+
}
|
91 |
+
};
|
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 );
|
105 |
|
106 |
// set cookie
|
107 |
+
cookie_value = cookie_value === 'accept' ? 'true' : 'false';
|
108 |
+
document.cookie = cnArgs.cookieName + '=' + cookie_value + ';expires=' + later_date.toUTCString() + ';' + ( cnArgs.cookieDomain !== undefined && cnArgs.cookieDomain !== '' ? 'domain=' + cnArgs.cookieDomain + ';' : '' ) + ( cnArgs.cookiePath !== undefined && cnArgs.cookiePath !== '' ? 'path=' + cnArgs.cookiePath + ';' : '' ) + ( cnArgs.secure === '1' ? 'secure;' : '' );
|
109 |
|
110 |
// trigger custom event
|
111 |
$.event.trigger( {
|
112 |
type: 'setCookieNotice',
|
113 |
value: cookie_value,
|
114 |
+
time: date,
|
115 |
+
expires: later_date
|
116 |
} );
|
117 |
|
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' ) {
|
142 |
}
|
143 |
};
|
144 |
|
145 |
+
// add class(es) to body
|
146 |
+
$.fn.setCookieNoticeBodyClass = function( classes ) {
|
147 |
+
$( 'body' ).removeClass( 'cookies-revoke cookies-accepted cookies-refused cookies-set cookies-not-set' ).addClass( classes );
|
148 |
+
}
|
|
|
149 |
|
150 |
+
// get cookie value
|
151 |
+
$.fn.getCookieNotice = function () {
|
152 |
+
var value = "; " + document.cookie,
|
153 |
+
parts = value.split( '; cookie_notice_accepted=' );
|
154 |
|
155 |
+
if ( parts.length === 2 )
|
156 |
+
return parts.pop().split( ';' ).shift();
|
157 |
+
else
|
158 |
+
return;
|
159 |
+
}
|
160 |
|
161 |
+
// display cookie notice
|
162 |
+
$.fn.showCookieNotice = function( type ) {
|
163 |
+
// trigger custom event
|
164 |
+
$.event.trigger( {
|
165 |
+
type: 'showCookieNotice',
|
166 |
+
value: type,
|
167 |
+
data: cnArgs
|
168 |
+
} );
|
169 |
|
170 |
+
switch ( type ) {
|
171 |
+
case 0:
|
172 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
173 |
+
// show cookie notice
|
174 |
+
this.fadeIn( 300 );
|
175 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
176 |
+
// show cookie notice
|
177 |
+
this.slideDown( 300 );
|
178 |
+
} else {
|
179 |
+
// show cookie notice
|
180 |
+
this.show();
|
181 |
}
|
182 |
+
break;
|
|
|
183 |
|
184 |
+
case 1:
|
185 |
+
var notice = this;
|
|
|
186 |
|
187 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
188 |
+
// hide revoke button
|
189 |
+
this.find( '.cookie-notice-revoke-container' ).fadeOut( 300, function () {
|
190 |
+
// show cookie notice
|
191 |
+
notice.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 300 );
|
192 |
+
} );
|
193 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
194 |
+
// hide revoke button
|
195 |
+
this.find( '.cookie-notice-revoke-container' ).slideUp( 300, function () {
|
196 |
+
// show cookie notice
|
197 |
+
notice.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 300 );
|
198 |
+
} );
|
199 |
+
} else {
|
200 |
+
// hide revoke button
|
201 |
+
this.find( '.cookie-notice-revoke-container' ).hide();
|
202 |
+
|
203 |
+
// show cookie notice
|
204 |
+
notice.css( { 'visibility': 'visible', 'display': 'block' } );
|
205 |
+
}
|
206 |
+
break;
|
207 |
+
|
208 |
+
case 2:
|
209 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
210 |
+
// show cookie notice
|
211 |
+
this.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 300 );
|
212 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
213 |
+
// show cookie notice
|
214 |
+
this.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 300 );
|
215 |
+
} else {
|
216 |
+
// show cookie notice
|
217 |
+
this.css( { 'visibility': 'visible', 'display': 'block' } );
|
218 |
+
}
|
219 |
+
break;
|
220 |
+
|
221 |
+
case 3:
|
222 |
+
var notice = this;
|
223 |
+
|
224 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
225 |
+
// hide revoke button
|
226 |
+
this.find( '.cookie-notice-revoke-container' ).fadeOut( 300, function () {
|
227 |
+
// show cookie notice
|
228 |
+
notice.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 300 );
|
229 |
+
} );
|
230 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
231 |
+
// hide revoke button
|
232 |
+
this.find( '.cookie-notice-revoke-container' ).slideUp( 300, function () {
|
233 |
+
// show cookie notice
|
234 |
+
notice.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 300 );
|
235 |
+
} );
|
236 |
+
} else {
|
237 |
+
// hide revoke button
|
238 |
+
this.find( '.cookie-notice-revoke-container' ).hide();
|
239 |
+
|
240 |
+
// show cookie notice
|
241 |
+
notice.css( { 'visibility': 'visible', 'display': 'block' } );
|
242 |
+
}
|
243 |
+
break;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
// hide cookie notice
|
248 |
+
$.fn.hideCookieNotice = function ( type ) {
|
249 |
+
// trigger custom event
|
250 |
+
$.event.trigger( {
|
251 |
+
type: 'hideCookieNotice',
|
252 |
+
value: type,
|
253 |
+
data: cnArgs
|
254 |
} );
|
255 |
|
256 |
+
switch ( type ) {
|
257 |
+
case 0:
|
258 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
259 |
+
this.fadeOut( 300 );
|
260 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
261 |
+
this.slideUp( 300 );
|
262 |
+
} else {
|
263 |
+
this.hide();
|
264 |
+
}
|
265 |
+
break;
|
266 |
|
267 |
+
case 1:
|
268 |
+
this.css( { 'visibility': 'hidden', 'display': 'block' } );
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
271 |
+
this.find( '.cookie-notice-revoke-container' ).fadeIn( 300 ).css( { 'visibility': 'visible', 'display': 'block' } );
|
272 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
273 |
+
this.find( '.cookie-notice-revoke-container' ).slideDown( 300 ).css( { 'visibility': 'visible', 'display': 'block' } );
|
274 |
+
} else {
|
275 |
+
this.find( '.cookie-notice-revoke-container' ).css( { 'visibility': 'visible', 'display': 'block' } );
|
276 |
+
}
|
277 |
+
break;
|
278 |
+
|
279 |
+
case 2:
|
280 |
+
var notice = this;
|
281 |
+
|
282 |
+
if ( cnArgs.hideEffect === 'fade' ) {
|
283 |
+
this.fadeOut( 300, function () {
|
284 |
+
// hide cookie notice
|
285 |
+
notice.css( { 'visibility': 'hidden', 'display': 'block' } );
|
286 |
+
|
287 |
+
// show revoke button
|
288 |
+
notice.find( '.cookie-notice-revoke-container' ).fadeIn( 300 ).css( { 'visibility': 'visible', 'display': 'block' } );
|
289 |
+
} );
|
290 |
+
} else if ( cnArgs.hideEffect === 'slide' ) {
|
291 |
+
this.slideUp( 300, function () {
|
292 |
+
// hide cookie notice
|
293 |
+
notice.css( { 'visibility': 'hidden', 'display': 'block' } );
|
294 |
+
|
295 |
+
// show revoke button
|
296 |
+
notice.find( '.cookie-notice-revoke-container' ).slideDown( 300 ).css( { 'visibility': 'visible', 'display': 'block' } );
|
297 |
+
} );
|
298 |
+
} else {
|
299 |
+
// hide cookie notice
|
300 |
+
this.css( { 'visibility': 'hidden', 'display': 'block' } );
|
301 |
+
|
302 |
+
// show revoke button
|
303 |
+
notice.find( '.cookie-notice-revoke-container' ).css( { 'visibility': 'visible', 'display': 'block' } );
|
304 |
+
}
|
305 |
+
break;
|
306 |
}
|
307 |
+
}
|
308 |
|
309 |
} )( jQuery );
|
js/front.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(o){o.fn.setCookieNotice
|
1 |
+
!function(e){function i(o){var s=e(this);s.scrollTop()>parseInt(cnArgs.onScrollOffset)&&(s.setCookieNotice("accept"),s.off("scroll",i))}e(document).ready(function(){var o=e("#cookie-notice"),s=e.fn.getCookieNotice();e(document).on("click",".cn-set-cookie",function(i){i.preventDefault(),e(this).setCookieNotice(e(this).data("cookie-set"))}),e(document).on("click",".cn-revoke-cookie",function(c){if(c.preventDefault(),"yes"===cnArgs.refuse){var t=e(this);if("yes"===cnArgs.onScroll&&e(window).on("scroll",i),"1"===cnArgs.revoke_cookies){if(t.hasClass("cn-revoke-inline")){var n=e("body");n.hasClass("cookies-revoke")||n.hasClass("cookies-not-set")||("automatic"===cnArgs.revoke_cookies_opt?o.showCookieNotice(3):o.showCookieNotice(2))}else o.showCookieNotice(1);s=e.fn.getCookieNotice(),e.fn.setCookieNoticeBodyClass("cookies-set cookies-revoke "+("true"===s?"cookies-accepted":"cookies-refused"))}}}),void 0===s?("yes"===cnArgs.onScroll&&e(window).on("scroll",i),o.showCookieNotice(0),e.fn.setCookieNoticeBodyClass("cookies-not-set")):"yes"===cnArgs.refuse?"1"===cnArgs.revoke_cookies&&("automatic"===cnArgs.revoke_cookies_opt&&o.hideCookieNotice(1),e.fn.setCookieNoticeBodyClass("cookies-set "+("true"===s?"cookies-accepted":"cookies-refused"))):e.fn.setCookieNoticeBodyClass("cookies-set "+("true"===s?"cookies-accepted":"cookies-refused"))}),e.fn.setCookieNotice=function(o){"yes"===cnArgs.onScroll&&e(window).off("scroll",i);var s=new Date,c=new Date,t=e("#cookie-notice");if(c.setTime(parseInt(s.getTime())+1e3*parseInt(cnArgs.cookieTime)),o="accept"===o?"true":"false",document.cookie=cnArgs.cookieName+"="+o+";expires="+c.toUTCString()+";"+(void 0!==cnArgs.cookieDomain&&""!==cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(void 0!==cnArgs.cookiePath&&""!==cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":"")+("1"===cnArgs.secure?"secure;":""),e.event.trigger({type:"setCookieNotice",value:o,time:s,expires:c}),e.fn.setCookieNoticeBodyClass("cookies-set "+("true"===o?"cookies-accepted":"cookies-refused")),"yes"===cnArgs.refuse&&"1"===cnArgs.revoke_cookies&&"automatic"===cnArgs.revoke_cookies_opt?t.hideCookieNotice(2):t.hideCookieNotice(0),o&&"1"===cnArgs.redirection){var n=window.location.protocol+"//",a=window.location.host+"/"+window.location.pathname;"1"===cnArgs.cache?(n=n+a.replace("//","/")+(""===window.location.search?"?":window.location.search+"&")+"cn-reloaded=1"+window.location.hash,window.location.href=n):(n=n+a.replace("//","/")+window.location.search+window.location.hash,window.location.reload(!0))}else;},e.fn.setCookieNoticeBodyClass=function(i){e("body").removeClass("cookies-revoke cookies-accepted cookies-refused cookies-set cookies-not-set").addClass(i)},e.fn.getCookieNotice=function(){var e=("; "+document.cookie).split("; cookie_notice_accepted=");return 2===e.length?e.pop().split(";").shift():void 0},e.fn.showCookieNotice=function(i){switch(e.event.trigger({type:"showCookieNotice",value:i,data:cnArgs}),i){case 0:"fade"===cnArgs.hideEffect?this.fadeIn(300):"slide"===cnArgs.hideEffect?this.slideDown(300):this.show();break;case 1:var o=this;"fade"===cnArgs.hideEffect?this.find(".cookie-notice-revoke-container").fadeOut(300,function(){o.css({visibility:"visible",display:"none"}).fadeIn(300)}):"slide"===cnArgs.hideEffect?this.find(".cookie-notice-revoke-container").slideUp(300,function(){o.css({visibility:"visible",display:"none"}).slideDown(300)}):(this.find(".cookie-notice-revoke-container").hide(),o.css({visibility:"visible",display:"block"}));break;case 2:"fade"===cnArgs.hideEffect?this.css({visibility:"visible",display:"none"}).fadeIn(300):"slide"===cnArgs.hideEffect?this.css({visibility:"visible",display:"none"}).slideDown(300):this.css({visibility:"visible",display:"block"});break;case 3:o=this;"fade"===cnArgs.hideEffect?this.find(".cookie-notice-revoke-container").fadeOut(300,function(){o.css({visibility:"visible",display:"none"}).fadeIn(300)}):"slide"===cnArgs.hideEffect?this.find(".cookie-notice-revoke-container").slideUp(300,function(){o.css({visibility:"visible",display:"none"}).slideDown(300)}):(this.find(".cookie-notice-revoke-container").hide(),o.css({visibility:"visible",display:"block"}))}},e.fn.hideCookieNotice=function(i){switch(e.event.trigger({type:"hideCookieNotice",value:i,data:cnArgs}),i){case 0:"fade"===cnArgs.hideEffect?this.fadeOut(300):"slide"===cnArgs.hideEffect?this.slideUp(300):this.hide();break;case 1:this.css({visibility:"hidden",display:"block"}),"fade"===cnArgs.hideEffect?this.find(".cookie-notice-revoke-container").fadeIn(300).css({visibility:"visible",display:"block"}):"slide"===cnArgs.hideEffect?this.find(".cookie-notice-revoke-container").slideDown(300).css({visibility:"visible",display:"block"}):this.find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"});break;case 2:var o=this;"fade"===cnArgs.hideEffect?this.fadeOut(300,function(){o.css({visibility:"hidden",display:"block"}),o.find(".cookie-notice-revoke-container").fadeIn(300).css({visibility:"visible",display:"block"})}):"slide"===cnArgs.hideEffect?this.slideUp(300,function(){o.css({visibility:"hidden",display:"block"}),o.find(".cookie-notice-revoke-container").slideDown(300).css({visibility:"visible",display:"block"})}):(this.css({visibility:"hidden",display:"block"}),o.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:
|
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,317 +10,377 @@ 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
|
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:
|
20 |
msgid "Top"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: ../cookie-notice.php:
|
24 |
msgid "Bottom"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: ../cookie-notice.php:
|
28 |
msgid "None"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ../cookie-notice.php:
|
32 |
msgid "WordPress"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../cookie-notice.php:
|
36 |
msgid "Bootstrap"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../cookie-notice.php:
|
40 |
-
msgid "
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
44 |
msgid "Page link"
|
45 |
msgstr ""
|
46 |
|
47 |
#: ../cookie-notice.php:148
|
|
|
|
|
|
|
|
|
48 |
msgid "Text color"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../cookie-notice.php:
|
52 |
msgid "Bar color"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
56 |
msgid "1 day"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: ../cookie-notice.php:
|
60 |
msgid "1 week"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: ../cookie-notice.php:
|
64 |
msgid "1 month"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: ../cookie-notice.php:
|
68 |
msgid "3 months"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../cookie-notice.php:
|
72 |
msgid "6 months"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ../cookie-notice.php:
|
76 |
msgid "1 year"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ../cookie-notice.php:
|
80 |
msgid "infinity"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ../cookie-notice.php:
|
84 |
msgid "Fade"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: ../cookie-notice.php:
|
88 |
msgid "Slide"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: ../cookie-notice.php:
|
92 |
msgid "Header"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ../cookie-notice.php:
|
96 |
msgid "Footer"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../cookie-notice.php:
|
100 |
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."
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: ../cookie-notice.php:
|
104 |
msgid "Ok"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: ../cookie-notice.php:
|
108 |
msgid "No"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
112 |
msgid "Read more"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: ../cookie-notice.php:
|
116 |
msgid "Cookie Notice"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: ../cookie-notice.php:
|
120 |
msgid "Need support?"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: ../cookie-notice.php:
|
124 |
#, php-format
|
125 |
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>"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: ../cookie-notice.php:
|
129 |
msgid "Do you like this plugin?"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: ../cookie-notice.php:
|
133 |
#, php-format
|
134 |
msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: ../cookie-notice.php:
|
138 |
#, php-format
|
139 |
msgid "Blog about it & link to the <a href=\"%s\" target=\"_blank\">plugin page</a>."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: ../cookie-notice.php:
|
143 |
#, php-format
|
144 |
msgid "Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: ../cookie-notice.php:
|
148 |
msgid "Reset to defaults"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: ../cookie-notice.php:
|
152 |
msgid "Configuration"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: ../cookie-notice.php:
|
156 |
msgid "Message"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: ../cookie-notice.php:
|
160 |
msgid "Button text"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: ../cookie-notice.php:
|
164 |
-
msgid "
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: ../cookie-notice.php:
|
168 |
msgid "Link target"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: ../cookie-notice.php:
|
172 |
-
msgid "Refuse
|
|
|
|
|
|
|
|
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: ../cookie-notice.php:
|
176 |
msgid "Script blocking"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: ../cookie-notice.php:
|
180 |
msgid "Reloading"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: ../cookie-notice.php:
|
184 |
msgid "On scroll"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: ../cookie-notice.php:
|
188 |
msgid "Cookie expiry"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: ../cookie-notice.php:
|
192 |
msgid "Script placement"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: ../cookie-notice.php:
|
196 |
msgid "Deactivation"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: ../cookie-notice.php:
|
200 |
msgid "Design"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: ../cookie-notice.php:
|
204 |
msgid "Position"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: ../cookie-notice.php:
|
208 |
msgid "Animation"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: ../cookie-notice.php:
|
212 |
msgid "Button style"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
216 |
msgid "Colors"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: ../cookie-notice.php:
|
220 |
msgid "Enable if you want all plugin data to be deleted on deactivation."
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: ../cookie-notice.php:
|
224 |
msgid "Enter the cookie notice message."
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: ../cookie-notice.php:
|
228 |
msgid "The text of the option to accept the usage of the cookies and make the notification disappear."
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: ../cookie-notice.php:
|
232 |
-
msgid "
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: ../cookie-notice.php:
|
236 |
-
msgid "The text of the
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted."
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: ../cookie-notice.php:
|
244 |
msgid "To get the cookie notice status use <code>cn_cookies_accepted()</code> function."
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
msgid "Enable to reload the page after cookies are accepted."
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: ../cookie-notice.php:
|
252 |
-
msgid "Enable
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: ../cookie-notice.php:
|
256 |
#, php-format
|
257 |
-
msgid "Need a Cookie Policy? Generate one with <a href=\"%s\" target=\"_blank\" title=\"iubenda\">iubenda</a
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: ../cookie-notice.php:
|
261 |
msgid "The text of the more info button."
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: ../cookie-notice.php:
|
265 |
msgid "Select where to redirect user for more information about cookies."
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: ../cookie-notice.php:
|
269 |
msgid "-- select page --"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: ../cookie-notice.php:
|
273 |
-
msgid "Select from one of your site's pages"
|
|
|
|
|
|
|
|
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: ../cookie-notice.php:
|
277 |
-
msgid "Enter the full URL starting with http://"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: ../cookie-notice.php:
|
281 |
-
msgid "Select the link target
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: ../cookie-notice.php:
|
285 |
msgid "The ammount of time that cookie should be stored for."
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: ../cookie-notice.php:
|
289 |
msgid "Select where all the plugin scripts should be placed."
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: ../cookie-notice.php:
|
293 |
msgid "Select location for your cookie notice."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: ../cookie-notice.php:
|
297 |
msgid "Cookie notice acceptance animation."
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: ../cookie-notice.php:
|
301 |
msgid "Enable cookie notice acceptance when users scroll."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: ../cookie-notice.php:
|
305 |
msgid "Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear."
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: ../cookie-notice.php:
|
309 |
msgid "Choose buttons style."
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: ../cookie-notice.php:
|
|
|
|
|
|
|
|
|
313 |
msgid "Settings restored to defaults."
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: ../cookie-notice.php:
|
317 |
msgid "Support"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: ../cookie-notice.php:
|
321 |
msgid "Settings"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: ../cookie-notice.php:
|
325 |
msgid "Are you sure you want to reset these settings to defaults?"
|
326 |
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Cookie Notice\n"
|
5 |
+
"POT-Creation-Date: 2018-05-24 15:11+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 |
"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.7\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:131
|
20 |
msgid "Top"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: ../cookie-notice.php:132
|
24 |
msgid "Bottom"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: ../cookie-notice.php:136 ../cookie-notice.php:173
|
28 |
msgid "None"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../cookie-notice.php:137
|
32 |
msgid "WordPress"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../cookie-notice.php:138
|
36 |
msgid "Bootstrap"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../cookie-notice.php:142
|
40 |
+
msgid "Automatic"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../cookie-notice.php:143
|
44 |
+
msgid "Manual"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../cookie-notice.php:147
|
48 |
msgid "Page link"
|
49 |
msgstr ""
|
50 |
|
51 |
#: ../cookie-notice.php:148
|
52 |
+
msgid "Custom link"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../cookie-notice.php:157
|
56 |
msgid "Text color"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../cookie-notice.php:158
|
60 |
msgid "Bar color"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ../cookie-notice.php:162
|
64 |
+
msgid "An hour"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../cookie-notice.php:163
|
68 |
msgid "1 day"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ../cookie-notice.php:164
|
72 |
msgid "1 week"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../cookie-notice.php:165
|
76 |
msgid "1 month"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: ../cookie-notice.php:166
|
80 |
msgid "3 months"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ../cookie-notice.php:167
|
84 |
msgid "6 months"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../cookie-notice.php:168
|
88 |
msgid "1 year"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: ../cookie-notice.php:169
|
92 |
msgid "infinity"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: ../cookie-notice.php:174
|
96 |
msgid "Fade"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: ../cookie-notice.php:175
|
100 |
msgid "Slide"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: ../cookie-notice.php:179
|
104 |
msgid "Header"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: ../cookie-notice.php:180
|
108 |
msgid "Footer"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: ../cookie-notice.php:186
|
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:187
|
116 |
msgid "Ok"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: ../cookie-notice.php:188
|
120 |
msgid "No"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: ../cookie-notice.php:189 ../cookie-notice.php:273
|
124 |
+
msgid "Revoke Cookies"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: ../cookie-notice.php:190
|
128 |
msgid "Read more"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: ../cookie-notice.php:328 ../cookie-notice.php:339 ../cookie-notice.php:342
|
132 |
msgid "Cookie Notice"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: ../cookie-notice.php:344
|
136 |
msgid "Need support?"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: ../cookie-notice.php:345
|
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:347
|
145 |
msgid "Do you like this plugin?"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: ../cookie-notice.php:348
|
149 |
#, php-format
|
150 |
msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: ../cookie-notice.php:349
|
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:350
|
159 |
#, php-format
|
160 |
msgid "Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: ../cookie-notice.php:365
|
164 |
msgid "Reset to defaults"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: ../cookie-notice.php:381
|
168 |
msgid "Configuration"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: ../cookie-notice.php:382
|
172 |
msgid "Message"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: ../cookie-notice.php:383
|
176 |
msgid "Button text"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: ../cookie-notice.php:384
|
180 |
+
msgid "Privacy policy"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: ../cookie-notice.php:385
|
184 |
msgid "Link target"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: ../cookie-notice.php:386
|
188 |
+
msgid "Refuse cookies"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: ../cookie-notice.php:387
|
192 |
+
msgid "Revoke cookies"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: ../cookie-notice.php:388
|
196 |
msgid "Script blocking"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: ../cookie-notice.php:389
|
200 |
msgid "Reloading"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: ../cookie-notice.php:390
|
204 |
msgid "On scroll"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: ../cookie-notice.php:391
|
208 |
msgid "Cookie expiry"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: ../cookie-notice.php:392
|
212 |
msgid "Script placement"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: ../cookie-notice.php:393
|
216 |
msgid "Deactivation"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: ../cookie-notice.php:396
|
220 |
msgid "Design"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: ../cookie-notice.php:397
|
224 |
msgid "Position"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: ../cookie-notice.php:398
|
228 |
msgid "Animation"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: ../cookie-notice.php:399
|
232 |
msgid "Button style"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: ../cookie-notice.php:400
|
236 |
+
msgid "Button class"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: ../cookie-notice.php:401
|
240 |
msgid "Colors"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: ../cookie-notice.php:416
|
244 |
msgid "Enable if you want all plugin data to be deleted on deactivation."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: ../cookie-notice.php:428
|
248 |
msgid "Enter the cookie notice message."
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: ../cookie-notice.php:441
|
252 |
msgid "The text of the option to accept the usage of the cookies and make the notification disappear."
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: ../cookie-notice.php:452
|
256 |
+
msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: ../cookie-notice.php:456
|
260 |
+
msgid "The text of the button to refuse the usage of the cookies."
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: ../cookie-notice.php:474
|
264 |
+
msgid "Head"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: ../cookie-notice.php:475
|
268 |
+
msgid "Body"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: ../cookie-notice.php:478
|
272 |
+
msgid "The code to be used in your site header, before the closing head tag."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: ../cookie-notice.php:482
|
276 |
+
msgid "The code to be used in your site footer, before the closing body tag."
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: ../cookie-notice.php:486
|
280 |
msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted."
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: ../cookie-notice.php:486
|
284 |
msgid "To get the cookie notice status use <code>cn_cookies_accepted()</code> function."
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: ../cookie-notice.php:497
|
288 |
+
msgid "Enable to give to the user the possibility to revoke their cookie consent <i>(requires \"Refuse cookies\" option enabled)</i>."
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: ../cookie-notice.php:500
|
292 |
+
msgid "The text of the button to revoke the cookie consent."
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: ../cookie-notice.php:508
|
296 |
+
msgid "Select the method for displaying the revoke button - automatic (in the Cookie Notice container) or manual using <code>[cookies_revoke]</code> shortcode."
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: ../cookie-notice.php:519
|
300 |
msgid "Enable to reload the page after cookies are accepted."
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: ../cookie-notice.php:542
|
304 |
+
msgid "Enable privacy policy link."
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: ../cookie-notice.php:543
|
308 |
#, php-format
|
309 |
+
msgid "Need a Cookie Policy? Generate one with <a href=\"%s\" target=\"_blank\" title=\"iubenda\">iubenda</a>."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: ../cookie-notice.php:546
|
313 |
msgid "The text of the more info button."
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: ../cookie-notice.php:558
|
317 |
msgid "Select where to redirect user for more information about cookies."
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: ../cookie-notice.php:561
|
321 |
msgid "-- select page --"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: ../cookie-notice.php:572
|
325 |
+
msgid "Select from one of your site's pages."
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: ../cookie-notice.php:578
|
329 |
+
msgid "Synchronize with WordPress Privacy Policy page."
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: ../cookie-notice.php:585
|
333 |
+
msgid "Enter the full URL starting with http(s)://"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: ../cookie-notice.php:607
|
337 |
+
msgid "Select the privacy policy link target."
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: ../cookie-notice.php:630
|
341 |
msgid "The ammount of time that cookie should be stored for."
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: ../cookie-notice.php:648
|
345 |
msgid "Select where all the plugin scripts should be placed."
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: ../cookie-notice.php:668
|
349 |
msgid "Select location for your cookie notice."
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: ../cookie-notice.php:689
|
353 |
msgid "Cookie notice acceptance animation."
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: ../cookie-notice.php:700
|
357 |
msgid "Enable cookie notice acceptance when users scroll."
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: ../cookie-notice.php:703
|
361 |
msgid "Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear."
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: ../cookie-notice.php:724
|
365 |
msgid "Choose buttons style."
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: ../cookie-notice.php:737
|
369 |
+
msgid "Enter additional button CSS classes separated by spaces."
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: ../cookie-notice.php:863
|
373 |
msgid "Settings restored to defaults."
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: ../cookie-notice.php:969
|
377 |
msgid "Support"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: ../cookie-notice.php:986
|
381 |
msgid "Settings"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: ../cookie-notice.php:1053
|
385 |
msgid "Are you sure you want to reset these settings to defaults?"
|
386 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,28 +3,32 @@ Contributors: dfactory
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent, Bootstrap
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 1.2.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
11 |
-
Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law regulations.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
[Cookie Notice](http://www.dfactory.eu/plugins/cookie-notice/) allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law regulations.
|
16 |
|
17 |
For more information, check out plugin page at [dFactory](http://www.dfactory.eu/) or plugin [support forum](http://www.dfactory.eu/support/forum/cookie-notice/).
|
18 |
|
19 |
= Features include: =
|
20 |
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
|
|
|
|
25 |
* Option to accept cookies on scroll
|
26 |
* Option to set on scroll offset
|
27 |
* Option to refuse functional cookies
|
|
|
|
|
28 |
* Option to reload the page after cookies are accepted
|
29 |
* Select the position of the cookie message box
|
30 |
* Animate the message box after cookie is accepted
|
@@ -62,6 +66,13 @@ No questions yet.
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
= 1.2.42 =
|
66 |
* New: Introducing [cookies_accepted][/cookies_accepted] shortcode
|
67 |
* Fix: Infinite cookie expiry issue
|
@@ -238,6 +249,7 @@ Initial release
|
|
238 |
|
239 |
== Upgrade Notice ==
|
240 |
|
241 |
-
= 1.2.
|
242 |
-
* New:
|
243 |
-
*
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent, Bootstrap
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 4.9.6
|
7 |
+
Stable tag: 1.2.43
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
11 |
+
Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law GDPR regulations.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
[Cookie Notice](http://www.dfactory.eu/plugins/cookie-notice/) allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law GDPR regulations.
|
16 |
|
17 |
For more information, check out plugin page at [dFactory](http://www.dfactory.eu/) or plugin [support forum](http://www.dfactory.eu/support/forum/cookie-notice/).
|
18 |
|
19 |
= Features include: =
|
20 |
|
21 |
+
* 100% GDPR compliant
|
22 |
+
* Customizable the cookie message
|
23 |
+
* Redirects users to specified page for more cookie information
|
24 |
+
* Multiple cookie expiry options
|
25 |
+
* Link to Privacy Policy page
|
26 |
+
* WordPress Privacy Policy page synchronization
|
27 |
* Option to accept cookies on scroll
|
28 |
* Option to set on scroll offset
|
29 |
* Option to refuse functional cookies
|
30 |
+
* Option to revoke the user consent
|
31 |
+
* Option to manually block scripts
|
32 |
* Option to reload the page after cookies are accepted
|
33 |
* Select the position of the cookie message box
|
34 |
* Animate the message box after cookie is accepted
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 1.2.43 =
|
70 |
+
* New: Option to revoke the user consent
|
71 |
+
* New: Script blocking extended to header and footer
|
72 |
+
* New: Synchronization with WordPress 4.9.6 Privacy Policy page
|
73 |
+
* New: Custom button class option
|
74 |
+
* Tweak: Added 1 hour cookie expiry option
|
75 |
+
|
76 |
= 1.2.42 =
|
77 |
* New: Introducing [cookies_accepted][/cookies_accepted] shortcode
|
78 |
* Fix: Infinite cookie expiry issue
|
249 |
|
250 |
== Upgrade Notice ==
|
251 |
|
252 |
+
= 1.2.43 =
|
253 |
+
* New: Option to revoke the user consent
|
254 |
+
* New: Script blocking extended to header and footer
|
255 |
+
* New: Synchronization with WordPress 4.9.6 Privacy Policy page
|