Version Description
- Fix: Undefined notice in WP dashboard
- Fix: Close icon event not firing
- Tweak: Remove aria-label from the close icon
- Tweak: CSS tweaks in the admin
Download this release
Release Info
Developer | dfactory |
Plugin | Cookie Notice by dFactory |
Version | 2.2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.2 to 2.2.3
- cookie-notice.php +3 -3
- css/front.css +1 -0
- css/front.min.css +1 -1
- includes/dashboard.php +6 -2
- includes/frontend.php +1 -1
- js/front.js +1 -1
- js/front.min.js +1 -1
- languages/cookie-notice.pot +24 -28
- readme.txt +16 -7
cookie-notice.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Cookie Notice & Compliance for GDPR / CCPA
|
4 |
Description: Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with GDPR, CCPA and other data privacy laws.
|
5 |
-
Version: 2.2.
|
6 |
Author: Hu-manity.co
|
7 |
Author URI: https://hu-manity.co/
|
8 |
Plugin URI: https://hu-manity.co/
|
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) )
|
|
29 |
* Cookie Notice class.
|
30 |
*
|
31 |
* @class Cookie_Notice
|
32 |
-
* @version 2.2.
|
33 |
*/
|
34 |
class Cookie_Notice {
|
35 |
|
@@ -86,7 +86,7 @@ class Cookie_Notice {
|
|
86 |
'update_notice' => true,
|
87 |
'update_delay_date' => 0
|
88 |
),
|
89 |
-
'version' => '2.2.
|
90 |
);
|
91 |
private $deactivaion_url = '';
|
92 |
|
2 |
/*
|
3 |
Plugin Name: Cookie Notice & Compliance for GDPR / CCPA
|
4 |
Description: Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with GDPR, CCPA and other data privacy laws.
|
5 |
+
Version: 2.2.3
|
6 |
Author: Hu-manity.co
|
7 |
Author URI: https://hu-manity.co/
|
8 |
Plugin URI: https://hu-manity.co/
|
29 |
* Cookie Notice class.
|
30 |
*
|
31 |
* @class Cookie_Notice
|
32 |
+
* @version 2.2.3
|
33 |
*/
|
34 |
class Cookie_Notice {
|
35 |
|
86 |
'update_notice' => true,
|
87 |
'update_delay_date' => 0
|
88 |
),
|
89 |
+
'version' => '2.2.3'
|
90 |
);
|
91 |
private $deactivaion_url = '';
|
92 |
|
css/front.css
CHANGED
@@ -107,6 +107,7 @@
|
|
107 |
|
108 |
#cookie-notice .cn-button {
|
109 |
margin: 0 0 0 10px;
|
|
|
110 |
}
|
111 |
#cookie-notice .cn-button:not(.cn-button-custom) {
|
112 |
font-family: -apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;
|
107 |
|
108 |
#cookie-notice .cn-button {
|
109 |
margin: 0 0 0 10px;
|
110 |
+
display: inline-block;
|
111 |
}
|
112 |
#cookie-notice .cn-button:not(.cn-button-custom) {
|
113 |
font-family: -apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;
|
css/front.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#cookie-notice{position:fixed;min-width:100%;height:auto;z-index:100000;font-size:13px;letter-spacing:0;line-height:20px;left:0;text-align:center;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif}#cookie-notice,#cookie-notice *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cookie-notice.cn-animated{-webkit-animation-duration
|
1 |
+
#cookie-notice{position:fixed;min-width:100%;height:auto;z-index:100000;font-size:13px;letter-spacing:0;line-height:20px;left:0;text-align:center;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif}#cookie-notice,#cookie-notice *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cookie-notice.cn-animated{-webkit-animation-duration:.5s!important;animation-duration:.5s!important;-webkit-animation-fill-mode:both;animation-fill-mode:both}#cookie-notice.cn-animated.cn-effect-none{-webkit-animation-duration:.001s!important;animation-duration:.001s!important}#cookie-notice .cookie-notice-container{display:block}#cookie-notice.cookie-notice-hidden .cookie-notice-container{display:none}#cookie-notice .cookie-revoke-container{display:block}#cookie-notice.cookie-revoke-hidden .cookie-revoke-container{display:none}.cn-position-top{top:0}.cn-position-bottom{bottom:0}.cookie-notice-container{padding:15px 30px;text-align:center;width:100%;z-index:2}.cookie-revoke-container{padding:15px 30px;width:100%;z-index:1}.cn-close-icon{position:absolute;right:15px;top:50%;margin-top:-10px;width:15px;height:15px;opacity:.5;padding:10px;outline:none;cursor:pointer}.cn-close-icon:hover{opacity:1}.cn-close-icon:before,.cn-close-icon:after{position:absolute;content:' ';height:15px;width:2px;top:3px;background-color:rgba(128,128,128,1)}.cn-close-icon:before{transform:rotate(45deg)}.cn-close-icon:after{transform:rotate(-45deg)}#cookie-notice .cn-revoke-cookie{margin:0}#cookie-notice .cn-button{margin:0 0 0 10px;display:inline-block}#cookie-notice .cn-button:not(.cn-button-custom){font-family:-apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;font-weight:400;font-size:13px;letter-spacing:.25px;line-height:20px;margin:0 0 0 10px;text-align:center;text-transform:none;display:inline-block;cursor:pointer;touch-action:manipulation;white-space:nowrap;outline:none;box-shadow:none;text-shadow:none;border:none;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;text-decoration:none;padding:8.5px 10px;line-height:1;color:inherit}.cn-text-container{margin:0 0 6px}.cn-text-container,.cn-buttons-container{display:inline-block}#cookie-notice.cookie-notice-visible.cn-effect-none,#cookie-notice.cookie-revoke-visible.cn-effect-none{-webkit-animation-name:fadeIn;animation-name:fadeIn}#cookie-notice.cn-effect-none{-webkit-animation-name:fadeOut;animation-name:fadeOut}#cookie-notice.cookie-notice-visible.cn-effect-fade,#cookie-notice.cookie-revoke-visible.cn-effect-fade{-webkit-animation-name:fadeIn;animation-name:fadeIn}#cookie-notice.cn-effect-fade{-webkit-animation-name:fadeOut;animation-name:fadeOut}#cookie-notice.cookie-notice-visible.cn-effect-slide,#cookie-notice.cookie-revoke-visible.cn-effect-slide{-webkit-animation-name:slideInUp;animation-name:slideInUp}#cookie-notice.cn-effect-slide{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}#cookie-notice.cookie-notice-visible.cn-position-top.cn-effect-slide,#cookie-notice.cookie-revoke-visible.cn-position-top.cn-effect-slide{-webkit-animation-name:slideInDown;animation-name:slideInDown}#cookie-notice.cn-position-top.cn-effect-slide{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@media all and (max-width: 900px){.cookie-notice-container #cn-notice-text{display:block}.cookie-notice-container #cn-notice-buttons{display:block}#cookie-notice .cn-button{margin:0 5px 5px}}@media all and (max-width: 480px){.cookie-notice-container,.cookie-revoke-container{padding:15px 25px}}
|
includes/dashboard.php
CHANGED
@@ -69,6 +69,10 @@ class Cookie_Notice_Dashboard {
|
|
69 |
// styles
|
70 |
wp_enqueue_style( 'cn-admin-dashboard', plugins_url( '../css/admin-dashboard.css', __FILE__ ), [], Cookie_Notice()->defaults['version'] );
|
71 |
wp_enqueue_style( 'cn-microtip', plugins_url( '../assets/microtip/microtip.min.css', __FILE__ ), [], Cookie_Notice()->defaults['version'] );
|
|
|
|
|
|
|
|
|
72 |
|
73 |
// scripts
|
74 |
wp_enqueue_script( 'cn-admin-chartjs', plugins_url( '../assets/chartjs/chart.min.js', __FILE__ ), [ 'jquery' ], Cookie_Notice()->defaults['version'], true );
|
@@ -93,8 +97,8 @@ class Cookie_Notice_Dashboard {
|
|
93 |
'type' => 'doughnut',
|
94 |
'data' => array(
|
95 |
'labels' => array(
|
96 |
-
|
97 |
-
|
98 |
),
|
99 |
'datasets' => array(
|
100 |
array(
|
69 |
// styles
|
70 |
wp_enqueue_style( 'cn-admin-dashboard', plugins_url( '../css/admin-dashboard.css', __FILE__ ), [], Cookie_Notice()->defaults['version'] );
|
71 |
wp_enqueue_style( 'cn-microtip', plugins_url( '../assets/microtip/microtip.min.css', __FILE__ ), [], Cookie_Notice()->defaults['version'] );
|
72 |
+
|
73 |
+
// bail if COmpliance is not active
|
74 |
+
if ( Cookie_Notice()->get_status() !== 'active' )
|
75 |
+
return;
|
76 |
|
77 |
// scripts
|
78 |
wp_enqueue_script( 'cn-admin-chartjs', plugins_url( '../assets/chartjs/chart.min.js', __FILE__ ), [ 'jquery' ], Cookie_Notice()->defaults['version'], true );
|
97 |
'type' => 'doughnut',
|
98 |
'data' => array(
|
99 |
'labels' => array(
|
100 |
+
_x( 'Used', 'threshold limit', 'cookie-notice' ),
|
101 |
+
_x( 'Free', 'threshold limit', 'cookie-notice' )
|
102 |
),
|
103 |
'datasets' => array(
|
104 |
array(
|
includes/frontend.php
CHANGED
@@ -172,7 +172,7 @@ class Cookie_Notice_Frontend {
|
|
172 |
. '<span id="cn-notice-buttons" class="cn-buttons-container"><a href="#" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_class'] !== '' ? ' cn-button-custom ' . $options['css_class'] : '' ) . '" aria-label="' . esc_attr( $options['accept_text'] ) . '"' . ( $options['css_class'] == '' ? ' style="background-color: ' . esc_attr( $options['colors']['button'] ) . '"' : '' ) . '>' . esc_html( $options['accept_text'] ) . '</a>'
|
173 |
. ( $options['refuse_opt'] === true ? '<a href="#" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_class'] !== '' ? ' cn-button-custom ' . $options['css_class'] : '' ) . '" aria-label="' . esc_attr( $options['refuse_text'] ) . '"' . ( $options['css_class'] == '' ? ' style="background-color: ' . esc_attr( $options['colors']['button'] ) . '"' : '' ) . '>' . esc_html( $options['refuse_text'] ) . '</a>' : '' )
|
174 |
. ( $options['see_more'] === true && $options['link_position'] === 'banner' ? '<a href="' . ( $options['see_more_opt']['link_type'] === 'custom' ? esc_url( $options['see_more_opt']['link'] ) : get_permalink( $options['see_more_opt']['id'] ) ) . '" target="' . esc_attr( $options['link_target'] ) . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_class'] !== '' ? ' cn-button-custom ' . $options['css_class'] : '' ) . '" aria-label="' . esc_attr( $options['see_more_opt']['text'] ) . '"' . ( $options['css_class'] == '' ? ' style="background-color: ' . esc_attr( $options['colors']['button'] ) . '"' : '' ) . '>' . esc_html( $options['see_more_opt']['text'] ) . '</a>' : '' )
|
175 |
-
. '</span><span id="cn-close-notice" data-cookie-set="accept" class="cn-close-icon"
|
176 |
. '</div>
|
177 |
' . ( $options['refuse_opt'] === true && $options['revoke_cookies'] == true ?
|
178 |
'<div class="cookie-revoke-container" style="color: ' . esc_attr( $options['colors']['text'] ) . ';">'
|
172 |
. '<span id="cn-notice-buttons" class="cn-buttons-container"><a href="#" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_class'] !== '' ? ' cn-button-custom ' . $options['css_class'] : '' ) . '" aria-label="' . esc_attr( $options['accept_text'] ) . '"' . ( $options['css_class'] == '' ? ' style="background-color: ' . esc_attr( $options['colors']['button'] ) . '"' : '' ) . '>' . esc_html( $options['accept_text'] ) . '</a>'
|
173 |
. ( $options['refuse_opt'] === true ? '<a href="#" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_class'] !== '' ? ' cn-button-custom ' . $options['css_class'] : '' ) . '" aria-label="' . esc_attr( $options['refuse_text'] ) . '"' . ( $options['css_class'] == '' ? ' style="background-color: ' . esc_attr( $options['colors']['button'] ) . '"' : '' ) . '>' . esc_html( $options['refuse_text'] ) . '</a>' : '' )
|
174 |
. ( $options['see_more'] === true && $options['link_position'] === 'banner' ? '<a href="' . ( $options['see_more_opt']['link_type'] === 'custom' ? esc_url( $options['see_more_opt']['link'] ) : get_permalink( $options['see_more_opt']['id'] ) ) . '" target="' . esc_attr( $options['link_target'] ) . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_class'] !== '' ? ' cn-button-custom ' . $options['css_class'] : '' ) . '" aria-label="' . esc_attr( $options['see_more_opt']['text'] ) . '"' . ( $options['css_class'] == '' ? ' style="background-color: ' . esc_attr( $options['colors']['button'] ) . '"' : '' ) . '>' . esc_html( $options['see_more_opt']['text'] ) . '</a>' : '' )
|
175 |
+
. '</span><span id="cn-close-notice" data-cookie-set="accept" class="cn-close-icon" title="' . esc_attr( $options['refuse_text'] ) . '"></span>'
|
176 |
. '</div>
|
177 |
' . ( $options['refuse_opt'] === true && $options['revoke_cookies'] == true ?
|
178 |
'<div class="cookie-revoke-container" style="color: ' . esc_attr( $options['colors']['text'] ) . ';">'
|
js/front.js
CHANGED
@@ -426,7 +426,7 @@
|
|
426 |
}
|
427 |
|
428 |
// handle close icon
|
429 |
-
if ( closeIcon !==
|
430 |
closeIcon.addEventListener( 'click', function ( e ) {
|
431 |
e.preventDefault();
|
432 |
// Chrome double click event fix
|
426 |
}
|
427 |
|
428 |
// handle close icon
|
429 |
+
if ( closeIcon !== null ) {
|
430 |
closeIcon.addEventListener( 'click', function ( e ) {
|
431 |
e.preventDefault();
|
432 |
// Chrome double click event fix
|
js/front.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}(),function(){function t(e){return new RegExp("(^| )"+e+"( |$)")}function e(e,t,n){for(var i=0;i<e.length;i++)t.call(n,e[i])}function n(e){this.element=e}n.prototype={add:function(){e(arguments,function(e){this.contains(e)||(this.element.className+=0<this.element.className.length?" "+e:e)},this)},remove:function(){e(arguments,function(e){this.element.className=this.element.className.replace(t(e),"")},this)},toggle:function(e){return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)},contains:function(e){return t(e).test(this.element.className)},replace:function(e,t){this.remove(e),this.add(t)}},"classList"in Element.prototype||Object.defineProperty(Element.prototype,"classList",{get:function(){return new n(this)}}),window.DOMTokenList&&null==DOMTokenList.prototype.replace&&(DOMTokenList.prototype.replace=n.prototype.replace)}(),function(s,c){var e=new function(){this.cookiesAccepted=null,this.noticeContainer=null,this.setStatus=function(e){var t=this;"1"===cnArgs.onScroll&&s.removeEventListener("scroll",this.handleScroll);var n=new Date,i=new Date;"accept"===e?(e="true",i.setTime(parseInt(n.getTime())+1e3*parseInt(cnArgs.cookieTime))):(e="false",i.setTime(parseInt(n.getTime())+1e3*parseInt(cnArgs.cookieTimeRejected))),c.cookie=cnArgs.cookieName+"="+e+";expires="+i.toUTCString()+";"+(cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":"")+("1"===cnArgs.secure?"secure;":""),this.cookiesAccepted="true"===e;i=new CustomEvent("setCookieNotice",{detail:{value:e,time:n,expires:i,data:cnArgs}});c.dispatchEvent(i),this.setBodyClass(["cookies-set","true"===e?"cookies-accepted":"cookies-refused"]),this.hideCookieNotice(),"automatic"===cnArgs.revokeCookiesOpt&&(this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.showRevokeNotice()}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.showRevokeNotice()})),"1"===cnArgs.redirection&&("true"===e&&null===this.cookiesAccepted||e!==this.cookiesAccepted&&null!==this.cookiesAccepted)&&(i=s.location.protocol+"//",e=s.location.host+"/"+s.location.pathname,"1"===cnArgs.cache?(i=i+e.replace("//","/")+(""===s.location.search?"?":s.location.search+"&")+"cn-reloaded=1"+s.location.hash,s.location.href=i):(i=i+e.replace("//","/")+s.location.search+s.location.hash,s.location.reload(!0)))},this.getStatus=function(e){var t=("; "+c.cookie).split("; cookie_notice_accepted=");if(2!==t.length)return null;t=t.pop().split(";").shift();return e?"true"===t:t},this.showCookieNotice=function(){var t=this,e=new CustomEvent("showCookieNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.remove("cookie-notice-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated")})},this.hideCookieNotice=function(){var t=this,e=new CustomEvent("hideCookieNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-notice-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-notice-hidden")})},this.showRevokeNotice=function(){var t=this,e=new CustomEvent("showRevokeNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.remove("cookie-revoke-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated")})},this.hideRevokeNotice=function(){var t=this,e=new CustomEvent("hideRevokeNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-revoke-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-revoke-hidden")})},this.setBodyClass=function(e){c.body.classList.remove("cookies-revoke"),c.body.classList.remove("cookies-accepted"),c.body.classList.remove("cookies-refused"),c.body.classList.remove("cookies-set"),c.body.classList.remove("cookies-not-set");for(var t=0;t<e.length;t++)c.body.classList.add(e[t])},this.handleScroll=function(){(s.pageYOffset||(c.documentElement||c.body.parentNode||c.body).scrollTop)>parseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.getClosest=function(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n});e&&e!==c;e=e.parentNode)if(e.matches(t))return e;return null},this.inIframe=function(){try{return s.self!==s.top}catch(e){return!0}},this.init=function(){var t=this;if(!0!==this.inIframe()){this.cookiesAccepted=this.getStatus(!0),this.noticeContainer=c.getElementById("cookie-notice");var e=c.getElementsByClassName("cn-set-cookie"),n=c.getElementsByClassName("cn-revoke-cookie"),i=c.getElementById("cn-close-notice");this.noticeContainer.classList.add("cn-effect-"+cnArgs.hideEffect),null===this.cookiesAccepted?("1"===cnArgs.onScroll&&s.addEventListener("scroll",function(e){t.handleScroll()}),"1"===cnArgs.onClick&&s.addEventListener("click",function(e){null===t.getClosest(e.target,"#cookie-notice")&&t.setStatus("accept")},!0),this.setBodyClass(["cookies-not-set"]),this.showCookieNotice()):(this.setBodyClass(["cookies-set",!0===this.cookiesAccepted?"cookies-accepted":"cookies-refused"]),"1"===cnArgs.revokeCookies&&"automatic"===cnArgs.revokeCookiesOpt&&this.showRevokeNotice());for(var o=0;o<e.length;o++)e[o].addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setStatus(this.dataset.cookieSet)});
|
1 |
+
!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}(),function(){function t(e){return new RegExp("(^| )"+e+"( |$)")}function e(e,t,n){for(var i=0;i<e.length;i++)t.call(n,e[i])}function n(e){this.element=e}n.prototype={add:function(){e(arguments,function(e){this.contains(e)||(this.element.className+=0<this.element.className.length?" "+e:e)},this)},remove:function(){e(arguments,function(e){this.element.className=this.element.className.replace(t(e),"")},this)},toggle:function(e){return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)},contains:function(e){return t(e).test(this.element.className)},replace:function(e,t){this.remove(e),this.add(t)}},"classList"in Element.prototype||Object.defineProperty(Element.prototype,"classList",{get:function(){return new n(this)}}),window.DOMTokenList&&null==DOMTokenList.prototype.replace&&(DOMTokenList.prototype.replace=n.prototype.replace)}(),function(s,c){var e=new function(){this.cookiesAccepted=null,this.noticeContainer=null,this.setStatus=function(e){var t=this;"1"===cnArgs.onScroll&&s.removeEventListener("scroll",this.handleScroll);var n=new Date,i=new Date;"accept"===e?(e="true",i.setTime(parseInt(n.getTime())+1e3*parseInt(cnArgs.cookieTime))):(e="false",i.setTime(parseInt(n.getTime())+1e3*parseInt(cnArgs.cookieTimeRejected))),c.cookie=cnArgs.cookieName+"="+e+";expires="+i.toUTCString()+";"+(cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":"")+("1"===cnArgs.secure?"secure;":""),this.cookiesAccepted="true"===e;i=new CustomEvent("setCookieNotice",{detail:{value:e,time:n,expires:i,data:cnArgs}});c.dispatchEvent(i),this.setBodyClass(["cookies-set","true"===e?"cookies-accepted":"cookies-refused"]),this.hideCookieNotice(),"automatic"===cnArgs.revokeCookiesOpt&&(this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.showRevokeNotice()}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.showRevokeNotice()})),"1"===cnArgs.redirection&&("true"===e&&null===this.cookiesAccepted||e!==this.cookiesAccepted&&null!==this.cookiesAccepted)&&(i=s.location.protocol+"//",e=s.location.host+"/"+s.location.pathname,"1"===cnArgs.cache?(i=i+e.replace("//","/")+(""===s.location.search?"?":s.location.search+"&")+"cn-reloaded=1"+s.location.hash,s.location.href=i):(i=i+e.replace("//","/")+s.location.search+s.location.hash,s.location.reload(!0)))},this.getStatus=function(e){var t=("; "+c.cookie).split("; cookie_notice_accepted=");if(2!==t.length)return null;t=t.pop().split(";").shift();return e?"true"===t:t},this.showCookieNotice=function(){var t=this,e=new CustomEvent("showCookieNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.remove("cookie-notice-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated")})},this.hideCookieNotice=function(){var t=this,e=new CustomEvent("hideCookieNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-notice-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-notice-hidden")})},this.showRevokeNotice=function(){var t=this,e=new CustomEvent("showRevokeNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.remove("cookie-revoke-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated")})},this.hideRevokeNotice=function(){var t=this,e=new CustomEvent("hideRevokeNotice",{detail:{data:cnArgs}});c.dispatchEvent(e),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-revoke-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.noticeContainer.classList.remove("cn-animated"),t.noticeContainer.classList.add("cookie-revoke-hidden")})},this.setBodyClass=function(e){c.body.classList.remove("cookies-revoke"),c.body.classList.remove("cookies-accepted"),c.body.classList.remove("cookies-refused"),c.body.classList.remove("cookies-set"),c.body.classList.remove("cookies-not-set");for(var t=0;t<e.length;t++)c.body.classList.add(e[t])},this.handleScroll=function(){(s.pageYOffset||(c.documentElement||c.body.parentNode||c.body).scrollTop)>parseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.getClosest=function(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n});e&&e!==c;e=e.parentNode)if(e.matches(t))return e;return null},this.inIframe=function(){try{return s.self!==s.top}catch(e){return!0}},this.init=function(){var t=this;if(!0!==this.inIframe()){this.cookiesAccepted=this.getStatus(!0),this.noticeContainer=c.getElementById("cookie-notice");var e=c.getElementsByClassName("cn-set-cookie"),n=c.getElementsByClassName("cn-revoke-cookie"),i=c.getElementById("cn-close-notice");this.noticeContainer.classList.add("cn-effect-"+cnArgs.hideEffect),null===this.cookiesAccepted?("1"===cnArgs.onScroll&&s.addEventListener("scroll",function(e){t.handleScroll()}),"1"===cnArgs.onClick&&s.addEventListener("click",function(e){null===t.getClosest(e.target,"#cookie-notice")&&t.setStatus("accept")},!0),this.setBodyClass(["cookies-not-set"]),this.showCookieNotice()):(this.setBodyClass(["cookies-set",!0===this.cookiesAccepted?"cookies-accepted":"cookies-refused"]),"1"===cnArgs.revokeCookies&&"automatic"===cnArgs.revokeCookiesOpt&&this.showRevokeNotice());for(var o=0;o<e.length;o++)e[o].addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setStatus(this.dataset.cookieSet)});null!==i&&i.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setStatus("reject")});for(o=0;o<n.length;o++)n[o].addEventListener("click",function(e){e.preventDefault(),t.noticeContainer.classList.contains("cookie-revoke-visible")?(t.hideRevokeNotice(),t.noticeContainer.addEventListener("animationend",function e(){t.noticeContainer.removeEventListener("animationend",e),t.showCookieNotice()}),t.noticeContainer.addEventListener("webkitAnimationEnd",function e(){t.noticeContainer.removeEventListener("webkitAnimationEnd",e),t.showCookieNotice()})):t.noticeContainer.classList.contains("cookie-notice-hidden")&&t.noticeContainer.classList.contains("cookie-revoke-hidden")&&t.showCookieNotice()})}}};s.addEventListener("load",function(){e.init()},!1)}(window,document);
|
languages/cookie-notice.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Cookie Notice\n"
|
5 |
-
"POT-Creation-Date: 2022-
|
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"
|
@@ -96,88 +96,80 @@ msgstr ""
|
|
96 |
msgid "Cookie Compliance"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../includes/dashboard.php:
|
100 |
-
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
-
#: ../includes/dashboard.php:97 ../includes/welcome.php:264
|
104 |
-
msgid "Free"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: ../includes/dashboard.php:142 ../includes/dashboard.php:154
|
108 |
-
#: ../includes/dashboard.php:166
|
109 |
#, php-format
|
110 |
msgid "Level %s"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: ../includes/dashboard.php:
|
114 |
msgid "Traffic Overview"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: ../includes/dashboard.php:
|
118 |
msgid "Displays the general visits information for your domain."
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: ../includes/dashboard.php:
|
122 |
msgid "Consent Activity"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: ../includes/dashboard.php:
|
126 |
msgid "Displays the chart of the domain consent activity in the last 30 days."
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: ../includes/dashboard.php:
|
130 |
msgid "View consent activity inside WordPress Dashboard"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: ../includes/dashboard.php:
|
134 |
msgid "Display information about the visits."
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: ../includes/dashboard.php:
|
138 |
msgid "Get Consent logs data for the last 30 days."
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: ../includes/dashboard.php:
|
142 |
msgid "Enable consent purpose categories, automatic cookie blocking and more."
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: ../includes/dashboard.php:
|
146 |
msgid "Upgrade to Cookie Compliance"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: ../includes/dashboard.php:
|
150 |
msgid "Total Visits"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: ../includes/dashboard.php:
|
154 |
msgid "Last 30 days"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: ../includes/dashboard.php:
|
158 |
msgid "Consent Logs"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: ../includes/dashboard.php:
|
162 |
#, php-format
|
163 |
msgid "Updated %s"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: ../includes/dashboard.php:
|
167 |
msgid "Traffic Usage"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: ../includes/dashboard.php:
|
171 |
#, php-format
|
172 |
msgid "Visits usage: %1$s / %2$s"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: ../includes/dashboard.php:
|
176 |
#, php-format
|
177 |
msgid "Cycle started: %s"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: ../includes/dashboard.php:
|
181 |
#, php-format
|
182 |
msgid "Days to go: %s"
|
183 |
msgstr ""
|
@@ -860,6 +852,10 @@ msgstr ""
|
|
860 |
msgid "Basic"
|
861 |
msgstr ""
|
862 |
|
|
|
|
|
|
|
|
|
863 |
#: ../includes/welcome.php:267 ../includes/welcome.php:287
|
864 |
#: ../includes/welcome.php:308
|
865 |
msgid "GDPR, CCPA, ePrivacy, PECR compliance"
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Cookie Notice\n"
|
5 |
+
"POT-Creation-Date: 2022-03-01 17:10+0100\n"
|
6 |
"PO-Revision-Date: 2015-03-24 11:30+0100\n"
|
7 |
"Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
|
8 |
"Language-Team: dFactory <info@dfactory.eu>\n"
|
96 |
msgid "Cookie Compliance"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: ../includes/dashboard.php:146 ../includes/dashboard.php:158
|
100 |
+
#: ../includes/dashboard.php:170
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
#, php-format
|
102 |
msgid "Level %s"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: ../includes/dashboard.php:250
|
106 |
msgid "Traffic Overview"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: ../includes/dashboard.php:251
|
110 |
msgid "Displays the general visits information for your domain."
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: ../includes/dashboard.php:255
|
114 |
msgid "Consent Activity"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: ../includes/dashboard.php:256
|
118 |
msgid "Displays the chart of the domain consent activity in the last 30 days."
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: ../includes/dashboard.php:276
|
122 |
msgid "View consent activity inside WordPress Dashboard"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: ../includes/dashboard.php:277
|
126 |
msgid "Display information about the visits."
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: ../includes/dashboard.php:278
|
130 |
msgid "Get Consent logs data for the last 30 days."
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: ../includes/dashboard.php:279
|
134 |
msgid "Enable consent purpose categories, automatic cookie blocking and more."
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: ../includes/dashboard.php:280
|
138 |
msgid "Upgrade to Cookie Compliance"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: ../includes/dashboard.php:372
|
142 |
msgid "Total Visits"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: ../includes/dashboard.php:374
|
146 |
msgid "Last 30 days"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: ../includes/dashboard.php:377
|
150 |
msgid "Consent Logs"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: ../includes/dashboard.php:379
|
154 |
#, php-format
|
155 |
msgid "Updated %s"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: ../includes/dashboard.php:397
|
159 |
msgid "Traffic Usage"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: ../includes/dashboard.php:400
|
163 |
#, php-format
|
164 |
msgid "Visits usage: %1$s / %2$s"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: ../includes/dashboard.php:401
|
168 |
#, php-format
|
169 |
msgid "Cycle started: %s"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: ../includes/dashboard.php:402
|
173 |
#, php-format
|
174 |
msgid "Days to go: %s"
|
175 |
msgstr ""
|
852 |
msgid "Basic"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: ../includes/welcome.php:264
|
856 |
+
msgid "Free"
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
#: ../includes/welcome.php:267 ../includes/welcome.php:287
|
860 |
#: ../includes/welcome.php:308
|
861 |
msgid "GDPR, CCPA, ePrivacy, PECR compliance"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gdpr, ccpa, cookies, consent, compliance
|
|
4 |
Requires at least: 4.3
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.9.1
|
7 |
-
Stable tag: 2.2.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -114,10 +114,19 @@ Yes! The plugin + web appliaction version includes technical compliance features
|
|
114 |
|
115 |
== Screenshots ==
|
116 |
|
117 |
-
1.
|
|
|
|
|
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= 2.2.2 =
|
122 |
* Fix: Uncrawlable close notice link
|
123 |
* Tweak: WordPress 5.9 compatibility
|
@@ -406,8 +415,8 @@ Initial release
|
|
406 |
|
407 |
== Upgrade Notice ==
|
408 |
|
409 |
-
= 2.2.
|
410 |
-
* Fix:
|
411 |
-
*
|
412 |
-
* Tweak:
|
413 |
-
* Tweak:
|
4 |
Requires at least: 4.3
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.9.1
|
7 |
+
Stable tag: 2.2.3
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
114 |
|
115 |
== Screenshots ==
|
116 |
|
117 |
+
1. Cookie Notice settings, Compliance itegration inactive
|
118 |
+
2. Cookie Notice settings, Compliance itegration active
|
119 |
+
3. Cookie Compliance dashboard overview
|
120 |
+
4. Cookie Compliance settings
|
121 |
|
122 |
== Changelog ==
|
123 |
|
124 |
+
= 2.2.3 =
|
125 |
+
* Fix: Undefined notice in WP dashboard
|
126 |
+
* Fix: Close icon event not firing
|
127 |
+
* Tweak: Remove aria-label from the close icon
|
128 |
+
* Tweak: CSS tweaks in the admin
|
129 |
+
|
130 |
= 2.2.2 =
|
131 |
* Fix: Uncrawlable close notice link
|
132 |
* Tweak: WordPress 5.9 compatibility
|
415 |
|
416 |
== Upgrade Notice ==
|
417 |
|
418 |
+
= 2.2.3 =
|
419 |
+
* Fix: Undefined notice in WP dashboard
|
420 |
+
* Fix: Close icon event not firing
|
421 |
+
* Tweak: Remove aria-label from the close icon
|
422 |
+
* Tweak: CSS tweaks in the admin
|