Version Description
- New: Introducing Cookie Compliance for GDPR/CCPA
Download this release
Release Info
Developer | dfactory |
Plugin | Cookie Notice by dFactory |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 2.0.0
- assets/spectrum/spectrum.min.css +1 -0
- assets/spectrum/spectrum.min.js +1 -0
- cookie-notice.php +107 -1239
- css/admin-welcome.css +1350 -0
- css/admin.css +82 -6
- css/admin.min.css +195 -1
- css/front.css +1 -1
- css/front.min.css +377 -1
- img/cookie-compliance-logo-dark.png +0 -0
- img/cookie-compliance-logo.png +0 -0
- img/cookie-notice-logo-dark.png +0 -0
- img/hu-logo.png +0 -0
- img/layout-bottom.png +0 -0
- img/layout-bottom.svg +1 -0
- img/layout-center.png +0 -0
- img/layout-center.svg +1 -0
- img/layout-left.png +0 -0
- img/layout-left.svg +1 -0
- img/layout-right.png +0 -0
- img/layout-right.svg +1 -0
- img/layout-top.png +0 -0
- img/layout-top.svg +1 -0
- img/screen-compliance.png +0 -0
- img/screen-dashboard.png +0 -0
- img/screen-notice.png +0 -0
- img/screen-plus.png +0 -0
- includes/bot-detect.php +969 -0
- includes/frontend.php +322 -0
- includes/settings.php +1203 -0
- includes/welcome-api.php +769 -0
- includes/welcome-frontend.php +127 -0
- includes/welcome.php +626 -0
- js/admin-notice.js +9 -7
- js/admin-welcome.js +521 -0
- js/admin.js +36 -19
- js/admin.min.js +94 -1
- js/front-compliance.js +45 -0
- js/front-welcome.js +338 -0
- js/front.js +1 -87
- languages/cookie-notice.pot +1530 -215
- readme.txt +31 -40
- templates/empty.html +1 -0
assets/spectrum/spectrum.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-original-input-container{position:relative;display:inline-flex}.sp-original-input-container input{margin:0!important}.sp-original-input-container .sp-add-on{width:40px;border-top-right-radius:0!important;border-bottom-right-radius:0!important}input.spectrum.with-add-on{border-top-left-radius:0;border-bottom-left-radius:0;border-left:0}.sp-original-input-container .sp-add-on .sp-colorize{height:100%;width:100%;border-radius:inherit}.sp-colorize-container{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20px!important}.sp-hue{position:absolute;top:0;right:0;bottom:0;width:12px;height:100%;left:initial!important}.sp-clear-enabled .sp-hue{top:15%;height:85%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:28px!important}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-3px;cursor:pointer;height:16px;border-radius:50%;width:16px;margin-right:5px;left:-2px;right:0;background:#f9f9f9;box-shadow:0 0 2px 0 #3a3a3a}.sp-alpha{display:none;position:absolute;bottom:-18px;right:0;left:0;height:10px}.sp-alpha-inner{border-radius:4px}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:3px;right:0;bottom:0;cursor:pointer;left:initial;height:12px;width:12px}.sp-alpha,.sp-alpha-handle,.sp-clear,.sp-container,.sp-container button,.sp-container.sp-dragging .sp-input,.sp-dragger,.sp-preview,.sp-replacer,.sp-slider{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#fff),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0))}.sp-val{border-radius:4px;background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0))}.sp-hue{background:-moz-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-ms-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-o-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-webkit-gradient(linear,left top,left bottom,from(red),color-stop(.17,#ff0),color-stop(.33,#0f0),color-stop(.5,#0ff),color-stop(.67,#00f),color-stop(.83,#f0f),to(red));background:-webkit-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:linear-gradient(to bottom,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}.sp-1{height:17%}.sp-2{height:16%}.sp-3{height:17%}.sp-4{height:17%}.sp-5{height:16%}.sp-6{height:17%}.sp-hidden{display:none!important}.sp-cf:after,.sp-cf:before{content:"";display:table}.sp-cf:after{clear:both}@media (max-device-width:480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:10px;width:10px;border:1px solid #fff;cursor:pointer;position:absolute;top:0;left:0;margin-left:3px;margin-top:3px;box-shadow:0 0 2px 1px rgba(0,0,0,.2)}.sp-slider{position:absolute;top:0;cursor:pointer;height:16px;border-radius:50%;width:16px;left:-2px;background:#f9f9f9;box-shadow:0 0 2px 0 #3a3a3a;margin-top:8px}.sp-container{display:inline-flex;border-radius:0;background-color:#fff;padding:0;border-radius:4px;color:#000;box-shadow:0 0 0 1px rgba(99,114,130,.16),0 8px 16px rgba(27,39,51,.08)}.sp-clear,.sp-color,.sp-container,.sp-container button,.sp-container input,.sp-hue{font-size:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:10px}.sp-clear,.sp-color,.sp-hue,.sp-sat,.sp-val{border-radius:3px}.sp-input-container{margin-top:-5px}.sp-button-container.sp-cf,.sp-initial.sp-thumb.sp-cf,.sp-input-container.sp-cf{height:25px}.sp-picker-container .sp-cf{margin-bottom:10px}.sp-palette-row-initial>span:first-child{cursor:pointer}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{padding:0 5px!important;margin:0;width:100%;box-shadow:none!important;height:100%!important;background:0 0;color:#3a3a3a;border-radius:2px!important;border:1px solid #e0e0e0!important;text-align:center;font-family:monospace;font-size:inherit!important}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-palette-container,.sp-picker-container{position:relative;padding:10px}.sp-picker-container{width:200px;padding-bottom:0}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .spe-thumb-el.sp-thumb-active{border-radius:0 5px 5px 0}.sp-initial .spe-thumb-el{border-radius:5px 0 0 5px}.sp-initial .sp-clear-display{background-position:center}.sp-button-container{float:right}.sp-palette-button-container{margin-top:10px}.sp-replacer{position:relative;overflow:hidden;cursor:pointer;display:inline-block;border-radius:3px;border:1px solid #aaa;color:#666;transition:border-color .3s;vertical-align:middle;width:3rem;height:1.5rem}.sp-replacer.sp-active,.sp-replacer:hover{border:1px solid #666;color:#000}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{position:absolute;font-size:10px;right:0;top:0;bottom:0;padding:0 2px;line-height:1.6rem;background-color:#fff}.sp-preview{position:relative;width:100%;height:100%;float:left;z-index:0}.sp-preview-inner{transition:background-color .2s}.sp-preview-inner.sp-clear-display{display:none}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:3px;border:none;border-radius:3px}.sp-container button{border-radius:3px;border:none;background:0 0;line-height:1;padding:0 8px;height:25px;text-transform:capitalize;text-align:center;vertical-align:middle;cursor:pointer;color:#606c72;font-weight:700}.sp-container button.sp-choose{background-color:#3cab3b;color:#fff;margin-left:5px}.sp-container button:hover{opacity:.8}.sp-container button.sp-palette-toggle{width:100%;background-color:#f3f3f3;margin:0}.sp-palette span.sp-thumb-active,.sp-palette span:hover{border-color:#000}.sp-alpha,.sp-preview,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-alpha-inner,.sp-preview-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{border-radius:3px;background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABe0lEQVQokYXSsUtcQRTF4d8Jj+VhHSxkEQuLsEUKK0nhTBFTmLSSUhBCMCAWsmgIwWrBLk0akfwLCaSQKBJmtrIIISwpRFKIhViETScphGMzysMtvOVwvpm5d0bGNCuGWAOPgYdl6S8wSDn9b+bUhDHEKWAdeAFMANg+l/TV9ofcz6cjMIbYBvaBMds7QCqZ58CmpBNgPuV0DvAAIMyFGugWtJr7eTv38xEwkPRPErY7QDeG2LqFkjrAgu0dSd/KDVqSNmxvAZ8lfbS9AHRuYemnLWkv5XRVBrQMbAI/gTXgEzAJtJuwBVS2L2OIle03QA/4Lmkl5XQBXEqqbFcAVYFDYChpFngiqWf7l6TXKaezMt2Zkhk24THwG+jZriX9AFZvUAyxLbRke2D75O5zPAO+ADXwEtizjaRHwDvbTyUtppwOmicCHAJvbXcl9YA1SQDjtseA97YPRz7ATcUQp2y/kjRdevsjaTfldNrMjcDGBjXA3T96L7yvrgFzP69+0Ao/HAAAAABJRU5ErkJggg==)}
|
assets/spectrum/spectrum.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):e(jQuery)}(function(De,qe){"use strict";var e,Ie={beforeShow:a,move:a,change:a,show:a,hide:a,color:!1,flat:!1,type:"",showInput:!1,allowEmpty:!0,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!0,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:8,locale:"en",cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:"name",className:"",containerClassName:"",replacerClassName:"",showAlpha:!0,theme:"sp-light",palette:[["#000000","#444444","#5b5b5b","#999999","#bcbcbc","#eeeeee","#f3f6f4","#ffffff"],["#f44336","#744700","#ce7e00","#8fce00","#2986cc","#16537e","#6a329f","#c90076"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#cc0000","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#990000","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#660000","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],selectionPalette:[],disabled:!1,offset:null},Ve=[],We=!!/msie/i.exec(window.navigator.userAgent),Be=((e=document.createElement("div").style).cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")),Ke=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>","</div>"].join(""),$e=function(){var e="";if(We)for(var t=1;t<=6;t++)e+="<div class='sp-"+t+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",e,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<button class='sp-cancel' href='#'></button>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}();function t(e,t){return!!~(""+e).indexOf(t)}function Xe(e,t,a,o){for(var r=[],n=0;n<e.length;n++){var s=e[n];if(s){var i=tinycolor(s),l=i.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";l+=tinycolor.equals(t,s)?" sp-thumb-active":"";var c=i.toString(o.preferredFormat||"rgb"),u=Be?"background-color:"+i.toRgbString():"filter:"+i.toFilter();r.push('<span title="'+c+'" data-color="'+i.toRgbString()+'" class="'+l+'"><span class="sp-thumb-inner" style="'+u+';"></span></span>')}else r.push('<span class="sp-thumb-el sp-clear-display" ><span class="sp-clear-palette-only" style="background-color: transparent;"></span></span>')}return"<div class='sp-cf "+a+"'>"+r.join("")+"</div>"}function n(e,t){var a,o,r,n,h=function(e,t){e.locale=e.locale||window.navigator.language,e.locale&&(e.locale=e.locale.split("-")[0].toLowerCase()),"en"!=e.locale&&De.spectrum.localization[e.locale]&&(e=De.extend({},De.spectrum.localization[e.locale],e));var a=De.extend({},Ie,e);return a.callbacks={move:Ge(a.move,t),change:Ge(a.change,t),show:Ge(a.show,t),hide:Ge(a.hide,t),beforeShow:Ge(a.beforeShow,t)},a}(t,e),s=h.type,d="flat"==s,i=h.showSelectionPalette,l=h.localStorageKey,c=h.theme,u=h.callbacks,f=(a=Qe,function(){var e=this,t=arguments;r&&clearTimeout(n),!r&&n||(n=setTimeout(function(){n=null,a.apply(e,t)},o))}),p=!(o=10),g=!1,b=0,m=0,v=0,x=0,y=0,T=0,w=0,_=0,k=0,P=0,C=1,S=[],M=[],z={},j=h.selectionPalette.slice(0),A=h.maxSelectionSize,R="sp-dragging",F=!1,H=null,L=e.ownerDocument,O=(L.body,De(e)),Q=!1,E=De($e,L).addClass(c),N=E.find(".sp-picker-container"),D=E.find(".sp-color"),q=E.find(".sp-dragger"),I=E.find(".sp-hue"),V=E.find(".sp-slider"),W=E.find(".sp-alpha-inner"),B=E.find(".sp-alpha"),K=E.find(".sp-alpha-handle"),$=E.find(".sp-input"),X=E.find(".sp-palette"),Y=E.find(".sp-initial"),G=E.find(".sp-cancel"),U=E.find(".sp-clear"),J=E.find(".sp-choose"),Z=E.find(".sp-palette-toggle"),ee=O.is("input"),te=(ee&&"color"===O.attr("type")&&Je(),ee&&"color"==s),ae=te?De(Ke).addClass(c).addClass(h.className).addClass(h.replacerClassName):De([]),oe=te?ae:O,re=ae.find(".sp-preview-inner"),ne=h.color||ee&&O.val(),se=!1,ie=h.preferredFormat,le=!h.showButtons||h.clickoutFiresChange,ce=!ne,ue=h.allowEmpty,fe=null,he=null,de=null,pe=null,ge=O.attr("id");if(ge!==qe&&0<ge.length){var be=De('label[for="'+ge+'"]');be.length&&be.on("click",function(e){return e.preventDefault(),O.spectrum("show"),!1})}function me(){if(h.showPaletteOnly&&(h.showPalette=!0),Z.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),h.palette){S=h.palette.slice(0),M=De.isArray(S[0])?S:[S],z={};for(var e=0;e<M.length;e++)for(var t=0;t<M[e].length;t++){var a=tinycolor(M[e][t]).toRgbString();z[a]=!0}h.showPaletteOnly&&!ne&&(ne=""===S[0][0]?S[0][0]:Object.keys(z)[0])}E.toggleClass("sp-flat",d),E.toggleClass("sp-input-disabled",!h.showInput),E.toggleClass("sp-alpha-enabled",h.showAlpha),E.toggleClass("sp-clear-enabled",ue),E.toggleClass("sp-buttons-disabled",!h.showButtons),E.toggleClass("sp-palette-buttons-disabled",!h.togglePaletteOnly),E.toggleClass("sp-palette-disabled",!h.showPalette),E.toggleClass("sp-palette-only",h.showPaletteOnly),E.toggleClass("sp-initial-disabled",!h.showInitial),E.addClass(h.className).addClass(h.containerClassName),Qe()}function ve(){if(l){try{var e=window.localStorage,t=e[l].split(",#");1<t.length&&(delete e[l],De.each(t,function(e,t){xe(t)}))}catch(e){}try{j=window.localStorage[l].split(";")}catch(e){}}}function xe(e){if(i){var t=tinycolor(e).toRgbString();if(!z[t]&&-1===De.inArray(t,j))for(j.push(t);j.length>A;)j.shift();if(l)try{window.localStorage[l]=j.join(";")}catch(e){}}}function ye(){var a=Re(),e=De.map(M,function(e,t){return Xe(e,a,"sp-palette-row sp-palette-row-"+t,h)});ve(),j&&e.push(Xe(function(){var e=[];if(h.showPalette)for(var t=0;t<j.length;t++){var a=tinycolor(j[t]).toRgbString();z[a]||e.push(j[t])}return e.reverse().slice(0,h.maxSelectionSize)}(),a,"sp-palette-row sp-palette-row-selection",h)),X.html(e.join(""))}function Te(){if(h.showInitial){var e=se,t=Re();Y.html(Xe([e,t],t,"sp-palette-row-initial",h))}}function we(){(m<=0||b<=0||x<=0)&&Qe(),g=!0,E.addClass(R),H=null,O.trigger("dragstart.spectrum",[Re()])}function _e(){g=!1,E.removeClass(R),O.trigger("dragstop.spectrum",[Re()])}function ke(e){if(F)F=!1;else if(null!==e&&""!==e||!ue){var t=tinycolor(e);t.isValid()?(Ae(t),Fe(),Oe()):$.addClass("sp-validation-error")}else Ae(null),Fe(),Oe()}function Pe(){(p?ze:Ce)()}function Ce(){var e=De.Event("beforeShow.spectrum");p?Qe():(O.trigger(e,[Re()]),!1===u.beforeShow(Re())||e.isDefaultPrevented()||(function(){for(var e=0;e<Ve.length;e++)Ve[e]&&Ve[e].hide()}(),p=!0,De(L).on("keydown.spectrum",Se),De(L).on("click.spectrum",Me),De(window).on("resize.spectrum",f),ae.addClass("sp-active"),E.removeClass("sp-hidden"),Qe(),He(),se=Re(),Te(),u.show(se),O.trigger("show.spectrum",[se])))}function Se(e){27===e.keyCode&&ze()}function Me(e){2!=e.button&&(g||(le?Oe(!0):je(),ze()))}function ze(){p&&!d&&(p=!1,De(L).off("keydown.spectrum",Se),De(L).off("click.spectrum",Me),De(window).off("resize.spectrum",f),ae.removeClass("sp-active"),E.addClass("sp-hidden"),u.hide(Re()),O.trigger("hide.spectrum",[Re()]))}function je(){Ae(se,!0),Oe(!0)}function Ae(e,t){var a,o;tinycolor.equals(e,Re())?He():(e&&e!==qe||!ue?(ce=!1,o=(a=tinycolor(e)).toHsv(),_=o.h%360/360,k=o.s,P=o.v,C=o.a):ce=!0,He(),a&&a.isValid()&&!t&&(ie=h.preferredFormat||a.getFormat()))}function Re(e){return e=e||{},ue&&ce?null:tinycolor.fromRatio({h:_,s:k,v:P,a:Math.round(1e3*C)/1e3},{format:e.format||ie})}function Fe(){He(),u.move(Re()),O.trigger("move.spectrum",[Re()])}function He(){$.removeClass("sp-validation-error"),Le();var e=tinycolor.fromRatio({h:_,s:1,v:1});D.css("background-color",e.toHexString());var t=ie;C<1&&(0!==C||"name"!==t)&&("hex"!==t&&"hex3"!==t&&"hex6"!==t&&"name"!==t||(t="rgb"));var a=Re({format:t}),o="";if(re.removeClass("sp-clear-display"),re.css("background-color","transparent"),!a&&ue)re.addClass("sp-clear-display");else{var r=a.toHexString(),n=a.toRgbString();if(Be||1===a.alpha?re.css("background-color",n):(re.css("background-color","transparent"),re.css("filter",a.toFilter())),h.showAlpha){var s=a.toRgb();s.a=0;var i=tinycolor(s).toRgbString(),l="linear-gradient(left, "+i+", "+r+")";We?W.css("filter",tinycolor(i).toFilter({gradientType:1},r)):(W.css("background","-webkit-"+l),W.css("background","-moz-"+l),W.css("background","-ms-"+l),W.css("background","linear-gradient(to right, "+i+", "+r+")"))}o=a.toString(t)}if(h.showInput&&$.val(o),O.val(o),"text"==h.type||"component"==h.type){var c=a;if(c&&he){var u=c.isLight()||c.getAlpha()<.4?"black":"white";he.css("background-color",c.toRgbString()).css("color",u)}else he.css("background-color",pe).css("color",de)}h.showPalette&&ye(),Te()}function Le(){var e=k,t=P;if(ue&&ce)K.hide(),V.hide(),q.hide();else{K.show(),V.show(),q.show();var a=e*b,o=m-t*m;a=Math.max(-v,Math.min(b-v,a-v)),o=Math.max(-v,Math.min(m-v,o-v)),q.css({top:o+"px",left:a+"px"});var r=C*y;K.css({left:r-T/2+"px"});var n=_*x;V.css({top:n-w+"px"})}}function Oe(e){var t=Re(),a=!tinycolor.equals(t,se);t&&(t.toString(ie),xe(t)),e&&a&&(u.change(t),F=!0,O.trigger("change",[t]))}function Qe(){var e,t,a,o,r,n,s,i,l,c,u,f;p&&(b=D.width(),m=D.height(),v=q.height(),I.width(),x=I.height(),w=V.height(),y=B.width(),T=K.width(),d||(E.css("position","absolute"),h.offset?E.offset(h.offset):E.offset((t=oe,a=(e=E).outerWidth(),o=e.outerHeight(),r=t.outerHeight(),n=e[0].ownerDocument,s=n.documentElement,i=s.clientWidth+De(n).scrollLeft(),l=s.clientHeight+De(n).scrollTop(),c=t.offset(),u=c.left,f=c.top,f+=r,u-=Math.min(u,i<u+a&&a<i?Math.abs(u+a-i):0),{top:f-=Math.min(f,l<f+o&&o<l?Math.abs(+(o+r)):0),bottom:c.bottom,left:u,right:c.right,width:c.width,height:c.height}))),Le(),h.showPalette&&ye(),O.trigger("reflow.spectrum"))}function Ee(){ze(),Q=!0,O.attr("disabled",!0),oe.addClass("sp-disabled")}!function(){if(We&&E.find("*:not(input)").attr("unselectable","on"),me(),fe=De('<span class="sp-original-input-container"></span>'),["margin"].forEach(function(e){fe.css(e,O.css(e))}),"block"==O.css("display")&&fe.css("display","flex"),te)O.after(ae).hide();else if("text"==s)fe.addClass("sp-colorize-container"),O.addClass("spectrum sp-colorize").wrap(fe);else if("component"==s){O.addClass("spectrum").wrap(fe);var e=De(["<div class='sp-colorize-container sp-add-on'>","<div class='sp-colorize'></div> ","</div>"].join(""));e.width(O.outerHeight()+"px").css("border-radius",O.css("border-radius")).css("border",O.css("border")),O.addClass("with-add-on").before(e)}if(he=O.parent().find(".sp-colorize"),de=he.css("color"),pe=he.css("background-color"),ue||U.hide(),d)O.after(E).hide();else{var t="parent"===h.appendTo?O.parent():De(h.appendTo);1!==t.length&&(t=De("body")),t.append(E)}function a(e){return e.data&&e.data.ignore?(Ae(De(e.target).closest(".sp-thumb-el").data("color")),Fe()):(Ae(De(e.target).closest(".sp-thumb-el").data("color")),Fe(),h.hideAfterPaletteSelect?(Oe(!0),ze()):Oe()),!1}ve(),oe.on("click.spectrum touchstart.spectrum",function(e){Q||Pe(),e.stopPropagation(),De(e.target).is("input")||e.preventDefault()}),!O.is(":disabled")&&!0!==h.disabled||Ee(),E.click(Ye),[$,O].forEach(function(t){t.change(function(){ke(t.val())}),t.on("paste",function(){setTimeout(function(){ke(t.val())},1)}),t.keydown(function(e){13==e.keyCode&&(ke(De(t).val()),t==O&&ze())})}),G.text(h.cancelText),G.on("click.spectrum",function(e){e.stopPropagation(),e.preventDefault(),je(),ze()}),U.attr("title",h.clearText),U.on("click.spectrum",function(e){e.stopPropagation(),e.preventDefault(),ce=!0,Fe(),d&&Oe(!0)}),J.text(h.chooseText),J.on("click.spectrum",function(e){e.stopPropagation(),e.preventDefault(),We&&$.is(":focus")&&$.trigger("change"),$.hasClass("sp-validation-error")||(Oe(!0),ze())}),Z.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),Z.on("click.spectrum",function(e){e.stopPropagation(),e.preventDefault(),h.showPaletteOnly=!h.showPaletteOnly,h.showPaletteOnly||d||E.css("left","-="+(N.outerWidth(!0)+5)),me()}),Ue(B,function(e,t,a){C=e/y,ce=!1,a.shiftKey&&(C=Math.round(10*C)/10),Fe()},we,_e),Ue(I,function(e,t){_=parseFloat(t/x),ce=!1,h.showAlpha||(C=1),Fe()},we,_e),Ue(D,function(e,t,a){if(a.shiftKey){if(!H){var o=k*b,r=m-P*m,n=Math.abs(e-o)>Math.abs(t-r);H=n?"x":"y"}}else H=null;var s=!H||"y"===H;H&&"x"!==H||(k=parseFloat(e/b)),s&&(P=parseFloat((m-t)/m)),ce=!1,h.showAlpha||(C=1),Fe()},we,_e),ne?(Ae(ne),He(),ie=tinycolor(ne).format||h.preferredFormat,xe(ne)):(""===ne&&Ae(ne),He()),d&&Ce();var o=We?"mousedown.spectrum":"click.spectrum touchstart.spectrum";X.on(o,".sp-thumb-el",a),Y.on(o,".sp-thumb-el:nth-child(1)",{ignore:!0},a)}();var Ne={show:Ce,hide:ze,toggle:Pe,reflow:Qe,option:function(e,t){return e===qe?De.extend({},h):t===qe?h[e]:(h[e]=t,"preferredFormat"===e&&(ie=h.preferredFormat),void me())},enable:function(){Q=!1,O.attr("disabled",!1),oe.removeClass("sp-disabled")},disable:Ee,offset:function(e){h.offset=e,Qe()},set:function(e){Ae(e),Oe()},get:Re,destroy:function(){O.show().removeClass("spectrum with-add-on sp-colorize"),oe.off("click.spectrum touchstart.spectrum"),E.remove(),ae.remove(),he&&he.css("background-color",pe).css("color",de);var e=O.closest(".sp-original-input-container");0<e.length&&e.after(O).remove(),Ve[Ne.id]=null},container:E};return Ne.id=Ve.push(Ne)-1,Ne}function a(){}function Ye(e){e.stopPropagation()}function Ge(e,t){var a=Array.prototype.slice,o=a.call(arguments,2);return function(){return e.apply(t,o.concat(a.call(arguments)))}}function Ue(s,i,t,e){i=i||function(){},t=t||function(){},e=e||function(){};var l=document,c=!1,u={},f=0,h=0,d="ontouchstart"in window,a={};function p(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1}function o(e){if(c){if(We&&l.documentMode<9&&!e.button)return g();var t=e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0],a=t&&t.pageX||e.pageX,o=t&&t.pageY||e.pageY,r=Math.max(0,Math.min(a-u.left,h)),n=Math.max(0,Math.min(o-u.top,f));d&&p(e),i.apply(s,[r,n,e])}}function g(){c&&(De(l).off(a),De(l.body).removeClass("sp-dragging"),setTimeout(function(){e.apply(s,arguments)},0)),c=!1}a.selectstart=p,a.dragstart=p,a["touchmove mousemove"]=o,a["touchend mouseup"]=g,De(s).on("touchstart mousedown",function(e){(e.which?3==e.which:2==e.button)||c||!1!==t.apply(s,arguments)&&(c=!0,f=De(s).height(),h=De(s).width(),u=De(s).offset(),De(l).on(a),De(l.body).addClass("sp-dragging"),o(e),p(e))})}function Je(){return De.fn.spectrum.inputTypeColorSupport()}var s="spectrum.id";De.fn.spectrum=function(a,e){if("string"!=typeof a)return this.spectrum("destroy").each(function(){var e=De.extend({},De(this).data(),a);De(this).is("input")?e.flat||"flat"==e.type?e.type="flat":"color"==De(this).attr("type")?e.type="color":e.type=e.type||"component":e.type="noInput";var t=n(this,e);De(this).data(s,t.id)});var o=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=Ve[De(this).data(s)];if(e){var t=e[a];if(!t)throw new Error("Spectrum: no such method: '"+a+"'");"get"==a?o=e.get():"container"==a?o=e.container:"option"==a?o=e.option.apply(e,r):"destroy"==a?(e.destroy(),De(this).removeData(s)):t.apply(e,r)}}),o},De.fn.spectrum.load=!0,De.fn.spectrum.loadOpts={},De.fn.spectrum.draggable=Ue,De.fn.spectrum.defaults=Ie,De.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var t=De("<input type='color'/>")[0];e._cachedResult="color"===t.type&&""!==t.value}return e._cachedResult},De.spectrum={},De.spectrum.localization={},De.spectrum.palettes={},De.fn.spectrum.processNativeColorInputs=function(){var e=De("input[type=color]");e.length&&!Je()&&e.spectrum({preferredFormat:"hex6"})},function(){var n=/^[\s,#]+/,s=/\s+$/,o=0,c=Math,i=c.round,u=c.min,f=c.max,e=c.random,h=function(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var a=function(e){var t={r:0,g:0,b:0},a=1,o=!1,r=!1;"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(s,"").toLowerCase();var t,a=!1;if(C[e])e=C[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=Q.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=Q.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=Q.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=Q.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=Q.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=Q.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=Q.hex8.exec(e))return{a:function(e){return A(e)/255}(t[1]),r:A(t[2]),g:A(t[3]),b:A(t[4]),format:a?"name":"hex8"};if(t=Q.hex6.exec(e))return{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:a?"name":"hex"};if(t=Q.hex3.exec(e))return{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(e));"object"==typeof e&&(e.hasOwnProperty("r")&&e.hasOwnProperty("g")&&e.hasOwnProperty("b")?(t=function(e,t,a){return{r:255*z(e,255),g:255*z(t,255),b:255*z(a,255)}}(e.r,e.g,e.b),o=!0,r="%"===String(e.r).substr(-1)?"prgb":"rgb"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("v")?(e.s=F(e.s),e.v=F(e.v),t=function(e,t,a){e=6*z(e,360),t=z(t,100),a=z(a,100);var o=c.floor(e),r=e-o,n=a*(1-t),s=a*(1-r*t),i=a*(1-(1-r)*t),l=o%6;return{r:255*[a,s,n,n,i,a][l],g:255*[i,a,a,s,n,n][l],b:255*[n,n,i,a,a,s][l]}}(e.h,e.s,e.v),o=!0,r="hsv"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("l")&&(e.s=F(e.s),e.l=F(e.l),t=function(e,t,a){var o,r,n;function s(e,t,a){return a<0&&(a+=1),1<a&&--a,a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}if(e=z(e,360),t=z(t,100),a=z(a,100),0===t)o=r=n=a;else{var i=a<.5?a*(1+t):a+t-a*t,l=2*a-i;o=s(l,i,e+1/3),r=s(l,i,e),n=s(l,i,e-1/3)}return{r:255*o,g:255*r,b:255*n}}(e.h,e.s,e.l),o=!0,r="hsl"),e.hasOwnProperty("a")&&(a=e.a));return a=M(a),{ok:o,format:e.format||r,r:u(255,f(t.r,0)),g:u(255,f(t.g,0)),b:u(255,f(t.b,0)),a:a}}(e);this._originalInput=e,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=i(1e3*this._a)/1e3,this._format=t.format||a.format,this._gradientType=t.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=a.ok,this._tc_id=o++};function r(e,t,a){e=z(e,255),t=z(t,255),a=z(a,255);var o,r,n=f(e,t,a),s=u(e,t,a),i=(n+s)/2;if(n==s)o=r=0;else{var l=n-s;switch(r=.5<i?l/(2-n-s):l/(n+s),n){case e:o=(t-a)/l+(t<a?6:0);break;case t:o=(a-e)/l+2;break;case a:o=(e-t)/l+4}o/=6}return{h:o,s:r,l:i}}function l(e,t,a){e=z(e,255),t=z(t,255),a=z(a,255);var o,r,n=f(e,t,a),s=u(e,t,a),i=n,l=n-s;if(r=0===n?0:l/n,n==s)o=0;else{switch(n){case e:o=(t-a)/l+(t<a?6:0);break;case t:o=(a-e)/l+2;break;case a:o=(e-t)/l+4}o/=6}return{h:o,s:r,v:i}}function t(e,t,a,o){var r=[R(i(e).toString(16)),R(i(t).toString(16)),R(i(a).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function d(e,t,a,o){var r;return[R((r=o,Math.round(255*parseFloat(r)).toString(16))),R(i(e).toString(16)),R(i(t).toString(16)),R(i(a).toString(16))].join("")}function a(e,t){t=0===t?0:t||10;var a=h(e).toHsl();return a.s-=t/100,a.s=j(a.s),h(a)}function p(e,t){t=0===t?0:t||10;var a=h(e).toHsl();return a.s+=t/100,a.s=j(a.s),h(a)}function g(e){return h(e).desaturate(100)}function b(e,t){t=0===t?0:t||10;var a=h(e).toHsl();return a.l+=t/100,a.l=j(a.l),h(a)}function m(e,t){t=0===t?0:t||10;var a=h(e).toRgb();return a.r=f(0,u(255,a.r-i(-t/100*255))),a.g=f(0,u(255,a.g-i(-t/100*255))),a.b=f(0,u(255,a.b-i(-t/100*255))),h(a)}function v(e,t){t=0===t?0:t||10;var a=h(e).toHsl();return a.l-=t/100,a.l=j(a.l),h(a)}function x(e,t){var a=h(e).toHsl(),o=(i(a.h)+t)%360;return a.h=o<0?360+o:o,h(a)}function y(e){var t=h(e).toHsl();return t.h=(t.h+180)%360,h(t)}function T(e){var t=h(e).toHsl(),a=t.h;return[h(e),h({h:(a+120)%360,s:t.s,l:t.l}),h({h:(a+240)%360,s:t.s,l:t.l})]}function w(e){var t=h(e).toHsl(),a=t.h;return[h(e),h({h:(a+90)%360,s:t.s,l:t.l}),h({h:(a+180)%360,s:t.s,l:t.l}),h({h:(a+270)%360,s:t.s,l:t.l})]}function _(e){var t=h(e).toHsl(),a=t.h;return[h(e),h({h:(a+72)%360,s:t.s,l:t.l}),h({h:(a+216)%360,s:t.s,l:t.l})]}function k(e,t,a){t=t||6,a=a||30;var o=h(e).toHsl(),r=360/a,n=[h(e)];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,n.push(h(o));return n}function P(e,t){t=t||6;for(var a=h(e).toHsv(),o=a.h,r=a.s,n=a.v,s=[],i=1/t;t--;)s.push(h({h:o,s:r,v:n})),n=(n+i)%1;return s}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},setAlpha:function(e){return this._a=M(e),this._roundA=i(1e3*this._a)/1e3,this},toHsv:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=l(this._r,this._g,this._b),t=i(360*e.h),a=i(100*e.s),o=i(100*e.v);return 1==this._a?"hsv("+t+", "+a+"%, "+o+"%)":"hsva("+t+", "+a+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=r(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=r(this._r,this._g,this._b),t=i(360*e.h),a=i(100*e.s),o=i(100*e.l);return 1==this._a?"hsl("+t+", "+a+"%, "+o+"%)":"hsla("+t+", "+a+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(){return d(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*z(this._r,255))+"%",g:i(100*z(this._g,255))+"%",b:i(100*z(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*z(this._r,255))+"%, "+i(100*z(this._g,255))+"%, "+i(100*z(this._b,255))+"%)":"rgba("+i(100*z(this._r,255))+"%, "+i(100*z(this._g,255))+"%, "+i(100*z(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+d(this._r,this._g,this._b,this._a),a=t,o=this._gradientType?"GradientType = 1, ":"";e&&(a=h(e).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+a+")"},toString:function(e){var t=!!e;e=e||this._format;var a=!1,o=this._a<1&&0<=this._a;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"name"!==e?("rgb"===e&&(a=this.toRgbString()),"prgb"===e&&(a=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(a=this.toHexString()),"hex3"===e&&(a=this.toHexString(!0)),"hex8"===e&&(a=this.toHex8String()),"name"===e&&(a=this.toName()),"hsl"===e&&(a=this.toHslString()),"hsv"===e&&(a=this.toHsvString()),a||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(e,t){var a=e.apply(null,[this].concat([].slice.call(t)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(a,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(T,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var a={};for(var o in e)e.hasOwnProperty(o)&&(a[o]="a"===o?e[o]:F(e[o]));e=a}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:e(),g:e(),b:e()})},h.mix=function(e,t,a){a=0===a?0:a||50;var o,r=h(e).toRgb(),n=h(t).toRgb(),s=a/100,i=2*s-1,l=n.a-r.a,c=1-(o=((o=i*l==-1?i:(i+l)/(1+i*l))+1)/2),u={r:n.r*o+r.r*c,g:n.g*o+r.g*c,b:n.b*o+r.b*c,a:n.a*s+r.a*(1-s)};return h(u)},h.readability=function(e,t){var a=h(e),o=h(t),r=a.toRgb(),n=o.toRgb(),s=a.getBrightness(),i=o.getBrightness(),l=Math.max(r.r,n.r)-Math.min(r.r,n.r)+Math.max(r.g,n.g)-Math.min(r.g,n.g)+Math.max(r.b,n.b)-Math.min(r.b,n.b);return{brightness:Math.abs(s-i),color:l}},h.isReadable=function(e,t){var a=h.readability(e,t);return 125<a.brightness&&500<a.color},h.mostReadable=function(e,t){for(var a=null,o=0,r=!1,n=0;n<t.length;n++){var s=h.readability(e,t[n]),i=125<s.brightness&&500<s.color,l=s.brightness/125*3+s.color/500;(i&&!r||i&&r&&o<l||!i&&!r&&o<l)&&(r=i,o=l,a=h(t[n]))}return a};var C=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},S=h.hexNames=function(e){var t={};for(var a in e)e.hasOwnProperty(a)&&(t[e[a]]=a);return t}(C);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||1<e)&&(e=1),e}function z(e,t){var a;"string"==typeof(a=e)&&-1!=a.indexOf(".")&&1===parseFloat(a)&&(e="100%");var o,r="string"==typeof(o=e)&&-1!=o.indexOf("%");return e=u(t,f(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),c.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function j(e){return u(1,f(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}var H,L,O,Q=(L="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",O="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+O),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=h}(),De(function(){De.fn.spectrum.load&&De.fn.spectrum.processNativeColorInputs()})}),jQuery.spectrum.localization.ar={cancelText:"إلغاء",chooseText:"إختار",clearText:"إرجاع الألوان على ما كانت",noColorSelectedText:"لم تختار أي لون",togglePaletteMoreText:"أكثر",togglePaletteLessText:"أقل"},jQuery.spectrum.localization.ca={cancelText:"Cancel·lar",chooseText:"Escollir",clearText:"Esborrar color seleccionat",noColorSelectedText:"Cap color seleccionat",togglePaletteMoreText:"Més",togglePaletteLessText:"Menys"},jQuery.spectrum.localization.cs={cancelText:"zrušit",chooseText:"vybrat",clearText:"Resetovat výměr barev",noColorSelectedText:"Žádná barva nebyla vybrána",togglePaletteMoreText:"více",togglePaletteLessText:"méně"},jQuery.spectrum.localization.de={cancelText:"Abbrechen",chooseText:"Wählen",clearText:"Farbauswahl zurücksetzen",noColorSelectedText:"Keine Farbe ausgewählt",togglePaletteMoreText:"Mehr",togglePaletteLessText:"Weniger"},jQuery.spectrum.localization.dk={cancelText:"annuller",chooseText:"Vælg"},jQuery.spectrum.localization.es={cancelText:"Cancelar",chooseText:"Elegir",clearText:"Borrar color seleccionado",noColorSelectedText:"Ningún color seleccionado",togglePaletteMoreText:"Más",togglePaletteLessText:"Menos"},jQuery.spectrum.localization.et={cancelText:"Katkesta",chooseText:"Vali",clearText:"Tühista värvivalik",noColorSelectedText:"Ühtki värvi pole valitud",togglePaletteMoreText:"Rohkem",togglePaletteLessText:"Vähem"},jQuery.spectrum.localization.fa={cancelText:"لغو",chooseText:"انتخاب",clearText:"تنظیم مجدد رنگ",noColorSelectedText:"هیچ رنگی انتخاب نشده است!",togglePaletteMoreText:"بیشتر",togglePaletteLessText:"کمتر"},jQuery.spectrum.localization.fi={cancelText:"Kumoa",chooseText:"Valitse"},jQuery.spectrum.localization.fr={cancelText:"Annuler",chooseText:"Valider",clearText:"Effacer couleur sélectionnée",noColorSelectedText:"Aucune couleur sélectionnée",togglePaletteMoreText:"Plus",togglePaletteLessText:"Moins"},jQuery.spectrum.localization.gr={cancelText:"Ακύρωση",chooseText:"Επιλογή",clearText:"Καθαρισμός επιλεγμένου χρώματος",noColorSelectedText:"Δεν έχει επιλεχθεί κάποιο χρώμα",togglePaletteMoreText:"Περισσότερα",togglePaletteLessText:"Λιγότερα"},jQuery.spectrum.localization.he={cancelText:"בטל בחירה",chooseText:"בחר צבע",clearText:"אפס בחירה",noColorSelectedText:"לא נבחר צבע",togglePaletteMoreText:"עוד צבעים",togglePaletteLessText:"פחות צבעים"},jQuery.spectrum.localization.hr={cancelText:"Odustani",chooseText:"Odaberi",clearText:"Poništi odabir",noColorSelectedText:"Niti jedna boja nije odabrana",togglePaletteMoreText:"Više",togglePaletteLessText:"Manje"},jQuery.spectrum.localization.hu={cancelText:"Mégsem",chooseText:"Mentés",clearText:"A színválasztás visszaállítása",noColorSelectedText:"Nincs szín kijelölve",togglePaletteMoreText:"Több",togglePaletteLessText:"Kevesebb"},jQuery.spectrum.localization.id={cancelText:"Batal",chooseText:"Pilih",clearText:"Hapus Pilihan Warna",noColorSelectedText:"Warna Tidak Dipilih",togglePaletteMoreText:"tambah",togglePaletteLessText:"kurangi"},jQuery.spectrum.localization.it={cancelText:"annulla",chooseText:"scegli",clearText:"Annulla selezione colore",noColorSelectedText:"Nessun colore selezionato"},jQuery.spectrum.localization.ja={cancelText:"中止",chooseText:"選択"},jQuery.spectrum.localization.ko={cancelText:"취소",chooseText:"선택",clearText:"선택 초기화",noColorSelectedText:"선택된 색상 없음",togglePaletteMoreText:"더보기",togglePaletteLessText:"줄이기"},jQuery.spectrum.localization.lt={cancelText:"Atšaukti",chooseText:"Pasirinkti",clearText:"Išvalyti pasirinkimą",noColorSelectedText:"Spalva nepasirinkta",togglePaletteMoreText:"Daugiau",togglePaletteLessText:"Mažiau"},jQuery.spectrum.localization["nb-no"]={cancelText:"Avbryte",chooseText:"Velg",clearText:"Tilbakestill",noColorSelectedText:"Farge er ikke valgt",togglePaletteMoreText:"Mer",togglePaletteLessText:"Mindre"},jQuery.spectrum.localization["nl-nl"]={cancelText:"Annuleer",chooseText:"Kies",clearText:"Wis kleur selectie",togglePaletteMoreText:"Meer",togglePaletteLessText:"Minder"},jQuery.spectrum.localization.pl={cancelText:"Anuluj",chooseText:"Wybierz",clearText:"Usuń wybór koloru",noColorSelectedText:"Nie wybrano koloru",togglePaletteMoreText:"Więcej",togglePaletteLessText:"Mniej"},jQuery.spectrum.localization["pt-br"]={cancelText:"Cancelar",chooseText:"Escolher",clearText:"Limpar cor selecionada",noColorSelectedText:"Nenhuma cor selecionada",togglePaletteMoreText:"Mais",togglePaletteLessText:"Menos"},jQuery.spectrum.localization["pt-pt"]={cancelText:"Cancelar",chooseText:"Escolher",clearText:"Limpar cor seleccionada",noColorSelectedText:"Nenhuma cor seleccionada",togglePaletteMoreText:"Mais",togglePaletteLessText:"Menos"},jQuery.spectrum.localization.ru={cancelText:"Отмена",chooseText:"Выбрать",clearText:"Сбросить",noColorSelectedText:"Цвет не выбран",togglePaletteMoreText:"Ещё",togglePaletteLessText:"Скрыть"},jQuery.spectrum.localization.sv={cancelText:"Avbryt",chooseText:"Välj"},jQuery.spectrum.localization.tr={cancelText:"iptal",chooseText:"tamam"},jQuery.spectrum.localization["zh-cn"]={cancelText:"取消",chooseText:"选择",clearText:"清除",togglePaletteMoreText:"更多选项",togglePaletteLessText:"隐藏",noColorSelectedText:"尚未选择任何颜色"},jQuery.spectrum.localization["zh-tw"]={cancelText:"取消",chooseText:"選擇",clearText:"清除",togglePaletteMoreText:"更多選項",togglePaletteLessText:"隱藏",noColorSelectedText:"尚未選擇任何顏色"};
|
cookie-notice.php
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Cookie Notice
|
4 |
-
Description: Cookie Notice allows you to elegantly inform users that your site uses cookies and helps you comply with
|
5 |
-
Version:
|
6 |
-
Author:
|
7 |
-
Author URI:
|
8 |
-
Plugin URI:
|
9 |
License: MIT License
|
10 |
-
License URI:
|
11 |
Text Domain: cookie-notice
|
12 |
Domain Path: /languages
|
13 |
|
14 |
Cookie Notice
|
15 |
-
Copyright (C)
|
16 |
|
17 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
18 |
|
@@ -29,15 +29,19 @@ if ( ! defined( 'ABSPATH' ) )
|
|
29 |
* Cookie Notice class.
|
30 |
*
|
31 |
* @class Cookie_Notice
|
32 |
-
* @version
|
33 |
*/
|
34 |
class Cookie_Notice {
|
35 |
|
|
|
|
|
36 |
/**
|
37 |
* @var $defaults
|
38 |
*/
|
39 |
-
|
40 |
'general' => array(
|
|
|
|
|
41 |
'position' => 'bottom',
|
42 |
'message_text' => '',
|
43 |
'css_style' => 'bootstrap',
|
@@ -63,7 +67,7 @@ class Cookie_Notice {
|
|
63 |
'on_click' => false,
|
64 |
'colors' => array(
|
65 |
'text' => '#fff',
|
66 |
-
'bar' => '#
|
67 |
'bar_opacity' => 100
|
68 |
),
|
69 |
'see_more_opt' => array(
|
@@ -74,49 +78,26 @@ class Cookie_Notice {
|
|
74 |
'sync' => false
|
75 |
),
|
76 |
'script_placement' => 'header',
|
77 |
-
'coronabar' => false, // disabled by default
|
78 |
-
'coronabar_cases' => true,
|
79 |
-
'coronabar_texts' => false,
|
80 |
-
'coronabar_text_strings' => array(
|
81 |
-
'headline' => 'Spread the message. Stop the virus.',
|
82 |
-
'step_one_title' => 'Hands', // string
|
83 |
-
'step_one_desc' => 'Wash often', // string
|
84 |
-
'step_two_title' => 'Elbow', // string
|
85 |
-
'step_two_desc' => 'Cough into', // string
|
86 |
-
'step_three_title' => 'Face', // string
|
87 |
-
'step_three_desc' => 'Don\'t touch', // string
|
88 |
-
'step_four_title' => 'Space', // string
|
89 |
-
'step_four_desc' => 'Avoid crowds', // string
|
90 |
-
'step_five_title' => 'Home', // string
|
91 |
-
'step_five_desc' => 'Stay inside', // string
|
92 |
-
'confirmed' => 'Confirmed', // string
|
93 |
-
'recovered' => 'Recovered', // string
|
94 |
-
),
|
95 |
'translate' => true,
|
96 |
'deactivation_delete' => false,
|
97 |
'update_version' => 3,
|
98 |
'update_notice' => true,
|
99 |
'update_delay_date' => 0
|
100 |
),
|
101 |
-
'version' => '
|
102 |
);
|
103 |
-
private $positions = array();
|
104 |
-
private $styles = array();
|
105 |
-
private $choices = array();
|
106 |
-
private $links = array();
|
107 |
-
private $link_targets = array();
|
108 |
-
private $link_positions = array();
|
109 |
-
private $colors = array();
|
110 |
-
private $options = array();
|
111 |
-
private $effects = array();
|
112 |
-
private $times = array();
|
113 |
-
private $notices = array();
|
114 |
-
private $script_placements = array();
|
115 |
|
116 |
private static $_instance;
|
117 |
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
/**
|
122 |
* Main plugin instance.
|
@@ -130,6 +111,13 @@ class Cookie_Notice {
|
|
130 |
add_action( 'plugins_loaded', array( self::$_instance, 'load_textdomain' ) );
|
131 |
|
132 |
self::$_instance->includes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
return self::$_instance;
|
@@ -155,184 +143,78 @@ class Cookie_Notice {
|
|
155 |
|
156 |
if ( ! isset( $this->options['general']['see_more_opt']['sync'] ) )
|
157 |
$this->options['general']['see_more_opt']['sync'] = $this->defaults['general']['see_more_opt']['sync'];
|
158 |
-
|
159 |
// actions
|
|
|
160 |
add_action( 'init', array( $this, 'register_shortcodes' ) );
|
161 |
add_action( 'init', array( $this, 'wpsc_add_cookie' ) );
|
162 |
-
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
163 |
add_action( 'admin_init', array( $this, 'update_notice' ) );
|
164 |
-
add_action( 'admin_init', array( $this, 'check_version' ) );
|
165 |
-
add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
|
166 |
-
add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
|
167 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
168 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
169 |
-
add_action( 'wp_head', array( $this, 'wp_print_header_scripts' ) );
|
170 |
-
add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
|
171 |
-
add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
|
172 |
-
add_action( 'wp_footer', array( $this, 'wp_footer_corona' ), 1001 );
|
173 |
add_action( 'wp_ajax_cn_dismiss_notice', array( $this, 'ajax_dismiss_admin_notice' ) );
|
174 |
-
add_action( 'wp_ajax_cn_save_cases', array( $this, 'ajax_save_cases' ) );
|
175 |
-
add_action( 'wp_ajax_nopriv_cn_save_cases', array( $this, 'ajax_save_cases' ) );
|
176 |
|
177 |
// filters
|
178 |
-
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
179 |
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
180 |
-
add_filter( 'body_class', array( $this, 'change_body_class' ) );
|
181 |
}
|
182 |
|
183 |
/**
|
184 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
*
|
186 |
* @return void
|
187 |
*/
|
188 |
private function includes() {
|
|
|
|
|
189 |
include_once( plugin_dir_path( __FILE__ ) . 'includes/functions.php' );
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
-
|
192 |
/**
|
193 |
-
* Load
|
194 |
*/
|
195 |
-
public function
|
196 |
-
|
197 |
-
'top' => __( 'Top', 'cookie-notice' ),
|
198 |
-
'bottom' => __( 'Bottom', 'cookie-notice' )
|
199 |
-
);
|
200 |
-
|
201 |
-
$this->styles = array(
|
202 |
-
'none' => __( 'None', 'cookie-notice' ),
|
203 |
-
'wp-default' => __( 'Light', 'cookie-notice' ),
|
204 |
-
'bootstrap' => __( 'Dark', 'cookie-notice' )
|
205 |
-
);
|
206 |
-
|
207 |
-
$this->revoke_opts = array(
|
208 |
-
'automatic' => __( 'Automatic', 'cookie-notice' ),
|
209 |
-
'manual' => __( 'Manual', 'cookie-notice' )
|
210 |
-
);
|
211 |
-
|
212 |
-
$this->links = array(
|
213 |
-
'page' => __( 'Page link', 'cookie-notice' ),
|
214 |
-
'custom' => __( 'Custom link', 'cookie-notice' )
|
215 |
-
);
|
216 |
-
|
217 |
-
$this->link_targets = array(
|
218 |
-
'_blank',
|
219 |
-
'_self'
|
220 |
-
);
|
221 |
-
|
222 |
-
$this->link_positions = array(
|
223 |
-
'banner' => __( 'Banner', 'cookie-notice' ),
|
224 |
-
'message' => __( 'Message', 'cookie-notice' )
|
225 |
-
);
|
226 |
-
|
227 |
-
$this->colors = array(
|
228 |
-
'text' => __( 'Text color', 'cookie-notice' ),
|
229 |
-
'bar' => __( 'Bar color', 'cookie-notice' ),
|
230 |
-
);
|
231 |
-
|
232 |
-
$this->times = apply_filters(
|
233 |
-
'cn_cookie_expiry',
|
234 |
-
array(
|
235 |
-
'hour' => array( __( 'An hour', 'cookie-notice' ), 3600 ),
|
236 |
-
'day' => array( __( '1 day', 'cookie-notice' ), 86400 ),
|
237 |
-
'week' => array( __( '1 week', 'cookie-notice' ), 604800 ),
|
238 |
-
'month' => array( __( '1 month', 'cookie-notice' ), 2592000 ),
|
239 |
-
'3months' => array( __( '3 months', 'cookie-notice' ), 7862400 ),
|
240 |
-
'6months' => array( __( '6 months', 'cookie-notice' ), 15811200 ),
|
241 |
-
'year' => array( __( '1 year', 'cookie-notice' ), 31536000 ),
|
242 |
-
'infinity' => array( __( 'infinity', 'cookie-notice' ), 2147483647 )
|
243 |
-
)
|
244 |
-
);
|
245 |
-
|
246 |
-
$this->effects = array(
|
247 |
-
'none' => __( 'None', 'cookie-notice' ),
|
248 |
-
'fade' => __( 'Fade', 'cookie-notice' ),
|
249 |
-
'slide' => __( 'Slide', 'cookie-notice' )
|
250 |
-
);
|
251 |
-
|
252 |
-
$this->script_placements = array(
|
253 |
-
'header' => __( 'Header', 'cookie-notice' ),
|
254 |
-
'footer' => __( 'Footer', 'cookie-notice' ),
|
255 |
-
);
|
256 |
-
|
257 |
-
// set default text strings
|
258 |
-
$this->defaults['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' );
|
259 |
-
$this->defaults['general']['accept_text'] = __( 'Ok', 'cookie-notice' );
|
260 |
-
$this->defaults['general']['refuse_text'] = __( 'No', 'cookie-notice' );
|
261 |
-
$this->defaults['general']['revoke_message_text'] = __( 'You can revoke your consent any time using the Revoke consent button.', 'cookie-notice' );
|
262 |
-
$this->defaults['general']['revoke_text'] = __( 'Revoke consent', 'cookie-notice' );
|
263 |
-
$this->defaults['general']['see_more_opt']['text'] = __( 'Privacy policy', 'cookie-notice' );
|
264 |
-
|
265 |
-
// set default coronabar text strings
|
266 |
-
$this->defaults['general']['coronabar_text_strings']['headline'] = __( 'Spread the message. Stop the virus.', 'cookie-notice' );
|
267 |
-
$this->defaults['general']['coronabar_text_strings']['step_one_title'] = __( 'Hands', 'cookie-notice' );
|
268 |
-
$this->defaults['general']['coronabar_text_strings']['step_one_desc'] = __( 'Wash often', 'cookie-notice' );
|
269 |
-
$this->defaults['general']['coronabar_text_strings']['step_two_title'] = __( 'Elbow', 'cookie-notice' );
|
270 |
-
$this->defaults['general']['coronabar_text_strings']['step_two_desc'] = __( 'Cough into', 'cookie-notice' );
|
271 |
-
$this->defaults['general']['coronabar_text_strings']['step_three_title'] = __( 'Face', 'cookie-notice' );
|
272 |
-
$this->defaults['general']['coronabar_text_strings']['step_three_desc'] = __( 'Don\'t touch', 'cookie-notice' );
|
273 |
-
$this->defaults['general']['coronabar_text_strings']['step_four_title'] = __( 'Space', 'cookie-notice' );
|
274 |
-
$this->defaults['general']['coronabar_text_strings']['step_four_desc'] = __( 'Avoid crowds', 'cookie-notice' );
|
275 |
-
$this->defaults['general']['coronabar_text_strings']['step_five_title'] = __( 'Home', 'cookie-notice' );
|
276 |
-
$this->defaults['general']['coronabar_text_strings']['step_five_desc'] = __( 'Stay inside', 'cookie-notice' );
|
277 |
-
$this->defaults['general']['coronabar_text_strings']['confirmed'] = __( 'Confirmed', 'cookie-notice' );
|
278 |
-
$this->defaults['general']['coronabar_text_strings']['recovered'] = __( 'Recovered', 'cookie-notice' );
|
279 |
-
|
280 |
-
// set translation strings on plugin activation
|
281 |
-
if ( $this->options['general']['translate'] === true ) {
|
282 |
-
$this->options['general']['translate'] = false;
|
283 |
-
|
284 |
-
$this->options['general']['message_text'] = $this->defaults['general']['message_text'];
|
285 |
-
$this->options['general']['accept_text'] = $this->defaults['general']['accept_text'];
|
286 |
-
$this->options['general']['refuse_text'] = $this->defaults['general']['refuse_text'];
|
287 |
-
$this->options['general']['revoke_message_text'] = $this->defaults['general']['revoke_message_text'];
|
288 |
-
$this->options['general']['revoke_text'] = $this->defaults['general']['revoke_text'];
|
289 |
-
$this->options['general']['see_more_opt']['text'] = $this->defaults['general']['see_more_opt']['text'];
|
290 |
-
|
291 |
-
// coronabar strings
|
292 |
-
foreach ( $this->defaults['general']['coronabar_text_strings'] as $key => $label ) {
|
293 |
-
$this->options['general']['coronabar_text_strings'][$key] = $this->defaults['general']['coronabar_text_strings'][$key];
|
294 |
-
}
|
295 |
-
|
296 |
-
update_option( 'cookie_notice_options', $this->options['general'] );
|
297 |
-
}
|
298 |
-
|
299 |
-
// WPML >= 3.2
|
300 |
-
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
301 |
-
$this->register_wpml_strings();
|
302 |
-
// WPML and Polylang compatibility
|
303 |
-
} elseif ( function_exists( 'icl_register_string' ) ) {
|
304 |
-
icl_register_string( 'Cookie Notice', 'Message in the notice', $this->options['general']['message_text'] );
|
305 |
-
icl_register_string( 'Cookie Notice', 'Button text', $this->options['general']['accept_text'] );
|
306 |
-
icl_register_string( 'Cookie Notice', 'Refuse button text', $this->options['general']['refuse_text'] );
|
307 |
-
icl_register_string( 'Cookie Notice', 'Revoke message text', $this->options['general']['revoke_message_text'] );
|
308 |
-
icl_register_string( 'Cookie Notice', 'Revoke button text', $this->options['general']['revoke_text'] );
|
309 |
-
icl_register_string( 'Cookie Notice', 'Privacy policy text', $this->options['general']['see_more_opt']['text'] );
|
310 |
-
icl_register_string( 'Cookie Notice', 'Custom link', $this->options['general']['see_more_opt']['link'] );
|
311 |
-
|
312 |
-
// coronabar strings
|
313 |
-
foreach ( $this->defaults['general']['coronabar_text_strings'] as $key => $label ) {
|
314 |
-
icl_register_string( 'Cookie Notice', $key, $this->options['general']['coronabar_text_strings'][$key] );
|
315 |
-
}
|
316 |
-
}
|
317 |
}
|
318 |
|
319 |
/**
|
320 |
-
*
|
321 |
-
*
|
322 |
-
* @return void
|
323 |
*/
|
324 |
-
public function
|
325 |
-
if ( ! current_user_can( 'install_plugins' ) )
|
326 |
-
return;
|
327 |
-
|
328 |
// get current database version
|
329 |
$current_db_version = get_option( 'cookie_notice_version', '1.0.0' );
|
330 |
|
331 |
// new version?
|
332 |
if ( version_compare( $current_db_version, $this->defaults['version'], '<' ) ) {
|
333 |
-
//
|
334 |
update_option( 'cookie_notice_version', $this->defaults['version'], false );
|
335 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
}
|
337 |
|
338 |
/**
|
@@ -344,40 +226,16 @@ class Cookie_Notice {
|
|
344 |
if ( ! current_user_can( 'install_plugins' ) )
|
345 |
return;
|
346 |
|
347 |
-
|
348 |
-
// $this->options['general'] = wp_parse_args( array( 'update_version' => 2, 'update_notice' => true ), $this->options['general'] );
|
349 |
-
// update_option( 'cookie_notice_options', $this->options['general'] );
|
350 |
-
|
351 |
-
$current_update = 4;
|
352 |
|
353 |
if ( $this->options['general']['update_version'] < $current_update ) {
|
354 |
// check version, if update version is lower than plugin version, set update notice to true
|
355 |
$this->options['general'] = wp_parse_args( array( 'update_version' => $current_update, 'update_notice' => true ), $this->options['general'] );
|
356 |
|
357 |
update_option( 'cookie_notice_options', $this->options['general'] );
|
358 |
-
}
|
359 |
-
|
360 |
-
// display current version notice
|
361 |
-
if ( $this->options['general']['update_notice'] === true && $this->options['general']['coronabar'] ) {
|
362 |
-
// include notice js and css, only if needed
|
363 |
-
wp_enqueue_script(
|
364 |
-
'cookie-notice-admin-notice', plugins_url( 'js/admin-notice' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array( 'jquery' ), $this->defaults['version']
|
365 |
-
);
|
366 |
-
wp_localize_script(
|
367 |
-
'cookie-notice-admin-notice', 'cnArgsNotice', array(
|
368 |
-
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
369 |
-
'nonce' => wp_create_nonce( 'cn_dismiss_notice' )
|
370 |
-
)
|
371 |
-
);
|
372 |
-
wp_enqueue_style( 'cookie-notice-admin-notice', plugins_url( 'css/admin-notice' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
373 |
|
374 |
-
|
375 |
-
|
376 |
-
'<p>' . __( "Thank you for using the <strong>Corona Banner</strong> and spreading the word about steps to stop the Coronavirus pandemia.", 'cookie-notice' ) . '<br />' .
|
377 |
-
sprintf( __( 'Feel free to customize or disable it anytime in the <a href="%s">Cookie Notice settings</a>.', 'cookie-notice' ), admin_url( 'options-general.php?page=cookie-notice' ) ) . '</p>' .
|
378 |
-
'</div>';
|
379 |
-
|
380 |
-
$this->add_notice( $notice_html, 'notice is-dismissible', 'div' );
|
381 |
}
|
382 |
}
|
383 |
|
@@ -434,8 +292,6 @@ class Cookie_Notice {
|
|
434 |
|
435 |
// delay notice
|
436 |
case 'approve':
|
437 |
-
// enable coronabar
|
438 |
-
$this->options['general'] = wp_parse_args( array( 'coronabar' => true), $this->options['general'] );
|
439 |
// hide notice
|
440 |
$this->options['general'] = wp_parse_args( array( 'update_notice' => false ), $this->options['general'] );
|
441 |
$this->options['general'] = wp_parse_args( array( 'update_delay_date' => 0 ), $this->options['general'] );
|
@@ -454,51 +310,6 @@ class Cookie_Notice {
|
|
454 |
|
455 |
exit;
|
456 |
}
|
457 |
-
|
458 |
-
/**
|
459 |
-
* Save corona cases locally for caching.
|
460 |
-
*/
|
461 |
-
public function ajax_save_cases() {
|
462 |
-
// check if the bar is enabled
|
463 |
-
if ( ! $this->options['general']['coronabar'] )
|
464 |
-
return;
|
465 |
-
|
466 |
-
if ( ! wp_verify_nonce( esc_attr( $_REQUEST['nonce'] ), 'cn_save_cases' ) )
|
467 |
-
return;
|
468 |
-
|
469 |
-
$json_data = ! empty( $_REQUEST['data'] ) ? esc_attr( $_REQUEST['data'] ) : false;
|
470 |
-
$cases_data = array();
|
471 |
-
|
472 |
-
if ( ! empty( $json_data ) )
|
473 |
-
$cases_data = json_decode( stripslashes( html_entity_decode( $json_data ) ), true );
|
474 |
-
|
475 |
-
// save data
|
476 |
-
if ( $cases_data && is_array( $cases_data ) )
|
477 |
-
set_transient( 'cookie_notice_coronadata', $cases_data, 12 * HOUR_IN_SECONDS );
|
478 |
-
}
|
479 |
-
|
480 |
-
/**
|
481 |
-
* Add new body classes.
|
482 |
-
*
|
483 |
-
* @param array $classes Body classes
|
484 |
-
* @return array
|
485 |
-
*/
|
486 |
-
public function change_body_class( $classes ) {
|
487 |
-
if ( is_admin() )
|
488 |
-
return $classes;
|
489 |
-
|
490 |
-
if ( $this->cookies_set() ) {
|
491 |
-
$classes[] = 'cookies-set';
|
492 |
-
|
493 |
-
if ( $this->cookies_accepted() )
|
494 |
-
$classes[] = 'cookies-accepted';
|
495 |
-
else
|
496 |
-
$classes[] = 'cookies-refused';
|
497 |
-
} else
|
498 |
-
$classes[] = 'cookies-not-set';
|
499 |
-
|
500 |
-
return $classes;
|
501 |
-
}
|
502 |
|
503 |
/**
|
504 |
* Register shortcode.
|
@@ -556,7 +367,11 @@ class Cookie_Notice {
|
|
556 |
// escape class(es)
|
557 |
$args['class'] = esc_attr( $args['class'] );
|
558 |
|
559 |
-
|
|
|
|
|
|
|
|
|
560 |
|
561 |
return $shortcode;
|
562 |
}
|
@@ -587,813 +402,21 @@ class Cookie_Notice {
|
|
587 |
return $shortcode;
|
588 |
}
|
589 |
|
590 |
-
/**
|
591 |
-
* Register WPML (>= 3.2) strings if needed.
|
592 |
-
*
|
593 |
-
* @return void
|
594 |
-
*/
|
595 |
-
private function register_wpml_strings() {
|
596 |
-
global $wpdb;
|
597 |
-
|
598 |
-
// prepare strings
|
599 |
-
$strings = array(
|
600 |
-
'Message in the notice' => $this->options['general']['message_text'],
|
601 |
-
'Button text' => $this->options['general']['accept_text'],
|
602 |
-
'Refuse button text' => $this->options['general']['refuse_text'],
|
603 |
-
'Revoke message text' => $this->options['general']['revoke_message_text'],
|
604 |
-
'Revoke button text' => $this->options['general']['revoke_text'],
|
605 |
-
'Privacy policy text' => $this->options['general']['see_more_opt']['text'],
|
606 |
-
'Custom link' => $this->options['general']['see_more_opt']['link']
|
607 |
-
);
|
608 |
-
|
609 |
-
// coronabar strings
|
610 |
-
foreach ( $this->defaults['general']['coronabar_text_strings'] as $key => $label ) {
|
611 |
-
$strings[$key] = $this->options['general']['coronabar_text_strings'];
|
612 |
-
}
|
613 |
-
|
614 |
-
// get query results
|
615 |
-
$results = $wpdb->get_col( $wpdb->prepare( "SELECT name FROM " . $wpdb->prefix . "icl_strings WHERE context = %s", 'Cookie Notice' ) );
|
616 |
-
|
617 |
-
// check results
|
618 |
-
foreach( $strings as $string => $value ) {
|
619 |
-
// string does not exist?
|
620 |
-
if ( ! in_array( $string, $results, true ) ) {
|
621 |
-
// register string
|
622 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', $string, $value );
|
623 |
-
}
|
624 |
-
}
|
625 |
-
}
|
626 |
-
|
627 |
-
/**
|
628 |
-
* Load textdomain.
|
629 |
-
*/
|
630 |
-
public function load_textdomain() {
|
631 |
-
load_plugin_textdomain( 'cookie-notice', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
632 |
-
}
|
633 |
-
|
634 |
-
/**
|
635 |
-
* Add submenu.
|
636 |
-
*/
|
637 |
-
public function admin_menu_options() {
|
638 |
-
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' ) );
|
639 |
-
}
|
640 |
-
|
641 |
-
/**
|
642 |
-
* Options page output.
|
643 |
-
*
|
644 |
-
* @return mixed
|
645 |
-
*/
|
646 |
-
public function options_page() {
|
647 |
-
echo '
|
648 |
-
<div class="wrap">
|
649 |
-
<h2>' . __( 'Cookie Notice', 'cookie-notice' ) . '</h2>
|
650 |
-
<div class="cookie-notice-settings">
|
651 |
-
<div class="cookie-notice-credits">
|
652 |
-
<h3 class="hndle">' . __( 'Cookie Notice', 'cookie-notice' ) . ' ' . $this->defaults['version'] . '</h3>
|
653 |
-
<div class="inside">
|
654 |
-
<h4 class="inner">' . __( 'Need support?', 'cookie-notice' ) . '</h4>
|
655 |
-
<p class="inner">' . sprintf( __( '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>', 'cookie-notice' ), 'https://www.dfactory.eu/docs/cookie-notice/?utm_source=cookie-notice-settings&utm_medium=link&utm_campaign=docs', 'https://dfactory.eu/support/?utm_source=cookie-notice-settings&utm_medium=link&utm_campaign=support' ) . '</p>
|
656 |
-
<hr />
|
657 |
-
<h4 class="inner">' . __( 'Do you like this plugin?', 'cookie-notice' ) . '</h4>
|
658 |
-
<p class="inner">' . sprintf( __( '<a href="%s" target="_blank">Rate it 5</a> on WordPress.org', 'cookie-notice' ), 'https://wordpress.org/support/plugin/cookie-notice/reviews/?filter=5' ) . '<br />' .
|
659 |
-
sprintf( __( 'Blog about it & link to the <a href="%s" target="_blank">plugin page</a>.', 'cookie-notice' ), 'https://dfactory.eu/plugins/cookie-notice?utm_source=cookie-notice-settings&utm_medium=link&utm_campaign=blog-about' ) . '<br />' .
|
660 |
-
sprintf( __( 'Check out our other <a href="%s" target="_blank">WordPress plugins</a>.', 'cookie-notice' ), 'https://dfactory.eu/plugins/?utm_source=cookie-notice-settings&utm_medium=link&utm_campaign=other-plugins' ) . '
|
661 |
-
</p>
|
662 |
-
</div>
|
663 |
-
</div>
|
664 |
-
<form action="options.php" method="post">';
|
665 |
-
|
666 |
-
settings_fields( 'cookie_notice_options' );
|
667 |
-
do_settings_sections( 'cookie_notice_options' );
|
668 |
-
|
669 |
-
echo '
|
670 |
-
<p class="submit">';
|
671 |
-
submit_button( '', 'primary', 'save_cookie_notice_options', false );
|
672 |
-
echo ' ';
|
673 |
-
submit_button( __( 'Reset to defaults', 'cookie-notice' ), 'secondary', 'reset_cookie_notice_options', false );
|
674 |
-
echo '
|
675 |
-
</p>
|
676 |
-
</form>
|
677 |
-
</div>
|
678 |
-
<div class="clear"></div>
|
679 |
-
</div>';
|
680 |
-
}
|
681 |
-
|
682 |
-
/**
|
683 |
-
* Regiseter plugin settings.
|
684 |
-
*/
|
685 |
-
public function register_settings() {
|
686 |
-
register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) );
|
687 |
-
|
688 |
-
// configuration
|
689 |
-
add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
|
690 |
-
add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
691 |
-
add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
692 |
-
add_settings_field( 'cn_see_more', __( 'Privacy policy', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
693 |
-
add_settings_field( 'cn_refuse_opt', __( 'Refuse consent', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
694 |
-
add_settings_field( 'cn_revoke_opt', __( 'Revoke consent', 'cookie-notice' ), array( $this, 'cn_revoke_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
695 |
-
add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
696 |
-
add_settings_field( 'cn_redirection', __( 'Reloading', 'cookie-notice' ), array( $this, 'cn_redirection' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
697 |
-
add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
698 |
-
add_settings_field( 'cn_on_click', __( 'On click', 'cookie-notice' ), array( $this, 'cn_on_click' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
699 |
-
add_settings_field( 'cn_time', __( 'Accepted expiry', 'cookie-notice' ), array( $this, 'cn_time' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
700 |
-
add_settings_field( 'cn_time_rejected', __( 'Rejected expiry', 'cookie-notice' ), array( $this, 'cn_time_rejected' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
701 |
-
add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
702 |
-
add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
703 |
-
|
704 |
-
// coronabar
|
705 |
-
add_settings_section( 'cookie_notice_coronabar', __( 'Corona Banner', 'cookie-notice' ), array( $this, 'cn_section_coronabar' ), 'cookie_notice_options' );
|
706 |
-
add_settings_field( 'cn_coronabar', __( 'Display', 'cookie-notice' ), array( $this, 'cn_coronabar' ), 'cookie_notice_options', 'cookie_notice_coronabar' );
|
707 |
-
add_settings_field( 'cn_coronabar_cases', __( 'Current cases', 'cookie-notice' ), array( $this, 'cn_coronabar_cases' ), 'cookie_notice_options', 'cookie_notice_coronabar' );
|
708 |
-
add_settings_field( 'cn_coronabar_texts', __( 'Text strings', 'cookie-notice' ), array( $this, 'cn_coronabar_texts' ), 'cookie_notice_options', 'cookie_notice_coronabar' );
|
709 |
-
|
710 |
-
// design
|
711 |
-
add_settings_section( 'cookie_notice_design', __( 'Design', 'cookie-notice' ), array( $this, 'cn_section_design' ), 'cookie_notice_options' );
|
712 |
-
add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
|
713 |
-
add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
|
714 |
-
add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
|
715 |
-
add_settings_field( 'cn_css_class', __( 'Button class', 'cookie-notice' ), array( $this, 'cn_css_class' ), 'cookie_notice_options', 'cookie_notice_design' );
|
716 |
-
add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
|
717 |
-
}
|
718 |
-
|
719 |
-
/**
|
720 |
-
* Section callback: fix for WP < 3.3
|
721 |
-
*/
|
722 |
-
public function cn_section_configuration() {}
|
723 |
-
public function cn_section_design() {}
|
724 |
-
public function cn_section_coronabar() {}
|
725 |
-
|
726 |
-
/**
|
727 |
-
* Display Corona Banner option.
|
728 |
-
*/
|
729 |
-
public function cn_coronabar() {
|
730 |
-
echo '
|
731 |
-
<fieldset>
|
732 |
-
<label><input id="cn_coronabar" type="checkbox" name="cookie_notice_options[coronabar]" value="1" ' . checked( true, $this->options['general']['coronabar'], false ) . '/>' . __( 'Enable to display the Corona Banner.', 'cookie-notice' ) . '</label>
|
733 |
-
<p class="description">' . __( 'The Corona Banner displays data about Coronavirus pandemia and <strong>five steps recommended by the WHO (World Health Organization)</strong> to help flatten the Coronavirus curve.', 'cookie-notice' ) . '</p>
|
734 |
-
</fieldset>';
|
735 |
-
}
|
736 |
-
|
737 |
-
/**
|
738 |
-
* Display current cases option.
|
739 |
-
*/
|
740 |
-
public function cn_coronabar_cases() {
|
741 |
-
echo '
|
742 |
-
<fieldset>
|
743 |
-
<label><input id="cn_coronabar_cases" type="checkbox" name="cookie_notice_options[coronabar_cases]" value="1" ' . checked( true, $this->options['general']['coronabar_cases'], false ) . '/>' . __( 'Display information about current cases.', 'cookie-notice' ) . '</label>
|
744 |
-
<p class="description">' . __( 'Provides up-to-date data about Coronavirus confirmed and recovered cases.', 'cookie-notice' ) . '</p>
|
745 |
-
</fieldset>';
|
746 |
-
}
|
747 |
-
|
748 |
-
/**
|
749 |
-
* Coronabar text strings.
|
750 |
-
*/
|
751 |
-
public function cn_coronabar_texts() {
|
752 |
-
$descriptions = array(
|
753 |
-
'headline' => __( 'Headline message', 'cookie-notice' ),
|
754 |
-
'recovered' => __( 'Current cases text strings', 'cookie-notice' ),
|
755 |
-
'step_one_desc' => __( 'Recommendation One', 'cookie-notice' ),
|
756 |
-
'step_two_desc' => __( 'Recommendation Two', 'cookie-notice' ),
|
757 |
-
'step_three_desc' => __( 'Recommendation Three', 'cookie-notice' ),
|
758 |
-
'step_four_desc' => __( 'Recommendation Four', 'cookie-notice' ),
|
759 |
-
'step_five_desc' => __( 'Recommendation Five', 'cookie-notice' )
|
760 |
-
);
|
761 |
-
|
762 |
-
echo '
|
763 |
-
<fieldset>
|
764 |
-
<label><input id="cn_coronabar_texts" type="checkbox" name="cookie_notice_options[coronabar_texts]" value="1" ' . checked( true, $this->options['general']['coronabar_texts'], false ) . ' />' . __( 'Enable if you\'d like to adjust the Corona Banner text strings.', 'cookie-notice' ) . '</label>
|
765 |
-
<div id="cn_coronabar_text_strings"' . ( $this->options['general']['coronabar_texts'] === false ? ' style="display: none;"' : '' ) . '>';
|
766 |
-
foreach ( $this->defaults['general']['coronabar_text_strings'] as $key => $label ) {
|
767 |
-
echo '
|
768 |
-
<span class="cn_coronabar_text_string">
|
769 |
-
<input type="text" class="regular-text" name="cookie_notice_options[coronabar_text_strings][' . $key .']" value="' . esc_html( $this->options['general']['coronabar_text_strings'][$key] ) . '" />
|
770 |
-
</span>';
|
771 |
-
|
772 |
-
// display description
|
773 |
-
if ( array_key_exists( $key, $descriptions ) ) {
|
774 |
-
echo '
|
775 |
-
<p class="description">' . $descriptions[$key] . '</p>';
|
776 |
-
}
|
777 |
-
}
|
778 |
-
echo '
|
779 |
-
</div>
|
780 |
-
</fieldset>';
|
781 |
-
}
|
782 |
-
|
783 |
-
/**
|
784 |
-
* Cookie message option.
|
785 |
-
*/
|
786 |
-
public function cn_message_text() {
|
787 |
-
echo '
|
788 |
-
<fieldset>
|
789 |
-
<div id="cn_message_text">
|
790 |
-
<textarea name="cookie_notice_options[message_text]" class="large-text" cols="50" rows="5">' . esc_textarea( $this->options['general']['message_text'] ) . '</textarea>
|
791 |
-
<p class="description">' . __( 'Enter the cookie notice message.', 'cookie-notice' ) . '</p>
|
792 |
-
</div>
|
793 |
-
</fieldset>';
|
794 |
-
}
|
795 |
-
|
796 |
-
/**
|
797 |
-
* Accept cookie label option.
|
798 |
-
*/
|
799 |
-
public function cn_accept_text() {
|
800 |
-
echo '
|
801 |
-
<fieldset>
|
802 |
-
<div id="cn_accept_text">
|
803 |
-
<input type="text" class="regular-text" name="cookie_notice_options[accept_text]" value="' . esc_attr( $this->options['general']['accept_text'] ) . '" />
|
804 |
-
<p class="description">' . __( 'The text of the option to accept the notice and make it disappear.', 'cookie-notice' ) . '</p>
|
805 |
-
</div>
|
806 |
-
</fieldset>';
|
807 |
-
}
|
808 |
-
|
809 |
-
/**
|
810 |
-
* Enable/Disable third party non functional cookies option.
|
811 |
-
*/
|
812 |
-
public function cn_refuse_opt() {
|
813 |
-
echo '
|
814 |
-
<fieldset>
|
815 |
-
<label><input id="cn_refuse_opt" type="checkbox" name="cookie_notice_options[refuse_opt]" value="1" ' . checked( true, $this->options['general']['refuse_opt'], false ) . ' />' . __( 'Enable to give to the user the possibility to refuse third party non functional cookies.', 'cookie-notice' ) . '</label>
|
816 |
-
<div id="cn_refuse_opt_container"' . ( $this->options['general']['refuse_opt'] === false ? ' style="display: none;"' : '' ) . '>
|
817 |
-
<div id="cn_refuse_text">
|
818 |
-
<input type="text" class="regular-text" name="cookie_notice_options[refuse_text]" value="' . esc_attr( $this->options['general']['refuse_text'] ) . '" />
|
819 |
-
<p class="description">' . __( 'The text of the button to refuse the consent.', 'cookie-notice' ) . '</p>
|
820 |
-
</div>
|
821 |
-
</div>
|
822 |
-
</fieldset>';
|
823 |
-
}
|
824 |
-
|
825 |
-
/**
|
826 |
-
* Non functional cookies code.
|
827 |
-
*/
|
828 |
-
public function cn_refuse_code() {
|
829 |
-
$allowed_html = $this->get_allowed_html();
|
830 |
-
$active = ! empty( $this->options['general']['refuse_code'] ) && empty( $this->options['general']['refuse_code_head'] ) ? 'body' : 'head';
|
831 |
-
|
832 |
-
echo '
|
833 |
-
<fieldset>
|
834 |
-
<div id="cn_refuse_code">
|
835 |
-
<div id="cn_refuse_code_fields">
|
836 |
-
<h2 class="nav-tab-wrapper">
|
837 |
-
<a id="refuse_head-tab" class="nav-tab' . ( $active === 'head' ? ' nav-tab-active' : '' ) . '" href="#refuse_head">' . __( 'Head', 'cookie-notice' ) . '</a>
|
838 |
-
<a id="refuse_body-tab" class="nav-tab' . ( $active === 'body' ? ' nav-tab-active' : '' ) . '" href="#refuse_body">' . __( 'Body', 'cookie-notice' ) . '</a>
|
839 |
-
</h2>
|
840 |
-
<div id="refuse_head" class="refuse-code-tab' . ( $active === 'head' ? ' active' : '' ) . '">
|
841 |
-
<p class="description">' . __( 'The code to be used in your site header, before the closing head tag.', 'cookie-notice' ) . '</p>
|
842 |
-
<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>
|
843 |
-
</div>
|
844 |
-
<div id="refuse_body" class="refuse-code-tab' . ( $active === 'body' ? ' active' : '' ) . '">
|
845 |
-
<p class="description">' . __( 'The code to be used in your site footer, before the closing body tag.', 'cookie-notice' ) . '</p>
|
846 |
-
<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>
|
847 |
-
</div>
|
848 |
-
</div>
|
849 |
-
<p class="description">' . __( 'Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted.', 'cookie-notice' ) . '</br>' . __( 'To get the user consent status use the <code>cn_cookies_accepted()</code> function.', 'cookie-notice' ) . '</p>
|
850 |
-
</div>
|
851 |
-
</fieldset>';
|
852 |
-
}
|
853 |
-
|
854 |
-
/**
|
855 |
-
* Revoke cookies option.
|
856 |
-
*/
|
857 |
-
public function cn_revoke_opt() {
|
858 |
-
echo '
|
859 |
-
<fieldset>
|
860 |
-
<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 consent <i>(requires "Refuse consent" option enabled)</i>.', 'cookie-notice' ) . '</label>
|
861 |
-
<div id="cn_revoke_opt_container"' . ( $this->options['general']['revoke_cookies'] ? '' : ' style="display: none;"' ) . '>
|
862 |
-
<textarea name="cookie_notice_options[revoke_message_text]" class="large-text" cols="50" rows="2">' . esc_textarea( $this->options['general']['revoke_message_text'] ) . '</textarea>
|
863 |
-
<p class="description">' . __( 'Enter the revoke message.', 'cookie-notice' ) . '</p>
|
864 |
-
<input type="text" class="regular-text" name="cookie_notice_options[revoke_text]" value="' . esc_attr( $this->options['general']['revoke_text'] ) . '" />
|
865 |
-
<p class="description">' . __( 'The text of the button to revoke the consent.', 'cookie-notice' ) . '</p>';
|
866 |
-
|
867 |
-
foreach ( $this->revoke_opts as $value => $label ) {
|
868 |
-
echo '
|
869 |
-
<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>';
|
870 |
-
}
|
871 |
-
|
872 |
-
echo '
|
873 |
-
<p class="description">' . __( 'Select the method for displaying the revoke button - automatic (in the banner) or manual using <code>[cookies_revoke]</code> shortcode.', 'cookie-notice' ) . '</p>
|
874 |
-
</div>
|
875 |
-
</fieldset>';
|
876 |
-
}
|
877 |
-
|
878 |
-
/**
|
879 |
-
* Redirection on cookie accept.
|
880 |
-
*/
|
881 |
-
public function cn_redirection() {
|
882 |
-
echo '
|
883 |
-
<fieldset>
|
884 |
-
<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 the notice is accepted.', 'cookie-notice' ) . '</label>
|
885 |
-
</fieldset>';
|
886 |
-
}
|
887 |
-
|
888 |
-
/**
|
889 |
-
* Privacy policy link option.
|
890 |
-
*/
|
891 |
-
public function cn_see_more() {
|
892 |
-
$pages = get_pages(
|
893 |
-
array(
|
894 |
-
'sort_order' => 'ASC',
|
895 |
-
'sort_column' => 'post_title',
|
896 |
-
'hierarchical' => 0,
|
897 |
-
'child_of' => 0,
|
898 |
-
'parent' => -1,
|
899 |
-
'offset' => 0,
|
900 |
-
'post_type' => 'page',
|
901 |
-
'post_status' => 'publish'
|
902 |
-
)
|
903 |
-
);
|
904 |
-
|
905 |
-
echo '
|
906 |
-
<fieldset>
|
907 |
-
<label><input id="cn_see_more" type="checkbox" name="cookie_notice_options[see_more]" value="1" ' . checked( true, $this->options['general']['see_more'], false ) . ' />' . __( 'Enable privacy policy link.', 'cookie-notice' ) . '</label>
|
908 |
-
<div id="cn_see_more_opt"' . ($this->options['general']['see_more'] === false ? ' style="display: none;"' : '') . '>
|
909 |
-
<input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][text]" value="' . esc_attr( $this->options['general']['see_more_opt']['text'] ) . '" />
|
910 |
-
<p class="description">' . __( 'The text of the privacy policy button.', 'cookie-notice' ) . '</p>
|
911 |
-
<div id="cn_see_more_opt_custom_link">';
|
912 |
-
|
913 |
-
foreach ( $this->links as $value => $label ) {
|
914 |
-
$value = esc_attr( $value );
|
915 |
-
|
916 |
-
echo '
|
917 |
-
<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>';
|
918 |
-
}
|
919 |
-
|
920 |
-
echo '
|
921 |
-
</div>
|
922 |
-
<p class="description">' . __( 'Select where to redirect user for more information.', 'cookie-notice' ) . '</p>
|
923 |
-
<div id="cn_see_more_opt_page"' . ($this->options['general']['see_more_opt']['link_type'] === 'custom' ? ' style="display: none;"' : '') . '>
|
924 |
-
<select name="cookie_notice_options[see_more_opt][id]">
|
925 |
-
<option value="0" ' . selected( 0, $this->options['general']['see_more_opt']['id'], false ) . '>' . __( '-- select page --', 'cookie-notice' ) . '</option>';
|
926 |
-
|
927 |
-
if ( $pages ) {
|
928 |
-
foreach ( $pages as $page ) {
|
929 |
-
echo '
|
930 |
-
<option value="' . $page->ID . '" ' . selected( $page->ID, $this->options['general']['see_more_opt']['id'], false ) . '>' . esc_html( $page->post_title ) . '</option>';
|
931 |
-
}
|
932 |
-
}
|
933 |
-
|
934 |
-
echo '
|
935 |
-
</select>
|
936 |
-
<p class="description">' . __( 'Select from one of your site\'s pages.', 'cookie-notice' ) . '</p>';
|
937 |
-
|
938 |
-
global $wp_version;
|
939 |
-
|
940 |
-
if ( version_compare( $wp_version, '4.9.6', '>=' ) ) {
|
941 |
-
echo '
|
942 |
-
<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>';
|
943 |
-
}
|
944 |
-
|
945 |
-
echo '
|
946 |
-
</div>
|
947 |
-
<div id="cn_see_more_opt_link"' . ($this->options['general']['see_more_opt']['link_type'] === 'page' ? ' style="display: none;"' : '') . '>
|
948 |
-
<input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][link]" value="' . esc_attr( $this->options['general']['see_more_opt']['link'] ) . '" />
|
949 |
-
<p class="description">' . __( 'Enter the full URL starting with http(s)://', 'cookie-notice' ) . '</p>
|
950 |
-
</div>
|
951 |
-
<div id="cn_see_more_link_target">';
|
952 |
-
|
953 |
-
foreach ( $this->link_targets as $target ) {
|
954 |
-
echo '
|
955 |
-
<label><input id="cn_see_more_link_target-' . $target . '" type="radio" name="cookie_notice_options[link_target]" value="' . $target . '" ' . checked( $target, $this->options['general']['link_target'], false ) . ' />' . $target . '</label>';
|
956 |
-
}
|
957 |
-
|
958 |
-
echo '
|
959 |
-
<p class="description">' . esc_html__( 'Select the privacy policy link target.', 'cookie-notice' ) . '</p>
|
960 |
-
</div>
|
961 |
-
<div id="cn_see_more_link_position">';
|
962 |
-
|
963 |
-
foreach ( $this->link_positions as $position => $label ) {
|
964 |
-
echo '
|
965 |
-
<label><input id="cn_see_more_link_position-' . $position . '" type="radio" name="cookie_notice_options[link_position]" value="' . $position . '" ' . checked( $position, $this->options['general']['link_position'], false ) . ' />' . esc_html( $label ) . '</label>';
|
966 |
-
}
|
967 |
-
|
968 |
-
echo '
|
969 |
-
<p class="description">' . esc_html__( 'Select the privacy policy link position.', 'cookie-notice' ) . '</p>
|
970 |
-
</div></div>
|
971 |
-
</fieldset>';
|
972 |
-
}
|
973 |
-
|
974 |
-
/**
|
975 |
-
* Expiration time option.
|
976 |
-
*/
|
977 |
-
public function cn_time() {
|
978 |
-
echo '
|
979 |
-
<fieldset>
|
980 |
-
<div id="cn_time">
|
981 |
-
<select name="cookie_notice_options[time]">';
|
982 |
-
|
983 |
-
foreach ( $this->times as $time => $arr ) {
|
984 |
-
$time = esc_attr( $time );
|
985 |
-
|
986 |
-
echo '
|
987 |
-
<option value="' . $time . '" ' . selected( $time, $this->options['general']['time'] ) . '>' . esc_html( $arr[0] ) . '</option>';
|
988 |
-
}
|
989 |
-
|
990 |
-
echo '
|
991 |
-
</select>
|
992 |
-
<p class="description">' . __( 'The amount of time that the cookie should be stored for when user accepts the notice.', 'cookie-notice' ) . '</p>
|
993 |
-
</div>
|
994 |
-
</fieldset>';
|
995 |
-
}
|
996 |
-
|
997 |
-
/**
|
998 |
-
* Expiration time option.
|
999 |
-
*/
|
1000 |
-
public function cn_time_rejected() {
|
1001 |
-
echo '
|
1002 |
-
<fieldset>
|
1003 |
-
<div id="cn_time_rejected">
|
1004 |
-
<select name="cookie_notice_options[time_rejected]">';
|
1005 |
-
|
1006 |
-
foreach ( $this->times as $time => $arr ) {
|
1007 |
-
$time = esc_attr( $time );
|
1008 |
-
|
1009 |
-
echo '
|
1010 |
-
<option value="' . $time . '" ' . selected( $time, $this->options['general']['time_rejected'] ) . '>' . esc_html( $arr[0] ) . '</option>';
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
echo '
|
1014 |
-
</select>
|
1015 |
-
<p class="description">' . __( 'The amount of time that the cookie should be stored for when the user doesn\'t accept the notice.', 'cookie-notice' ) . '</p>
|
1016 |
-
</div>
|
1017 |
-
</fieldset>';
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
/**
|
1021 |
-
* Script placement option.
|
1022 |
-
*/
|
1023 |
-
public function cn_script_placement() {
|
1024 |
-
echo '
|
1025 |
-
<fieldset>';
|
1026 |
-
|
1027 |
-
foreach ( $this->script_placements as $value => $label ) {
|
1028 |
-
echo '
|
1029 |
-
<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>';
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
echo '
|
1033 |
-
<p class="description">' . __( 'Select where all the plugin scripts should be placed.', 'cookie-notice' ) . '</p>
|
1034 |
-
</fieldset>';
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
/**
|
1038 |
-
* Position option.
|
1039 |
-
*/
|
1040 |
-
public function cn_position() {
|
1041 |
-
echo '
|
1042 |
-
<fieldset>
|
1043 |
-
<div id="cn_position">';
|
1044 |
-
|
1045 |
-
foreach ( $this->positions as $value => $label ) {
|
1046 |
-
$value = esc_attr( $value );
|
1047 |
-
|
1048 |
-
echo '
|
1049 |
-
<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>';
|
1050 |
-
}
|
1051 |
-
|
1052 |
-
echo '
|
1053 |
-
<p class="description">' . __( 'Select location for the notice.', 'cookie-notice' ) . '</p>
|
1054 |
-
</div>
|
1055 |
-
</fieldset>';
|
1056 |
-
}
|
1057 |
-
|
1058 |
-
/**
|
1059 |
-
* Animation effect option.
|
1060 |
-
*/
|
1061 |
-
public function cn_hide_effect() {
|
1062 |
-
echo '
|
1063 |
-
<fieldset>
|
1064 |
-
<div id="cn_hide_effect">';
|
1065 |
-
|
1066 |
-
foreach ( $this->effects as $value => $label ) {
|
1067 |
-
$value = esc_attr( $value );
|
1068 |
-
|
1069 |
-
echo '
|
1070 |
-
<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>';
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
echo '
|
1074 |
-
<p class="description">' . __( 'Select the animation style.', 'cookie-notice' ) . '</p>
|
1075 |
-
</div>
|
1076 |
-
</fieldset>';
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
/**
|
1080 |
-
* On scroll option.
|
1081 |
-
*/
|
1082 |
-
public function cn_on_scroll() {
|
1083 |
-
echo '
|
1084 |
-
<fieldset>
|
1085 |
-
<label><input id="cn_on_scroll" type="checkbox" name="cookie_notice_options[on_scroll]" value="1" ' . checked( true, $this->options['general']['on_scroll'], false ) . ' />' . __( 'Enable to accept the notice when user scrolls.', 'cookie-notice' ) . '</label>
|
1086 |
-
<div id="cn_on_scroll_offset"' . ( $this->options['general']['on_scroll'] === false || $this->options['general']['on_scroll'] == false ? ' style="display: none;"' : '' ) . '>
|
1087 |
-
<input type="text" class="text" name="cookie_notice_options[on_scroll_offset]" value="' . esc_attr( $this->options['general']['on_scroll_offset'] ) . '" /> <span>px</span>
|
1088 |
-
<p class="description">' . __( 'Number of pixels user has to scroll to accept the notice and make it disappear.', 'cookie-notice' ) . '</p>
|
1089 |
-
</div>
|
1090 |
-
</fieldset>';
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
/**
|
1094 |
-
* On click option.
|
1095 |
-
*/
|
1096 |
-
public function cn_on_click() {
|
1097 |
-
echo '
|
1098 |
-
<fieldset>
|
1099 |
-
<label><input id="cn_on_click" type="checkbox" name="cookie_notice_options[on_click]" value="1" ' . checked( true, $this->options['general']['on_click'], false ) . ' />' . __( 'Enable to accept the notice on any click on the page.', 'cookie-notice' ) . '</label>
|
1100 |
-
</fieldset>';
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
/**
|
1104 |
-
* Delete plugin data on deactivation.
|
1105 |
-
*/
|
1106 |
-
public function cn_deactivation_delete() {
|
1107 |
-
echo '
|
1108 |
-
<fieldset>
|
1109 |
-
<label><input id="cn_deactivation_delete" type="checkbox" name="cookie_notice_options[deactivation_delete]" value="1" ' . checked( true, $this->options['general']['deactivation_delete'], false ) . '/>' . __( 'Enable if you want all plugin data to be deleted on deactivation.', 'cookie-notice' ) . '</label>
|
1110 |
-
</fieldset>';
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
/**
|
1114 |
-
* CSS style option.
|
1115 |
-
*/
|
1116 |
-
public function cn_css_style() {
|
1117 |
-
echo '
|
1118 |
-
<fieldset>
|
1119 |
-
<div id="cn_css_style">';
|
1120 |
-
|
1121 |
-
foreach ( $this->styles as $value => $label ) {
|
1122 |
-
$value = esc_attr( $value );
|
1123 |
-
|
1124 |
-
echo '
|
1125 |
-
<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>';
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
echo '
|
1129 |
-
<p class="description">' . __( 'Select the buttons style.', 'cookie-notice' ) . '</p>
|
1130 |
-
</div>
|
1131 |
-
</fieldset>';
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
/**
|
1135 |
-
* CSS style option.
|
1136 |
-
*/
|
1137 |
-
public function cn_css_class() {
|
1138 |
-
echo '
|
1139 |
-
<fieldset>
|
1140 |
-
<div id="cn_css_class">
|
1141 |
-
<input type="text" class="regular-text" name="cookie_notice_options[css_class]" value="' . esc_attr( $this->options['general']['css_class'] ) . '" />
|
1142 |
-
<p class="description">' . __( 'Enter additional button CSS classes separated by spaces.', 'cookie-notice' ) . '</p>
|
1143 |
-
</div>
|
1144 |
-
</fieldset>';
|
1145 |
-
}
|
1146 |
-
|
1147 |
-
/**
|
1148 |
-
* Colors option.
|
1149 |
-
*/
|
1150 |
-
public function cn_colors() {
|
1151 |
-
echo '
|
1152 |
-
<fieldset>';
|
1153 |
-
|
1154 |
-
foreach ( $this->colors as $value => $label ) {
|
1155 |
-
$value = esc_attr( $value );
|
1156 |
-
|
1157 |
-
echo '
|
1158 |
-
<div id="cn_colors-' . $value . '"><label>' . esc_html( $label ) . '</label><br />
|
1159 |
-
<input class="cn_color" type="text" name="cookie_notice_options[colors][' . $value . ']" value="' . esc_attr( $this->options['general']['colors'][$value] ) . '" />' .
|
1160 |
-
'</div>';
|
1161 |
-
}
|
1162 |
-
|
1163 |
-
// print_r( $this->options['general']['colors'] );
|
1164 |
-
|
1165 |
-
echo '
|
1166 |
-
<div id="cn_colors-bar_opacity"><label>' . __( 'Bar opacity', 'cookie-notice' ) . '</label><br />
|
1167 |
-
<div><input id="cn_colors_bar_opacity_range" class="cn_range" type="range" min="50" max="100" step="1" name="cookie_notice_options[colors][bar_opacity]" value="' . absint( $this->options['general']['colors']['bar_opacity'] ) . '" onchange="cn_colors_bar_opacity_text.value = cn_colors_bar_opacity_range.value" /><input id="cn_colors_bar_opacity_text" class="small-text" type="number" onchange="cn_colors_bar_opacity_range.value = cn_colors_bar_opacity_text.value" min="50" max="100" value="' . absint( $this->options['general']['colors']['bar_opacity'] ) . '" /></div>' .
|
1168 |
-
'</div>';
|
1169 |
-
|
1170 |
-
echo '
|
1171 |
-
</fieldset>';
|
1172 |
-
}
|
1173 |
-
|
1174 |
-
/**
|
1175 |
-
* Validate options.
|
1176 |
-
*
|
1177 |
-
* @param array $input
|
1178 |
-
* @return array
|
1179 |
-
*/
|
1180 |
-
public function validate_options( $input ) {
|
1181 |
-
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
1182 |
-
return $input;
|
1183 |
-
|
1184 |
-
if ( isset( $_POST['save_cookie_notice_options'] ) ) {
|
1185 |
-
// position
|
1186 |
-
$input['position'] = sanitize_text_field( isset( $input['position'] ) && in_array( $input['position'], array_keys( $this->positions ) ) ? $input['position'] : $this->defaults['general']['position'] );
|
1187 |
-
|
1188 |
-
// colors
|
1189 |
-
$input['colors']['text'] = sanitize_text_field( isset( $input['colors']['text'] ) && $input['colors']['text'] !== '' && preg_match( '/^#[a-f0-9]{6}$/', $input['colors']['text'] ) === 1 ? $input['colors']['text'] : $this->defaults['general']['colors']['text'] );
|
1190 |
-
$input['colors']['bar'] = sanitize_text_field( isset( $input['colors']['bar'] ) && $input['colors']['bar'] !== '' && preg_match( '/^#[a-f0-9]{6}$/', $input['colors']['bar'] ) === 1 ? $input['colors']['bar'] : $this->defaults['general']['colors']['bar'] );
|
1191 |
-
$input['colors']['bar_opacity'] = absint( isset( $input['colors']['bar_opacity'] ) && $input['colors']['bar_opacity'] >= 50 ? $input['colors']['bar_opacity'] : $this->defaults['general']['colors']['bar_opacity'] );
|
1192 |
-
|
1193 |
-
// texts
|
1194 |
-
$input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : $this->defaults['general']['message_text'] );
|
1195 |
-
$input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : $this->defaults['general']['accept_text'] );
|
1196 |
-
$input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : $this->defaults['general']['refuse_text'] );
|
1197 |
-
$input['revoke_message_text'] = wp_kses_post( isset( $input['revoke_message_text'] ) && $input['revoke_message_text'] !== '' ? $input['revoke_message_text'] : $this->defaults['general']['revoke_message_text'] );
|
1198 |
-
$input['revoke_text'] = sanitize_text_field( isset( $input['revoke_text'] ) && $input['revoke_text'] !== '' ? $input['revoke_text'] : $this->defaults['general']['revoke_text'] );
|
1199 |
-
$input['refuse_opt'] = (bool) isset( $input['refuse_opt'] );
|
1200 |
-
$input['revoke_cookies'] = isset( $input['revoke_cookies'] );
|
1201 |
-
$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'];
|
1202 |
-
|
1203 |
-
// get allowed HTML
|
1204 |
-
$allowed_html = $this->get_allowed_html();
|
1205 |
-
|
1206 |
-
// body refuse code
|
1207 |
-
$input['refuse_code'] = wp_kses( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : $this->defaults['general']['refuse_code'], $allowed_html );
|
1208 |
-
|
1209 |
-
// head refuse code
|
1210 |
-
$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 );
|
1211 |
-
|
1212 |
-
// css button style
|
1213 |
-
$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'] );
|
1214 |
-
|
1215 |
-
// css button class
|
1216 |
-
$input['css_class'] = sanitize_text_field( isset( $input['css_class'] ) ? $input['css_class'] : $this->defaults['general']['css_class'] );
|
1217 |
-
|
1218 |
-
// link target
|
1219 |
-
$input['link_target'] = sanitize_text_field( isset( $input['link_target'] ) && in_array( $input['link_target'], array_keys( $this->link_targets ) ) ? $input['link_target'] : $this->defaults['general']['link_target'] );
|
1220 |
-
|
1221 |
-
// time
|
1222 |
-
$input['time'] = sanitize_text_field( isset( $input['time'] ) && in_array( $input['time'], array_keys( $this->times ) ) ? $input['time'] : $this->defaults['general']['time'] );
|
1223 |
-
$input['time_rejected'] = sanitize_text_field( isset( $input['time_rejected'] ) && in_array( $input['time_rejected'], array_keys( $this->times ) ) ? $input['time_rejected'] : $this->defaults['general']['time_rejected'] );
|
1224 |
-
|
1225 |
-
// script placement
|
1226 |
-
$input['script_placement'] = sanitize_text_field( isset( $input['script_placement'] ) && in_array( $input['script_placement'], array_keys( $this->script_placements ) ) ? $input['script_placement'] : $this->defaults['general']['script_placement'] );
|
1227 |
-
|
1228 |
-
// hide effect
|
1229 |
-
$input['hide_effect'] = sanitize_text_field( isset( $input['hide_effect'] ) && in_array( $input['hide_effect'], array_keys( $this->effects ) ) ? $input['hide_effect'] : $this->defaults['general']['hide_effect'] );
|
1230 |
-
|
1231 |
-
// redirection
|
1232 |
-
$input['redirection'] = isset( $input['redirection'] );
|
1233 |
-
|
1234 |
-
// on scroll
|
1235 |
-
$input['on_scroll'] = isset( $input['on_scroll'] );
|
1236 |
-
|
1237 |
-
// on scroll offset
|
1238 |
-
$input['on_scroll_offset'] = absint( isset( $input['on_scroll_offset'] ) && $input['on_scroll_offset'] !== '' ? $input['on_scroll_offset'] : $this->defaults['general']['on_scroll_offset'] );
|
1239 |
-
|
1240 |
-
// on click
|
1241 |
-
$input['on_click'] = isset( $input['on_click'] );
|
1242 |
-
|
1243 |
-
// deactivation
|
1244 |
-
$input['deactivation_delete'] = isset( $input['deactivation_delete'] );
|
1245 |
-
|
1246 |
-
// privacy policy
|
1247 |
-
$input['see_more'] = isset( $input['see_more'] );
|
1248 |
-
$input['see_more_opt']['text'] = sanitize_text_field( isset( $input['see_more_opt']['text'] ) && $input['see_more_opt']['text'] !== '' ? $input['see_more_opt']['text'] : $this->defaults['general']['see_more_opt']['text'] );
|
1249 |
-
$input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : $this->defaults['general']['see_more_opt']['link_type'] );
|
1250 |
-
|
1251 |
-
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
1252 |
-
$input['see_more_opt']['link'] = ( $input['see_more'] === true ? esc_url( $input['see_more_opt']['link'] ) : 'empty' );
|
1253 |
-
elseif ( $input['see_more_opt']['link_type'] === 'page' ) {
|
1254 |
-
$input['see_more_opt']['id'] = ( $input['see_more'] === true ? (int) $input['see_more_opt']['id'] : 0 );
|
1255 |
-
$input['see_more_opt']['sync'] = isset( $input['see_more_opt']['sync'] );
|
1256 |
-
|
1257 |
-
if ( $input['see_more_opt']['sync'] )
|
1258 |
-
update_option( 'wp_page_for_privacy_policy', $input['see_more_opt']['id'] );
|
1259 |
-
}
|
1260 |
-
|
1261 |
-
// policy link position
|
1262 |
-
$input['link_position'] = sanitize_text_field( isset( $input['link_position'] ) && in_array( $input['link_position'], array_keys( $this->link_positions ) ) ? $input['link_position'] : $this->defaults['general']['link_position'] );
|
1263 |
-
|
1264 |
-
// message link position?
|
1265 |
-
if ( $input['see_more'] === true && $input['link_position'] === 'message' && strpos( $input['message_text'], '[cookies_policy_link' ) === false )
|
1266 |
-
$input['message_text'] .= ' [cookies_policy_link]';
|
1267 |
-
|
1268 |
-
// coronabar
|
1269 |
-
$input['coronabar'] = isset( $input['coronabar'] );
|
1270 |
-
|
1271 |
-
// cases
|
1272 |
-
$input['coronabar_cases'] = isset( $input['coronabar_cases'] );
|
1273 |
-
// text adjustments
|
1274 |
-
$input['coronabar_texts'] = isset( $input['coronabar_texts'] );
|
1275 |
-
// text strings
|
1276 |
-
foreach ( $this->defaults['general']['coronabar_text_strings'] as $key => $label ) {
|
1277 |
-
$input['coronabar_text_strings'][$key] = sanitize_text_field( isset( $input['coronabar_text_strings'][$key] ) && $input['coronabar_text_strings'][$key] !== '' ? $input['coronabar_text_strings'][$key] : $this->defaults['general']['coronabar_text_strings'][$key] );
|
1278 |
-
}
|
1279 |
-
|
1280 |
-
$input['update_version'] = $this->options['general']['update_version'];
|
1281 |
-
$input['update_notice'] = $this->options['general']['update_notice'];
|
1282 |
-
|
1283 |
-
$input['translate'] = false;
|
1284 |
-
|
1285 |
-
// WPML >= 3.2
|
1286 |
-
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
1287 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Message in the notice', $input['message_text'] );
|
1288 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Button text', $input['accept_text'] );
|
1289 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Refuse button text', $input['refuse_text'] );
|
1290 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke message text', $input['revoke_message_text'] );
|
1291 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke button text', $input['revoke_text'] );
|
1292 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Privacy policy text', $input['see_more_opt']['text'] );
|
1293 |
-
|
1294 |
-
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
1295 |
-
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Custom link', $input['see_more_opt']['link'] );
|
1296 |
-
}
|
1297 |
-
} elseif ( isset( $_POST['reset_cookie_notice_options'] ) ) {
|
1298 |
-
|
1299 |
-
$input = $this->defaults['general'];
|
1300 |
-
|
1301 |
-
add_settings_error( 'reset_cookie_notice_options', 'reset_cookie_notice_options', __( 'Settings restored to defaults.', 'cookie-notice' ), 'updated' );
|
1302 |
-
|
1303 |
-
}
|
1304 |
-
|
1305 |
-
return $input;
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
/**
|
1309 |
-
* Cookie notice output.
|
1310 |
-
*
|
1311 |
-
* @return mixed
|
1312 |
-
*/
|
1313 |
-
public function add_cookie_notice() {
|
1314 |
-
// WPML >= 3.2
|
1315 |
-
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
1316 |
-
$this->options['general']['message_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['message_text'], 'Cookie Notice', 'Message in the notice' );
|
1317 |
-
$this->options['general']['accept_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['accept_text'], 'Cookie Notice', 'Button text' );
|
1318 |
-
$this->options['general']['refuse_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['refuse_text'], 'Cookie Notice', 'Refuse button text' );
|
1319 |
-
$this->options['general']['revoke_message_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['revoke_message_text'], 'Cookie Notice', 'Revoke message text' );
|
1320 |
-
$this->options['general']['revoke_text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['revoke_text'], 'Cookie Notice', 'Revoke button text' );
|
1321 |
-
$this->options['general']['see_more_opt']['text'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['see_more_opt']['text'], 'Cookie Notice', 'Privacy policy text' );
|
1322 |
-
$this->options['general']['see_more_opt']['link'] = apply_filters( 'wpml_translate_single_string', $this->options['general']['see_more_opt']['link'], 'Cookie Notice', 'Custom link' );
|
1323 |
-
// WPML and Polylang compatibility
|
1324 |
-
} elseif ( function_exists( 'icl_t' ) ) {
|
1325 |
-
$this->options['general']['message_text'] = icl_t( 'Cookie Notice', 'Message in the notice', $this->options['general']['message_text'] );
|
1326 |
-
$this->options['general']['accept_text'] = icl_t( 'Cookie Notice', 'Button text', $this->options['general']['accept_text'] );
|
1327 |
-
$this->options['general']['refuse_text'] = icl_t( 'Cookie Notice', 'Refuse button text', $this->options['general']['refuse_text'] );
|
1328 |
-
$this->options['general']['revoke_message_text'] = icl_t( 'Cookie Notice', 'Revoke message text', $this->options['general']['revoke_message_text'] );
|
1329 |
-
$this->options['general']['revoke_text'] = icl_t( 'Cookie Notice', 'Revoke button text', $this->options['general']['revoke_text'] );
|
1330 |
-
$this->options['general']['see_more_opt']['text'] = icl_t( 'Cookie Notice', 'Privacy policy text', $this->options['general']['see_more_opt']['text'] );
|
1331 |
-
$this->options['general']['see_more_opt']['link'] = icl_t( 'Cookie Notice', 'Custom link', $this->options['general']['see_more_opt']['link'] );
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
if ( function_exists( 'icl_object_id' ) )
|
1335 |
-
$this->options['general']['see_more_opt']['id'] = icl_object_id( $this->options['general']['see_more_opt']['id'], 'page', true );
|
1336 |
-
|
1337 |
-
// get cookie container args
|
1338 |
-
$options = apply_filters( 'cn_cookie_notice_args', array(
|
1339 |
-
'position' => $this->options['general']['position'],
|
1340 |
-
'css_style' => $this->options['general']['css_style'],
|
1341 |
-
'css_class' => $this->options['general']['css_class'],
|
1342 |
-
'button_class' => 'cn-button',
|
1343 |
-
'colors' => $this->options['general']['colors'],
|
1344 |
-
'message_text' => $this->options['general']['message_text'],
|
1345 |
-
'accept_text' => $this->options['general']['accept_text'],
|
1346 |
-
'refuse_text' => $this->options['general']['refuse_text'],
|
1347 |
-
'revoke_message_text' => $this->options['general']['revoke_message_text'],
|
1348 |
-
'revoke_text' => $this->options['general']['revoke_text'],
|
1349 |
-
'refuse_opt' => $this->options['general']['refuse_opt'],
|
1350 |
-
'revoke_cookies' => $this->options['general']['revoke_cookies'],
|
1351 |
-
'see_more' => $this->options['general']['see_more'],
|
1352 |
-
'see_more_opt' => $this->options['general']['see_more_opt'],
|
1353 |
-
'link_target' => $this->options['general']['link_target'],
|
1354 |
-
'link_position' => $this->options['general']['link_position'],
|
1355 |
-
'aria_label' => __( 'Cookie Notice', 'cookie-notice' )
|
1356 |
-
) );
|
1357 |
-
|
1358 |
-
// check legacy parameters
|
1359 |
-
$options = $this->check_legacy_params( $options, array( 'refuse_opt', 'see_more' ) );
|
1360 |
-
|
1361 |
-
if ( $options['see_more'] === true )
|
1362 |
-
$options['message_text'] = do_shortcode( wp_kses_post( $options['message_text'] ) );
|
1363 |
-
else
|
1364 |
-
$options['message_text'] = wp_kses_post( $options['message_text'] );
|
1365 |
-
|
1366 |
-
$options['css_class'] = esc_attr( $options['css_class'] );
|
1367 |
-
|
1368 |
-
// message output
|
1369 |
-
$output = '
|
1370 |
-
<!-- Cookie Notice plugin v' . $this->defaults['version'] . ' by Digital Factory https://dfactory.eu/ -->
|
1371 |
-
<div id="cookie-notice" role="banner" class="cookie-notice-hidden cookie-revoke-hidden cn-position-' . $options['position'] . '" aria-label="' . $options['aria_label'] . '" style="background-color: rgba(' . implode( ',', $this->hex2rgb( $options['colors']['bar'] ) ) . ',' . $options['colors']['bar_opacity'] * 0.01 . ');">'
|
1372 |
-
. '<div class="cookie-notice-container" style="color: ' . $options['colors']['text'] . ';">'
|
1373 |
-
. '<span id="cn-notice-text" class="cn-text-container">'. $options['message_text'] . '</span>'
|
1374 |
-
. '<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_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" aria-label="' . $options['accept_text'] . '">' . $options['accept_text'] . '</a>'
|
1375 |
-
. ( $options['refuse_opt'] === true ? '<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'] : '' ) . '" aria-label="' . $options['refuse_text'] . '">' . $options['refuse_text'] . '</a>' : '' )
|
1376 |
-
. ( $options['see_more'] === true && $options['link_position'] === 'banner' ? '<a href="' . ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" aria-label="' . $options['see_more_opt']['text'] . '">' . $options['see_more_opt']['text'] . '</a>' : '' )
|
1377 |
-
. '</span><a href="javascript:void(0);" id="cn-close-notice" data-cookie-set="accept" class="cn-close-icon" aria-label="' . $options['accept_text'] . '"></a>'
|
1378 |
-
. '</div>
|
1379 |
-
' . ( $options['refuse_opt'] === true && $options['revoke_cookies'] == true ?
|
1380 |
-
'<div class="cookie-revoke-container" style="color: ' . $options['colors']['text'] . ';">'
|
1381 |
-
. ( ! empty( $options['revoke_message_text'] ) ? '<span id="cn-revoke-text" class="cn-text-container">'. $options['revoke_message_text'] . '</span>' : '' )
|
1382 |
-
. '<span id="cn-revoke-buttons" class="cn-buttons-container"><a href="#" class="cn-revoke-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" aria-label="' . $options['revoke_text'] . '">' . esc_html( $options['revoke_text'] ) . '</a></span>
|
1383 |
-
</div>' : '' ) . '
|
1384 |
-
</div>
|
1385 |
-
<!-- / Cookie Notice plugin -->';
|
1386 |
-
|
1387 |
-
echo apply_filters( 'cn_cookie_notice_output', $output, $options );
|
1388 |
-
}
|
1389 |
-
|
1390 |
/**
|
1391 |
* Check if cookies are accepted.
|
1392 |
*
|
1393 |
* @return bool
|
1394 |
*/
|
1395 |
public static function cookies_accepted() {
|
1396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1397 |
}
|
1398 |
|
1399 |
/**
|
@@ -1402,7 +425,13 @@ class Cookie_Notice {
|
|
1402 |
* @return boolean Whether cookies are set
|
1403 |
*/
|
1404 |
public function cookies_set() {
|
1405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1406 |
}
|
1407 |
|
1408 |
/**
|
@@ -1418,30 +447,6 @@ class Cookie_Notice {
|
|
1418 |
public function wpsc_delete_cookie() {
|
1419 |
do_action( 'wpsc_delete_cookie', 'cookie_notice_accepted' );
|
1420 |
}
|
1421 |
-
|
1422 |
-
/**
|
1423 |
-
* Get default settings.
|
1424 |
-
*/
|
1425 |
-
public function get_defaults() {
|
1426 |
-
return $this->defaults;
|
1427 |
-
}
|
1428 |
-
|
1429 |
-
/**
|
1430 |
-
* Add links to support forum.
|
1431 |
-
*
|
1432 |
-
* @param array $links
|
1433 |
-
* @param string $file
|
1434 |
-
* @return array
|
1435 |
-
*/
|
1436 |
-
public function plugin_row_meta( $links, $file ) {
|
1437 |
-
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
1438 |
-
return $links;
|
1439 |
-
|
1440 |
-
if ( $file == plugin_basename( __FILE__ ) )
|
1441 |
-
return array_merge( $links, array( sprintf( '<a href="http://www.dfactory.eu/support/forum/cookie-notice/" target="_blank">%s</a>', __( 'Support', 'cookie-notice' ) ) ) );
|
1442 |
-
|
1443 |
-
return $links;
|
1444 |
-
}
|
1445 |
|
1446 |
/**
|
1447 |
* Add links to settings page.
|
@@ -1460,29 +465,6 @@ class Cookie_Notice {
|
|
1460 |
return $links;
|
1461 |
}
|
1462 |
|
1463 |
-
/**
|
1464 |
-
* Activate the plugin.
|
1465 |
-
*/
|
1466 |
-
public function activation() {
|
1467 |
-
add_option( 'cookie_notice_options', $this->defaults['general'], '', 'no' );
|
1468 |
-
add_option( 'cookie_notice_version', $this->defaults['version'], '', 'no' );
|
1469 |
-
}
|
1470 |
-
|
1471 |
-
/**
|
1472 |
-
* Deactivate the plugin.
|
1473 |
-
*/
|
1474 |
-
public function deactivation() {
|
1475 |
-
if ( $this->options['general']['deactivation_delete'] === true ) {
|
1476 |
-
delete_option( 'cookie_notice_options' );
|
1477 |
-
delete_option( 'cookie_notice_version' );
|
1478 |
-
// delete if set
|
1479 |
-
delete_option( 'cookie_notice_coronadata' );
|
1480 |
-
}
|
1481 |
-
|
1482 |
-
// remove WP Super Cache cookie
|
1483 |
-
$this->wpsc_delete_cookie();
|
1484 |
-
}
|
1485 |
-
|
1486 |
/**
|
1487 |
* Get allowed script blocking HTML.
|
1488 |
*
|
@@ -1516,129 +498,6 @@ class Cookie_Notice {
|
|
1516 |
);
|
1517 |
}
|
1518 |
|
1519 |
-
/**
|
1520 |
-
* Load scripts and styles - admin.
|
1521 |
-
*/
|
1522 |
-
public function admin_enqueue_scripts( $page ) {
|
1523 |
-
if ( $page !== 'settings_page_cookie-notice' )
|
1524 |
-
return;
|
1525 |
-
|
1526 |
-
wp_enqueue_script(
|
1527 |
-
'cookie-notice-admin', plugins_url( 'js/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), $this->defaults['version']
|
1528 |
-
);
|
1529 |
-
|
1530 |
-
wp_localize_script(
|
1531 |
-
'cookie-notice-admin', 'cnArgs', array(
|
1532 |
-
'resetToDefaults' => __( 'Are you sure you want to reset these settings to defaults?', 'cookie-notice' )
|
1533 |
-
)
|
1534 |
-
);
|
1535 |
-
|
1536 |
-
wp_enqueue_style( 'wp-color-picker' );
|
1537 |
-
wp_enqueue_style( 'cookie-notice-admin', plugins_url( 'css/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
1538 |
-
}
|
1539 |
-
|
1540 |
-
/**
|
1541 |
-
* Load scripts and styles - frontend.
|
1542 |
-
*/
|
1543 |
-
public function wp_enqueue_scripts() {
|
1544 |
-
wp_enqueue_script( 'cookie-notice-front', plugins_url( 'js/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array(), $this->defaults['version'], isset( $this->options['general']['script_placement'] ) && $this->options['general']['script_placement'] === 'footer' );
|
1545 |
-
|
1546 |
-
wp_localize_script(
|
1547 |
-
'cookie-notice-front',
|
1548 |
-
'cnArgs',
|
1549 |
-
array(
|
1550 |
-
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
1551 |
-
'nonce' => wp_create_nonce( 'cn_save_cases' ),
|
1552 |
-
'hideEffect' => $this->options['general']['hide_effect'],
|
1553 |
-
'position' => $this->options['general']['position'],
|
1554 |
-
'onScroll' => (int) $this->options['general']['on_scroll'],
|
1555 |
-
'onScrollOffset' => (int) $this->options['general']['on_scroll_offset'],
|
1556 |
-
'onClick' => (int) $this->options['general']['on_click'],
|
1557 |
-
'cookieName' => 'cookie_notice_accepted',
|
1558 |
-
'cookieTime' => $this->times[$this->options['general']['time']][1],
|
1559 |
-
'cookieTimeRejected' => $this->times[$this->options['general']['time_rejected']][1],
|
1560 |
-
'cookiePath' => ( defined( 'COOKIEPATH' ) ? (string) COOKIEPATH : '' ),
|
1561 |
-
'cookieDomain' => ( defined( 'COOKIE_DOMAIN' ) ? (string) COOKIE_DOMAIN : '' ),
|
1562 |
-
'redirection' => (int) $this->options['general']['redirection'],
|
1563 |
-
'cache' => (int) ( defined( 'WP_CACHE' ) && WP_CACHE ),
|
1564 |
-
'refuse' => (int) $this->options['general']['refuse_opt'],
|
1565 |
-
'revokeCookies' => (int) $this->options['general']['revoke_cookies'],
|
1566 |
-
'revokeCookiesOpt' => $this->options['general']['revoke_cookies_opt'],
|
1567 |
-
'secure' => (int) is_ssl(),
|
1568 |
-
'coronabarActive' => (int) $this->options['general']['coronabar'],
|
1569 |
-
)
|
1570 |
-
);
|
1571 |
-
|
1572 |
-
wp_enqueue_style( 'cookie-notice-front', plugins_url( 'css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
1573 |
-
}
|
1574 |
-
|
1575 |
-
/**
|
1576 |
-
* Print Coronabar scripts.
|
1577 |
-
*
|
1578 |
-
* @return mixed
|
1579 |
-
*/
|
1580 |
-
public function wp_footer_corona() {
|
1581 |
-
// coronabar
|
1582 |
-
if ( $this->options['general']['coronabar'] ) {
|
1583 |
-
|
1584 |
-
$options = array(
|
1585 |
-
'position' => $this->options['general']['position'],
|
1586 |
-
// 'backgroundOpacity' => absint( $this->options['general']['colors']['bar_opacity'] ),
|
1587 |
-
'displayCases' => $this->options['general']['coronabar_cases'],
|
1588 |
-
);
|
1589 |
-
|
1590 |
-
// text strings
|
1591 |
-
foreach ( $this->defaults['general']['coronabar_text_strings'] as $key => $label ) {
|
1592 |
-
$key_updated = $this->underscores_to_camelcase( 'text_' . $key );
|
1593 |
-
|
1594 |
-
$options[$key_updated] = $this->options['general']['coronabar_text_strings'][$key];
|
1595 |
-
}
|
1596 |
-
|
1597 |
-
// get cached data
|
1598 |
-
$cached_data = get_transient( 'cookie_notice_coronadata' );
|
1599 |
-
|
1600 |
-
// if exists, send to js
|
1601 |
-
if ( ! empty( $cached_data ) ) {
|
1602 |
-
$options['cachedData'] = $cached_data;
|
1603 |
-
}
|
1604 |
-
|
1605 |
-
echo '
|
1606 |
-
<!-- Corona Banner -->
|
1607 |
-
<script type="text/javascript">
|
1608 |
-
var CoronaBarOptions = ' . json_encode( $options ) . ';
|
1609 |
-
</script>
|
1610 |
-
<script type="text/javascript" src="//coronabar-53eb.kxcdn.com/coronabar.min.js" async></script>';
|
1611 |
-
}
|
1612 |
-
}
|
1613 |
-
|
1614 |
-
/**
|
1615 |
-
* Print non functional JavaScript in body.
|
1616 |
-
*
|
1617 |
-
* @return mixed
|
1618 |
-
*/
|
1619 |
-
public function wp_print_footer_scripts() {
|
1620 |
-
if ( $this->cookies_accepted() ) {
|
1621 |
-
$scripts = apply_filters( 'cn_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code'], $this->get_allowed_html() ) ) ) );
|
1622 |
-
|
1623 |
-
if ( ! empty( $scripts ) )
|
1624 |
-
echo $scripts;
|
1625 |
-
}
|
1626 |
-
}
|
1627 |
-
|
1628 |
-
/**
|
1629 |
-
* Print non functional JavaScript in header.
|
1630 |
-
*
|
1631 |
-
* @return mixed
|
1632 |
-
*/
|
1633 |
-
public function wp_print_header_scripts() {
|
1634 |
-
if ( $this->cookies_accepted() ) {
|
1635 |
-
$scripts = apply_filters( 'cn_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( $this->options['general']['refuse_code_head'], $this->get_allowed_html() ) ) ) );
|
1636 |
-
|
1637 |
-
if ( ! empty( $scripts ) )
|
1638 |
-
echo $scripts;
|
1639 |
-
}
|
1640 |
-
}
|
1641 |
-
|
1642 |
/**
|
1643 |
* Helper: convert hex color to rgb color.
|
1644 |
*
|
@@ -1771,6 +630,15 @@ class Cookie_Notice {
|
|
1771 |
|
1772 |
return $copy;
|
1773 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1774 |
|
1775 |
/**
|
1776 |
* Indicate if current page is the Cookie Policy page
|
1 |
<?php
|
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.0.0
|
6 |
+
Author: Hu-manity.co
|
7 |
+
Author URI: https://hu-manity.co/
|
8 |
+
Plugin URI: https://hu-manity.co/
|
9 |
License: MIT License
|
10 |
+
License URI: https://opensource.org/licenses/MIT
|
11 |
Text Domain: cookie-notice
|
12 |
Domain Path: /languages
|
13 |
|
14 |
Cookie Notice
|
15 |
+
Copyright (C) 2021, Hu-manity.co - info@hu-manity.co
|
16 |
|
17 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
18 |
|
29 |
* Cookie Notice class.
|
30 |
*
|
31 |
* @class Cookie_Notice
|
32 |
+
* @version 2.0.0
|
33 |
*/
|
34 |
class Cookie_Notice {
|
35 |
|
36 |
+
private $status = '';
|
37 |
+
|
38 |
/**
|
39 |
* @var $defaults
|
40 |
*/
|
41 |
+
public $defaults = array(
|
42 |
'general' => array(
|
43 |
+
'app_id' => '',
|
44 |
+
'app_key' => '',
|
45 |
'position' => 'bottom',
|
46 |
'message_text' => '',
|
47 |
'css_style' => 'bootstrap',
|
67 |
'on_click' => false,
|
68 |
'colors' => array(
|
69 |
'text' => '#fff',
|
70 |
+
'bar' => '#32323a',
|
71 |
'bar_opacity' => 100
|
72 |
),
|
73 |
'see_more_opt' => array(
|
78 |
'sync' => false
|
79 |
),
|
80 |
'script_placement' => 'header',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
'translate' => true,
|
82 |
'deactivation_delete' => false,
|
83 |
'update_version' => 3,
|
84 |
'update_notice' => true,
|
85 |
'update_delay_date' => 0
|
86 |
),
|
87 |
+
'version' => '2.0.0'
|
88 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
private static $_instance;
|
91 |
|
92 |
+
/**
|
93 |
+
* Disable object cloning.
|
94 |
+
*/
|
95 |
+
public function __clone() {}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Disable unserializing of the class.
|
99 |
+
*/
|
100 |
+
public function __wakeup() {}
|
101 |
|
102 |
/**
|
103 |
* Main plugin instance.
|
111 |
add_action( 'plugins_loaded', array( self::$_instance, 'load_textdomain' ) );
|
112 |
|
113 |
self::$_instance->includes();
|
114 |
+
|
115 |
+
self::$_instance->bot_detect = new Cookie_Notice_Bot_Detect();
|
116 |
+
self::$_instance->frontend = new Cookie_Notice_Frontend();
|
117 |
+
self::$_instance->settings = new Cookie_Notice_Settings();
|
118 |
+
self::$_instance->welcome = new Cookie_Notice_Welcome();
|
119 |
+
self::$_instance->welcome_api = new Cookie_Notice_Welcome_API();
|
120 |
+
self::$_instance->welcome_frontend = new Cookie_Notice_Welcome_Frontend();
|
121 |
}
|
122 |
|
123 |
return self::$_instance;
|
143 |
|
144 |
if ( ! isset( $this->options['general']['see_more_opt']['sync'] ) )
|
145 |
$this->options['general']['see_more_opt']['sync'] = $this->defaults['general']['see_more_opt']['sync'];
|
146 |
+
|
147 |
// actions
|
148 |
+
add_action( 'plugins_loaded', array( $this, 'set_status' ) );
|
149 |
add_action( 'init', array( $this, 'register_shortcodes' ) );
|
150 |
add_action( 'init', array( $this, 'wpsc_add_cookie' ) );
|
|
|
151 |
add_action( 'admin_init', array( $this, 'update_notice' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
add_action( 'wp_ajax_cn_dismiss_notice', array( $this, 'ajax_dismiss_admin_notice' ) );
|
|
|
|
|
153 |
|
154 |
// filters
|
|
|
155 |
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
|
|
156 |
}
|
157 |
|
158 |
/**
|
159 |
+
* Set plugin status.
|
160 |
+
*/
|
161 |
+
public function set_status() {
|
162 |
+
$this->status = get_option( 'cookie_notice_status', '' );
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Include required files.
|
168 |
*
|
169 |
* @return void
|
170 |
*/
|
171 |
private function includes() {
|
172 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/bot-detect.php' );
|
173 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/frontend.php' );
|
174 |
include_once( plugin_dir_path( __FILE__ ) . 'includes/functions.php' );
|
175 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/settings.php' );
|
176 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/welcome.php' );
|
177 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/welcome-api.php' );
|
178 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/welcome-frontend.php' );
|
179 |
}
|
180 |
+
|
181 |
/**
|
182 |
+
* Load textdomain.
|
183 |
*/
|
184 |
+
public function load_textdomain() {
|
185 |
+
load_plugin_textdomain( 'cookie-notice', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
/**
|
189 |
+
* Activate the plugin.
|
|
|
|
|
190 |
*/
|
191 |
+
public function activation() {
|
|
|
|
|
|
|
192 |
// get current database version
|
193 |
$current_db_version = get_option( 'cookie_notice_version', '1.0.0' );
|
194 |
|
195 |
// new version?
|
196 |
if ( version_compare( $current_db_version, $this->defaults['version'], '<' ) ) {
|
197 |
+
// update plugin version
|
198 |
update_option( 'cookie_notice_version', $this->defaults['version'], false );
|
199 |
}
|
200 |
+
|
201 |
+
add_option( 'cookie_notice_options', $this->defaults['general'], '', 'no' );
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Deactivate the plugin.
|
206 |
+
*/
|
207 |
+
public function deactivation() {
|
208 |
+
if ( $this->options['general']['deactivation_delete'] === true ) {
|
209 |
+
delete_option( 'cookie_notice_options' );
|
210 |
+
delete_option( 'cookie_notice_version' );
|
211 |
+
delete_option( 'cookie_notice_status' );
|
212 |
+
|
213 |
+
delete_transient( 'cookie_notice_compliance_cache' );
|
214 |
+
}
|
215 |
+
|
216 |
+
// remove WP Super Cache cookie
|
217 |
+
$this->wpsc_delete_cookie();
|
218 |
}
|
219 |
|
220 |
/**
|
226 |
if ( ! current_user_can( 'install_plugins' ) )
|
227 |
return;
|
228 |
|
229 |
+
$current_update = 5;
|
|
|
|
|
|
|
|
|
230 |
|
231 |
if ( $this->options['general']['update_version'] < $current_update ) {
|
232 |
// check version, if update version is lower than plugin version, set update notice to true
|
233 |
$this->options['general'] = wp_parse_args( array( 'update_version' => $current_update, 'update_notice' => true ), $this->options['general'] );
|
234 |
|
235 |
update_option( 'cookie_notice_options', $this->options['general'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
+
// show welcome
|
238 |
+
set_transient( 'cn_activation_redirect', 1 );
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
}
|
241 |
|
292 |
|
293 |
// delay notice
|
294 |
case 'approve':
|
|
|
|
|
295 |
// hide notice
|
296 |
$this->options['general'] = wp_parse_args( array( 'update_notice' => false ), $this->options['general'] );
|
297 |
$this->options['general'] = wp_parse_args( array( 'update_delay_date' => 0 ), $this->options['general'] );
|
310 |
|
311 |
exit;
|
312 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
|
314 |
/**
|
315 |
* Register shortcode.
|
367 |
// escape class(es)
|
368 |
$args['class'] = esc_attr( $args['class'] );
|
369 |
|
370 |
+
if ( ! empty( $this->get_status() ) ) {
|
371 |
+
$shortcode = '<a href="#" class="cn-revoke-cookie cn-button cn-revoke-inline' . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $args['class'] !== '' ? ' ' . $args['class'] : '' ) . '" title="' . esc_html( $args['title'] ) . '" data-hu-action="notice-revoke">' . esc_html( $args['title'] ) . '</a>';
|
372 |
+
} else {
|
373 |
+
$shortcode = '<a href="#" class="cn-revoke-cookie cn-button cn-revoke-inline' . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $args['class'] !== '' ? ' ' . $args['class'] : '' ) . '" title="' . esc_html( $args['title'] ) . '">' . esc_html( $args['title'] ) . '</a>';
|
374 |
+
}
|
375 |
|
376 |
return $shortcode;
|
377 |
}
|
402 |
return $shortcode;
|
403 |
}
|
404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
/**
|
406 |
* Check if cookies are accepted.
|
407 |
*
|
408 |
* @return bool
|
409 |
*/
|
410 |
public static function cookies_accepted() {
|
411 |
+
if ( ! empty( Cookie_Notice()->get_status() ) ) {
|
412 |
+
$cookies = isset( $_COOKIE['hu-consent'] ) ? json_decode( $_COOKIE['hu-consent'], true ) : array();
|
413 |
+
|
414 |
+
$result = ! empty( $cookies['consent'] ) ? true : false;
|
415 |
+
} else {
|
416 |
+
$result = isset( $_COOKIE['cookie_notice_accepted'] ) && $_COOKIE['cookie_notice_accepted'] === 'true';
|
417 |
+
}
|
418 |
+
|
419 |
+
return apply_filters( 'cn_is_cookie_accepted', $result );
|
420 |
}
|
421 |
|
422 |
/**
|
425 |
* @return boolean Whether cookies are set
|
426 |
*/
|
427 |
public function cookies_set() {
|
428 |
+
if ( ! empty( Cookie_Notice()->get_status() ) ) {
|
429 |
+
$result = isset( $_COOKIE['hu-consent'] );
|
430 |
+
} else {
|
431 |
+
$result = isset( $_COOKIE['cookie_notice_accepted'] );
|
432 |
+
}
|
433 |
+
|
434 |
+
; return apply_filters( 'cn_is_cookie_set', $result );
|
435 |
}
|
436 |
|
437 |
/**
|
447 |
public function wpsc_delete_cookie() {
|
448 |
do_action( 'wpsc_delete_cookie', 'cookie_notice_accepted' );
|
449 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
|
451 |
/**
|
452 |
* Add links to settings page.
|
465 |
return $links;
|
466 |
}
|
467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
/**
|
469 |
* Get allowed script blocking HTML.
|
470 |
*
|
498 |
);
|
499 |
}
|
500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
/**
|
502 |
* Helper: convert hex color to rgb color.
|
503 |
*
|
630 |
|
631 |
return $copy;
|
632 |
}
|
633 |
+
|
634 |
+
/**
|
635 |
+
* Get plugin mode
|
636 |
+
*
|
637 |
+
* @return type
|
638 |
+
*/
|
639 |
+
public function get_status() {
|
640 |
+
return $this->status; // notice, active, pending etc.
|
641 |
+
}
|
642 |
|
643 |
/**
|
644 |
* Indicate if current page is the Cookie Policy page
|
css/admin-welcome.css
ADDED
@@ -0,0 +1,1350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.dashboard_page_cookie-notice-welcome #wpcontent {
|
2 |
+
padding-left: 0;
|
3 |
+
}
|
4 |
+
|
5 |
+
.dashboard_page_cookie-notice-welcome .update-nag {
|
6 |
+
display: none;
|
7 |
+
}
|
8 |
+
|
9 |
+
.dashboard_page_cookie-notice-welcome * {
|
10 |
+
box-sizing: border-box;
|
11 |
+
}
|
12 |
+
|
13 |
+
.dashboard_page_cookie-notice-welcome #wpbody-content {
|
14 |
+
padding-bottom: 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
.dashboard_page_cookie-notice-welcome #wpfooter {
|
18 |
+
display: none !important;
|
19 |
+
}
|
20 |
+
|
21 |
+
#cn_upgrade_iframe iframe {
|
22 |
+
width: 100%;
|
23 |
+
height: 100%;
|
24 |
+
margin: 0;
|
25 |
+
border: 0;
|
26 |
+
padding: 0;
|
27 |
+
}
|
28 |
+
|
29 |
+
.cn-welcome-wrap {
|
30 |
+
display: flex;
|
31 |
+
height: calc(100vh - 32px);
|
32 |
+
margin: 0;
|
33 |
+
background: #fff;
|
34 |
+
color: #191e23;
|
35 |
+
position: fixed;
|
36 |
+
width: calc(100% - 160px);
|
37 |
+
}
|
38 |
+
|
39 |
+
.folded .cn-welcome-wrap {
|
40 |
+
width: calc(100% - 36px);
|
41 |
+
}
|
42 |
+
|
43 |
+
.dashboard_page_cookie-notice-welcome .has-loader:before {
|
44 |
+
display: block;
|
45 |
+
content: '';
|
46 |
+
background: rgba(255,255,255,0);
|
47 |
+
transition: all 0.2s;
|
48 |
+
position: absolute;
|
49 |
+
width: 100%;
|
50 |
+
height: 100%;
|
51 |
+
z-index: -1;
|
52 |
+
}
|
53 |
+
.dashboard_page_cookie-notice-welcome .has-loader.cn-loading:before {
|
54 |
+
/* background: rgba(32,193,158,.2); */
|
55 |
+
background: rgba(255,255,255,.2);
|
56 |
+
z-index: 99;
|
57 |
+
}
|
58 |
+
|
59 |
+
.dashboard_page_cookie-notice-welcome .has-loader > .cn-spinner {
|
60 |
+
position: absolute;
|
61 |
+
top: 50%;
|
62 |
+
left: 50%;
|
63 |
+
width: 21px;
|
64 |
+
height: 21px;
|
65 |
+
z-index: 100;
|
66 |
+
}
|
67 |
+
|
68 |
+
.dashboard_page_cookie-notice-welcome .has-loader > .cn-spinner:after {
|
69 |
+
border: 3px solid #20C19E;
|
70 |
+
border-color: #20C19E transparent #20C19E transparent;
|
71 |
+
width: 21px;
|
72 |
+
height: 21px;
|
73 |
+
border-radius: 50%;
|
74 |
+
opacity: 0;
|
75 |
+
transition: all 0.3s;
|
76 |
+
}
|
77 |
+
|
78 |
+
.dashboard_page_cookie-notice-welcome .has-loader.cn-loading > .cn-spinner {
|
79 |
+
max-width: 21px;
|
80 |
+
opacity: 1;
|
81 |
+
}
|
82 |
+
|
83 |
+
.dashboard_page_cookie-notice-welcome .has-loader.cn-loading > .cn-spinner:after {
|
84 |
+
opacity: 1;
|
85 |
+
}
|
86 |
+
|
87 |
+
.cn-welcome-wrap h1,
|
88 |
+
.cn-welcome-wrap h2,
|
89 |
+
.cn-welcome-wrap h3,
|
90 |
+
.cn-welcome-wrap h4,
|
91 |
+
.cn-welcome-wrap h5 {
|
92 |
+
margin-top: 0;
|
93 |
+
}
|
94 |
+
|
95 |
+
.cn-content h1,
|
96 |
+
.cn-content h2,
|
97 |
+
.cn-content h3,
|
98 |
+
.cn-content h4,
|
99 |
+
.cn-content h5 {
|
100 |
+
color: #191e23;
|
101 |
+
}
|
102 |
+
|
103 |
+
.cn-sidebar h1,
|
104 |
+
.cn-sidebar h2,
|
105 |
+
.cn-sidebar h3,
|
106 |
+
.cn-sidebar h4,
|
107 |
+
.cn-sidebar h5 {
|
108 |
+
color: #fff;
|
109 |
+
}
|
110 |
+
|
111 |
+
.cn-welcome-wrap h1 {
|
112 |
+
font-size: 4em;
|
113 |
+
}
|
114 |
+
.cn-welcome-wrap h2 {
|
115 |
+
font-size: 2em;
|
116 |
+
line-height: 1.1;
|
117 |
+
}
|
118 |
+
.cn-welcome-wrap h4 {
|
119 |
+
font-size: 1.5em;
|
120 |
+
}
|
121 |
+
.cn-welcome-wrap h5 {
|
122 |
+
font-size: 1.35em;
|
123 |
+
}
|
124 |
+
|
125 |
+
.cn-welcome-wrap a,
|
126 |
+
.cn-welcome-wrap .cn-btn {
|
127 |
+
transition: all 0.2s;
|
128 |
+
}
|
129 |
+
|
130 |
+
.cn-welcome-wrap .cn-content a.cn-link {
|
131 |
+
color: #20C19E;
|
132 |
+
text-decoration: none;
|
133 |
+
font-style: normal;
|
134 |
+
outline: none;
|
135 |
+
box-shadow: none;
|
136 |
+
}
|
137 |
+
|
138 |
+
.cn-welcome-wrap .cn-sidebar {
|
139 |
+
width: 25%;
|
140 |
+
min-height: 100%;
|
141 |
+
background: #35353F;
|
142 |
+
/*
|
143 |
+
background: rgba(7,137,145,0.7);
|
144 |
+
background: linear-gradient(145deg, rgba(7,137,145,.7), rgba(32,193,158,.7));
|
145 |
+
*/
|
146 |
+
/*
|
147 |
+
display: flex;
|
148 |
+
justify-content: center;
|
149 |
+
align-items: center;
|
150 |
+
*/
|
151 |
+
position: relative;
|
152 |
+
text-align: left;
|
153 |
+
overflow-y: scroll;
|
154 |
+
-ms-overflow-style: none; /* IE and Edge */
|
155 |
+
scrollbar-width: none; /* Firefox */
|
156 |
+
}
|
157 |
+
|
158 |
+
.cn-welcome-wrap .cn-content {
|
159 |
+
width: 100%;
|
160 |
+
min-height: 100%;
|
161 |
+
background-size: cover;
|
162 |
+
position: relative;
|
163 |
+
/*
|
164 |
+
display: flex;
|
165 |
+
justify-content: space-between;
|
166 |
+
align-items: center;
|
167 |
+
*/
|
168 |
+
text-align: center;
|
169 |
+
overflow-y: scroll;
|
170 |
+
-ms-overflow-style: none; /* IE and Edge */
|
171 |
+
scrollbar-width: none; /* Firefox */
|
172 |
+
}
|
173 |
+
|
174 |
+
.cn-welcome-wrap .cn-content::-webkit-scrollbar,
|
175 |
+
.cn-welcome-wrap .cn-sidebar::-webkit-scrollbar {
|
176 |
+
width: 0;
|
177 |
+
height: 0;
|
178 |
+
}
|
179 |
+
|
180 |
+
.cn-welcome-wrap .cn-hero-image {
|
181 |
+
display: flex;
|
182 |
+
justify-content: center;
|
183 |
+
align-items: flex-start;
|
184 |
+
max-width: 70%;
|
185 |
+
margin: 4em auto 2.5em;
|
186 |
+
}
|
187 |
+
|
188 |
+
.cn-welcome-wrap .cn-hero-image img {
|
189 |
+
align-self: center;
|
190 |
+
max-width: 600px;
|
191 |
+
}
|
192 |
+
|
193 |
+
.cn-welcome-wrap .cn-hero-image .cn-flex-item img {
|
194 |
+
max-width: 400px;
|
195 |
+
}
|
196 |
+
|
197 |
+
.cn-welcome-wrap .cn-flex-item {
|
198 |
+
flex-grow: 1;
|
199 |
+
flex-basis: 0;
|
200 |
+
}
|
201 |
+
|
202 |
+
.cn-welcome-wrap .cn-flex-item:first-child,
|
203 |
+
.cn-welcome-wrap .cn-flex-item:last-child {
|
204 |
+
flex-grow: 4;
|
205 |
+
}
|
206 |
+
|
207 |
+
.cn-welcome-wrap .cn-flex-item:nth-child(2) img {
|
208 |
+
margin-top: 130px;
|
209 |
+
}
|
210 |
+
|
211 |
+
.cn-welcome-wrap .cn-flex-item ul {
|
212 |
+
padding: 0;
|
213 |
+
margin: 3em 0 0;
|
214 |
+
list-style: none;
|
215 |
+
font-size: 14px;
|
216 |
+
}
|
217 |
+
|
218 |
+
.cn-welcome-wrap .cn-flex-item ul li {
|
219 |
+
margin: 0 0 0.5em;
|
220 |
+
padding: 0;
|
221 |
+
}
|
222 |
+
|
223 |
+
.cn-welcome-wrap .cn-flex-item ul li span {
|
224 |
+
display: inline-block;
|
225 |
+
position: relative;
|
226 |
+
padding-left: 20px;
|
227 |
+
}
|
228 |
+
|
229 |
+
.cn-welcome-wrap .cn-flex-item ul li span::before {
|
230 |
+
font-family: dashicons;
|
231 |
+
line-height: 1;
|
232 |
+
font-weight: 400;
|
233 |
+
font-style: normal;
|
234 |
+
text-transform: none;
|
235 |
+
text-rendering: auto;
|
236 |
+
font-size: 16px;
|
237 |
+
text-align: center;
|
238 |
+
display: block;
|
239 |
+
content: "\f15e";
|
240 |
+
position: absolute;
|
241 |
+
top: 2px;
|
242 |
+
left: 0;
|
243 |
+
line-height: 1;
|
244 |
+
width: 16px;
|
245 |
+
height: 16px;
|
246 |
+
margin: 0;
|
247 |
+
color: #20C19E;
|
248 |
+
background: none;
|
249 |
+
}
|
250 |
+
|
251 |
+
.cn-welcome-wrap .cn-logo-container {
|
252 |
+
margin-bottom: 1em;
|
253 |
+
}
|
254 |
+
|
255 |
+
.cn-welcome-wrap .cn-logo-container > * {
|
256 |
+
vertical-align: middle;
|
257 |
+
margin-bottom: 0.5em;
|
258 |
+
}
|
259 |
+
|
260 |
+
.cn-welcome-wrap .cn-logo-container img {
|
261 |
+
display: inline-block;
|
262 |
+
}
|
263 |
+
|
264 |
+
.cn-welcome-wrap .cn-badge {
|
265 |
+
background: #ccc;
|
266 |
+
color: #191e23;
|
267 |
+
border-radius: 3px;
|
268 |
+
text-transform: uppercase;
|
269 |
+
line-height: 1;
|
270 |
+
display: inline-block;
|
271 |
+
padding: 5px;
|
272 |
+
margin-left: 5px;
|
273 |
+
margin-right: 5px;
|
274 |
+
}
|
275 |
+
|
276 |
+
.cn-welcome-wrap.cn-welcome-step-2 .cn-content {
|
277 |
+
background-size: cover;
|
278 |
+
}
|
279 |
+
|
280 |
+
.cn-welcome-wrap.cn-welcome-step-3 .cn-content {
|
281 |
+
background-size: cover;
|
282 |
+
}
|
283 |
+
|
284 |
+
.cn-welcome-wrap.cn-welcome-step-4 .cn-content {
|
285 |
+
background-size: cover;
|
286 |
+
}
|
287 |
+
|
288 |
+
.cn-welcome-wrap .cn-content.cn-sidebar-visible {
|
289 |
+
width: 75%;
|
290 |
+
}
|
291 |
+
|
292 |
+
.cn-welcome-wrap .cn-content-header {
|
293 |
+
text-align: center;
|
294 |
+
margin-bottom: 2em;
|
295 |
+
line-height: 1em;
|
296 |
+
display: flex;
|
297 |
+
flex-direction: row;
|
298 |
+
}
|
299 |
+
|
300 |
+
.cn-welcome-wrap .cn-content-header:before,
|
301 |
+
.cn-welcome-wrap .cn-content-header:after {
|
302 |
+
content:'';
|
303 |
+
flex: 1 1;
|
304 |
+
margin: auto;
|
305 |
+
border-bottom: 1px solid rgba(255,255,255,.7);
|
306 |
+
}
|
307 |
+
|
308 |
+
.cn-welcome-wrap .cn-content-header:before {
|
309 |
+
margin-right: 1em;
|
310 |
+
}
|
311 |
+
|
312 |
+
.cn-welcome-wrap .cn-content-header:after {
|
313 |
+
margin-left: 1em;
|
314 |
+
}
|
315 |
+
|
316 |
+
.cn-welcome-wrap .cn-inner {
|
317 |
+
position: relative;
|
318 |
+
z-index: 1;
|
319 |
+
padding: 4em;
|
320 |
+
min-height: 100%;
|
321 |
+
width: 100%;
|
322 |
+
display: flex;
|
323 |
+
justify-content: space-between;
|
324 |
+
}
|
325 |
+
|
326 |
+
.cn-sidebar .cn-inner {
|
327 |
+
flex-direction: column;
|
328 |
+
justify-content: space-between;
|
329 |
+
padding-bottom: 2em;
|
330 |
+
}
|
331 |
+
|
332 |
+
.cn-content .cn-inner {
|
333 |
+
flex-direction: row;
|
334 |
+
justify-content: space-around;
|
335 |
+
align-items: center;
|
336 |
+
}
|
337 |
+
|
338 |
+
.cn-content .cn-lead {
|
339 |
+
margin: 0 auto;
|
340 |
+
max-width: 75%;
|
341 |
+
}
|
342 |
+
|
343 |
+
.cn-content .cn-lead p {
|
344 |
+
font-size: 1.3em;
|
345 |
+
margin: 0.5em 0;
|
346 |
+
}
|
347 |
+
|
348 |
+
.cn-content .cn-lead p:last-child {
|
349 |
+
margin-bottom: 0;
|
350 |
+
}
|
351 |
+
|
352 |
+
.cn-content .cn-content-full {
|
353 |
+
width: 100%;
|
354 |
+
}
|
355 |
+
|
356 |
+
.cn-sidebar {
|
357 |
+
color: #BBBBC0;
|
358 |
+
}
|
359 |
+
|
360 |
+
.cn-sidebar a,
|
361 |
+
.cn-sidebar em {
|
362 |
+
color: #20C19E;
|
363 |
+
text-decoration: none;
|
364 |
+
font-style: normal;
|
365 |
+
outline: none;
|
366 |
+
box-shadow: none;
|
367 |
+
}
|
368 |
+
|
369 |
+
.cn-sidebar a:hover {
|
370 |
+
text-decoration: underline;
|
371 |
+
}
|
372 |
+
|
373 |
+
.cn-sidebar .cn-lead {
|
374 |
+
margin-bottom: 2em;
|
375 |
+
}
|
376 |
+
|
377 |
+
.cn-sidebar .cn-lead b {
|
378 |
+
color: #fff;
|
379 |
+
font-weight: bold;
|
380 |
+
font-size: 15px;
|
381 |
+
}
|
382 |
+
|
383 |
+
.cn-sidebar .cn-lead p:last-child {
|
384 |
+
margin-bottom: 0;
|
385 |
+
}
|
386 |
+
|
387 |
+
.cn-sidebar .cn-buttons,
|
388 |
+
.cn-content .cn-buttons {
|
389 |
+
margin-top: 3em;
|
390 |
+
}
|
391 |
+
|
392 |
+
.cn-header {
|
393 |
+
margin-bottom: 3em;
|
394 |
+
}
|
395 |
+
|
396 |
+
.cn-footer {
|
397 |
+
margin-top: 3em;
|
398 |
+
text-align: left;
|
399 |
+
}
|
400 |
+
|
401 |
+
.cn-footer .cn-btn.cn-skip-button {
|
402 |
+
color: #86868F;
|
403 |
+
font-weight: normal;
|
404 |
+
font-size: inherit;
|
405 |
+
text-decoration: none;
|
406 |
+
}
|
407 |
+
|
408 |
+
.cn-footer .cn-btn.cn-skip-button:hover {
|
409 |
+
color: #fff;
|
410 |
+
text-decoration: none;
|
411 |
+
}
|
412 |
+
|
413 |
+
.cn-footer a:hover {
|
414 |
+
color: #20C19E;
|
415 |
+
}
|
416 |
+
|
417 |
+
.cn-btn {
|
418 |
+
border-radius: 3em;
|
419 |
+
padding: 1em 3em;
|
420 |
+
box-shadow: none;
|
421 |
+
border: 2px solid #20C19E;
|
422 |
+
outline: none;
|
423 |
+
background: #20C19E;
|
424 |
+
font-size: 15px;
|
425 |
+
font-weight: bold;
|
426 |
+
color: #fff;
|
427 |
+
cursor: pointer;
|
428 |
+
display: inline-block;
|
429 |
+
text-decoration: none;
|
430 |
+
}
|
431 |
+
|
432 |
+
.cn-btn:hover,
|
433 |
+
.cn-btn:focus {
|
434 |
+
box-shadow: none;
|
435 |
+
border: 2px solid #20C19E;
|
436 |
+
background: #20C19E;
|
437 |
+
color: #fff;
|
438 |
+
text-decoration: none !important;
|
439 |
+
}
|
440 |
+
|
441 |
+
.cn-btn.cn-btn-outline {
|
442 |
+
background: transparent;
|
443 |
+
color: #fff;
|
444 |
+
box-shadow: 0 0 15px 0 rgba(255,255,255,.4), inset 0 0 15px rgba(255,255,255,.4);
|
445 |
+
}
|
446 |
+
|
447 |
+
.cn-btn.cn-btn-outline:hover {
|
448 |
+
text-shadow: 0 0 10px rgba(255,255,255,.4), 0 0 20px rgba(255,255,255,.4), 0 0 30px rgba(255,255,255,.4), 0 0 40px rgba(255,255,255,.4);
|
449 |
+
}
|
450 |
+
|
451 |
+
.cn-btn.cn-btn-outline .cn-spinner::after {
|
452 |
+
border-color: #fff transparent #fff transparent;
|
453 |
+
}
|
454 |
+
|
455 |
+
.cn-btn.cn-btn-lg {
|
456 |
+
border-radius: 4em;
|
457 |
+
padding: 1.5em 4em;
|
458 |
+
font-size: 15px;
|
459 |
+
}
|
460 |
+
|
461 |
+
.cn-btn.cn-btn-link {
|
462 |
+
background: none;
|
463 |
+
border-color: transparent;
|
464 |
+
color: #fff;
|
465 |
+
padding: 0;
|
466 |
+
}
|
467 |
+
|
468 |
+
.cn-top-bar {
|
469 |
+
display: flex;
|
470 |
+
justify-content: space-between;
|
471 |
+
align-items: center;
|
472 |
+
}
|
473 |
+
|
474 |
+
.cn-stepper {
|
475 |
+
padding: 1.5em;
|
476 |
+
margin: 1.5em -1.5em;
|
477 |
+
overflow-x: hidden;
|
478 |
+
overflow-y: auto;
|
479 |
+
display: flex;
|
480 |
+
justify-content: space-between;
|
481 |
+
}
|
482 |
+
|
483 |
+
.cn-stepper li {
|
484 |
+
position: relative;
|
485 |
+
display: flex;
|
486 |
+
flex: 1;
|
487 |
+
align-items: center;
|
488 |
+
transition: .2s;
|
489 |
+
margin: 0;
|
490 |
+
}
|
491 |
+
|
492 |
+
.cn-stepper li:not(:last-child):after {
|
493 |
+
position: relative;
|
494 |
+
flex: 1;
|
495 |
+
height: 1px;
|
496 |
+
margin: .35em 0 0 0;
|
497 |
+
content: '';
|
498 |
+
background-color: #86868F;
|
499 |
+
}
|
500 |
+
|
501 |
+
.cn-stepper li .cn-step {
|
502 |
+
cursor: default;
|
503 |
+
}
|
504 |
+
|
505 |
+
.cn-stepper li .cn-step .cn-circle {
|
506 |
+
display: inline-block;
|
507 |
+
width: 2em;
|
508 |
+
height: 2em;
|
509 |
+
line-height: 2em;
|
510 |
+
font-weight: bold;
|
511 |
+
color: #fff;
|
512 |
+
text-align: center;
|
513 |
+
background: #86868F;
|
514 |
+
border-radius: 50%;
|
515 |
+
}
|
516 |
+
|
517 |
+
.cn-stepper li.cn-completed .cn-step .cn-circle {
|
518 |
+
color: transparent;
|
519 |
+
background: #20C19E;
|
520 |
+
}
|
521 |
+
.cn-stepper li.cn-completed .cn-step .cn-circle:before{
|
522 |
+
font-family: dashicons;
|
523 |
+
line-height: 1;
|
524 |
+
font-weight: 400;
|
525 |
+
font-style: normal;
|
526 |
+
text-transform: none;
|
527 |
+
text-rendering: auto;
|
528 |
+
font-size: 14px;
|
529 |
+
text-align: center;
|
530 |
+
display: block;
|
531 |
+
content: "\f15e";
|
532 |
+
position: absolute;
|
533 |
+
top: 0;
|
534 |
+
left: -2px;
|
535 |
+
line-height: 2em;
|
536 |
+
width: 2em;
|
537 |
+
pointer-events: none;
|
538 |
+
transform: scale(1.25, 1.25);
|
539 |
+
color: #fff;
|
540 |
+
}
|
541 |
+
|
542 |
+
.cn-stepper li.cn-active .cn-step .cn-circle {
|
543 |
+
background: #20C19E;
|
544 |
+
}
|
545 |
+
|
546 |
+
.cn-features-list .cn-feature {
|
547 |
+
display: flex;
|
548 |
+
margin-bottom: 2em;
|
549 |
+
padding: 2em;
|
550 |
+
border: 1px solid rgba(255,255,255,0.1);
|
551 |
+
border-radius: 3px;
|
552 |
+
box-sizing: content-box;
|
553 |
+
background-color: rgba(255,255,255,0.1);
|
554 |
+
}
|
555 |
+
|
556 |
+
.cn-features-list .cn-feature:last-child {
|
557 |
+
margin-bottom: 0;
|
558 |
+
}
|
559 |
+
|
560 |
+
.cn-features-list .cn-feature img {
|
561 |
+
width: 48px;
|
562 |
+
height: 48px;
|
563 |
+
margin-right: 2em;
|
564 |
+
}
|
565 |
+
.cn-features-list .cn-feature h5 {
|
566 |
+
margin-bottom: 0.5em;
|
567 |
+
}
|
568 |
+
|
569 |
+
.cn-features-list .cn-feature-description p:last-child {
|
570 |
+
margin-bottom: 0;
|
571 |
+
}
|
572 |
+
|
573 |
+
.cn-form-container {
|
574 |
+
margin-left: -15px;
|
575 |
+
margin-right: -15px;
|
576 |
+
padding-left: 15px;
|
577 |
+
padding-right: 15px;
|
578 |
+
background: rgba(255,255,255,0.05);
|
579 |
+
padding-bottom: 1px;
|
580 |
+
}
|
581 |
+
|
582 |
+
.cn-form-header {
|
583 |
+
font-size: 15px;
|
584 |
+
font-style: normal;
|
585 |
+
font-weight: bold;
|
586 |
+
color: #fff;
|
587 |
+
width: 100%;
|
588 |
+
text-align: left;
|
589 |
+
margin: 0;
|
590 |
+
padding: 15px 0;
|
591 |
+
color: #fff;
|
592 |
+
}
|
593 |
+
|
594 |
+
.cn-form.cn-form-disabled[data-action="payment"] {
|
595 |
+
pointer-events: none;
|
596 |
+
opacity: 0.5;
|
597 |
+
}
|
598 |
+
|
599 |
+
.cn-form.cn-form-disabled .cn-accordion-collapse {
|
600 |
+
pointer-events: none;
|
601 |
+
}
|
602 |
+
|
603 |
+
.cn-welcome-wrap form {
|
604 |
+
position: relative;
|
605 |
+
margin: 0;
|
606 |
+
}
|
607 |
+
|
608 |
+
.cn-welcome-wrap form .cn-form-feedback {
|
609 |
+
position: relative;
|
610 |
+
margin-bottom: 1.5em;
|
611 |
+
color: #fff;
|
612 |
+
overflow-y: hidden;
|
613 |
+
max-height: 500px; /* approximate max height */
|
614 |
+
transition: all .3s cubic-bezier(0, 1, 0.5, 1);
|
615 |
+
transition-delay: 0.3s;
|
616 |
+
opacity: 1;
|
617 |
+
}
|
618 |
+
|
619 |
+
.cn-welcome-wrap form .cn-form-feedback p {
|
620 |
+
padding: 15px;
|
621 |
+
margin: 0;
|
622 |
+
}
|
623 |
+
|
624 |
+
.cn-welcome-wrap form .cn-form-feedback p.cn-error {
|
625 |
+
border: 1px solid #da2439;
|
626 |
+
border-radius: 3px;
|
627 |
+
background: rgba( 218,36,57, 0.5);
|
628 |
+
}
|
629 |
+
|
630 |
+
.cn-welcome-wrap form .cn-form-feedback p.cn-message {
|
631 |
+
border: 1px solid #e78d26;
|
632 |
+
border-radius: 3px;
|
633 |
+
background: rgba( 231,141,38, 0.5);
|
634 |
+
}
|
635 |
+
|
636 |
+
.cn-welcome-wrap form .cn-form-feedback.cn-hidden {
|
637 |
+
max-height: 0;
|
638 |
+
margin-bottom: 0;
|
639 |
+
opacity: 0;
|
640 |
+
}
|
641 |
+
|
642 |
+
.cn-welcome-wrap form .cn-field:not(:last-child) {
|
643 |
+
position: relative;
|
644 |
+
margin: 0 0 1em;
|
645 |
+
}
|
646 |
+
|
647 |
+
.cn-welcome-wrap form .cn-field.cn-field-half {
|
648 |
+
width: calc(50% - 0.5em);
|
649 |
+
display: inline-block;
|
650 |
+
margin: auto 0.25em;
|
651 |
+
}
|
652 |
+
|
653 |
+
.cn-welcome-wrap form .cn-field.cn-field-first {
|
654 |
+
margin-left: 0;
|
655 |
+
}
|
656 |
+
|
657 |
+
.cn-welcome-wrap form .cn-field.cn-field-last {
|
658 |
+
margin-right: 0;
|
659 |
+
}
|
660 |
+
|
661 |
+
.cn-welcome-wrap form label {
|
662 |
+
color: #fff;
|
663 |
+
margin: 0 0 0.5em;
|
664 |
+
display: block;
|
665 |
+
}
|
666 |
+
|
667 |
+
.cn-welcome-wrap form .cn-field > label {
|
668 |
+
color: #fff;
|
669 |
+
margin: 0 0 0.5em;
|
670 |
+
display: block;
|
671 |
+
font-weight: 700;
|
672 |
+
}
|
673 |
+
|
674 |
+
.cn-welcome-wrap form .cn-field.cn-field-submit {
|
675 |
+
margin: 1.5em 0 0 0;
|
676 |
+
}
|
677 |
+
|
678 |
+
.cn-welcome-wrap form input[type="text"],
|
679 |
+
.cn-welcome-wrap form input[type="password"],
|
680 |
+
.cn-welcome-wrap form input[type="checkbox"],
|
681 |
+
.cn-welcome-wrap form input[type="radio"],
|
682 |
+
.cn-welcome-wrap form select {
|
683 |
+
background: transparent;
|
684 |
+
border: 1px solid #86868F;
|
685 |
+
margin: 0;
|
686 |
+
padding: 0 15px;
|
687 |
+
color: #fff;
|
688 |
+
transition: border-color 0.2s;
|
689 |
+
}
|
690 |
+
|
691 |
+
.cn-welcome-wrap form input[type="checkbox"],
|
692 |
+
.cn-welcome-wrap form input[type="radio"] {
|
693 |
+
transition: none;
|
694 |
+
}
|
695 |
+
|
696 |
+
.cn-welcome-wrap form input[type="text"],
|
697 |
+
.cn-welcome-wrap form input[type="password"],
|
698 |
+
.cn-welcome-wrap form select {
|
699 |
+
width: 100%;
|
700 |
+
line-height: 3;
|
701 |
+
}
|
702 |
+
|
703 |
+
.cn-welcome-wrap form .cn-select-wrapper {
|
704 |
+
position: relative;
|
705 |
+
margin: 0;
|
706 |
+
}
|
707 |
+
.cn-welcome-wrap form .cn-select-wrapper:after {
|
708 |
+
font-family: dashicons;
|
709 |
+
line-height: 1;
|
710 |
+
font-weight: 400;
|
711 |
+
font-style: normal;
|
712 |
+
text-transform: none;
|
713 |
+
text-rendering: auto;
|
714 |
+
font-size: 18px;
|
715 |
+
text-align: center;
|
716 |
+
display: block;
|
717 |
+
content: "\f347";
|
718 |
+
position: absolute;
|
719 |
+
top: 50%;
|
720 |
+
margin-top: -9px;
|
721 |
+
right: 15px;
|
722 |
+
line-height: 1;
|
723 |
+
pointer-events: none;
|
724 |
+
color: #fff;
|
725 |
+
}
|
726 |
+
|
727 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper,
|
728 |
+
.cn-welcome-wrap form .cn-radio-wrapper {
|
729 |
+
position: relative;
|
730 |
+
}
|
731 |
+
|
732 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper label,
|
733 |
+
.cn-welcome-wrap form .cn-radio-wrapper label {
|
734 |
+
color: #BBBBC0;
|
735 |
+
}
|
736 |
+
|
737 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper.cn-horizontal-wrapper label,
|
738 |
+
.cn-welcome-wrap form .cn-radio-wrapper.cn-horizontal-wrapper label {
|
739 |
+
display: inline-block;
|
740 |
+
margin-right: 0.5em;
|
741 |
+
}
|
742 |
+
|
743 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper.cn-horizontal-wrapper label:last-child,
|
744 |
+
.cn-welcome-wrap form .cn-radio-wrapper.cn-horizontal-wrapper label:last-child {
|
745 |
+
margin-right: 0;
|
746 |
+
}
|
747 |
+
|
748 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper input,
|
749 |
+
.cn-welcome-wrap form .cn-radio-wrapper input {
|
750 |
+
position: absolute;
|
751 |
+
margin: 2px 0;
|
752 |
+
}
|
753 |
+
|
754 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper input:focus,
|
755 |
+
.cn-welcome-wrap form .cn-radio-wrapper input:focus {
|
756 |
+
border-color: #86868F;
|
757 |
+
}
|
758 |
+
|
759 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper input:checked,
|
760 |
+
.cn-welcome-wrap form .cn-radio-wrapper input:checked {
|
761 |
+
background: none;
|
762 |
+
border-color: #20C19E;
|
763 |
+
}
|
764 |
+
|
765 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper input:checked,
|
766 |
+
.cn-welcome-wrap form .cn-radio-wrapper input:checked {
|
767 |
+
background: none;
|
768 |
+
border-color: #20C19E;
|
769 |
+
}
|
770 |
+
|
771 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper input:checked::before {
|
772 |
+
font-family: dashicons;
|
773 |
+
line-height: 1;
|
774 |
+
font-weight: 400;
|
775 |
+
font-style: normal;
|
776 |
+
text-transform: none;
|
777 |
+
text-rendering: auto;
|
778 |
+
font-size: 14px;
|
779 |
+
text-align: center;
|
780 |
+
display: block;
|
781 |
+
content: "\f15e";
|
782 |
+
position: absolute;
|
783 |
+
top: 0;
|
784 |
+
left: 0;
|
785 |
+
line-height: 1;
|
786 |
+
width: 16px;
|
787 |
+
height: 16px;
|
788 |
+
margin: 0 auto 0 -1px;
|
789 |
+
color: #fff;
|
790 |
+
background: none;
|
791 |
+
}
|
792 |
+
|
793 |
+
.cn-welcome-wrap form .cn-color-picker-wrapper input {
|
794 |
+
border: none;
|
795 |
+
}
|
796 |
+
|
797 |
+
.cn-welcome-wrap form .cn-color-picker-wrapper .sp-original-input-container {
|
798 |
+
margin-left: 0;
|
799 |
+
position: absolute;
|
800 |
+
border: 1px solid rgba(255,255,255,1);
|
801 |
+
border-radius: 0;
|
802 |
+
}
|
803 |
+
|
804 |
+
.cn-welcome-wrap form .cn-color-picker-wrapper .sp-colorize-container {
|
805 |
+
height: 16px;
|
806 |
+
}
|
807 |
+
|
808 |
+
.cn-welcome-wrap form .cn-color-picker-wrapper input:checked::before {
|
809 |
+
content: '';
|
810 |
+
}
|
811 |
+
|
812 |
+
.cn-welcome-wrap form .cn-radio-wrapper label input:checked::before {
|
813 |
+
text-align: center;
|
814 |
+
display: block;
|
815 |
+
position: absolute;
|
816 |
+
top: 2px;
|
817 |
+
left: 2px;
|
818 |
+
line-height: 1;
|
819 |
+
width: 10px;
|
820 |
+
height: 10px;
|
821 |
+
margin: 0 auto;
|
822 |
+
color: #fff;
|
823 |
+
background: #20C19E;
|
824 |
+
}
|
825 |
+
|
826 |
+
.cn-welcome-wrap form .cn-checkbox-wrapper label > span,
|
827 |
+
.cn-welcome-wrap form .cn-radio-wrapper label > span {
|
828 |
+
margin-left: 2em;
|
829 |
+
display: block;
|
830 |
+
}
|
831 |
+
|
832 |
+
.cn-welcome-wrap form .cn-checkbox-image-wrapper label,
|
833 |
+
.cn-welcome-wrap form .cn-radio-image-wrapper label {
|
834 |
+
display: inline-block;
|
835 |
+
margin: 0 0.25em;
|
836 |
+
}
|
837 |
+
|
838 |
+
.cn-sidebar form .cn-checkbox-image-wrapper span,
|
839 |
+
.cn-sidebar form .cn-radio-image-wrapper span {
|
840 |
+
display: block;
|
841 |
+
text-align: center;
|
842 |
+
font-weight: 600;
|
843 |
+
}
|
844 |
+
|
845 |
+
.cn-welcome-wrap form .cn-checkbox-image-wrapper label:first-child,
|
846 |
+
.cn-welcome-wrap form .cn-radio-image-wrapper label:first-child {
|
847 |
+
margin-left: 0;
|
848 |
+
}
|
849 |
+
|
850 |
+
.cn-welcome-wrap form .cn-checkbox-image-wrapper label:last-child,
|
851 |
+
.cn-welcome-wrap form .cn-radio-image-wrapper label:last-child {
|
852 |
+
margin-right: 0;
|
853 |
+
}
|
854 |
+
|
855 |
+
.cn-welcome-wrap form .cn-checkbox-image-wrapper input,
|
856 |
+
.cn-welcome-wrap form .cn-radio-image-wrapper input {
|
857 |
+
display: none;
|
858 |
+
}
|
859 |
+
|
860 |
+
.cn-welcome-wrap form .cn-checkbox-image-wrapper input:checked + img,
|
861 |
+
.cn-welcome-wrap form .cn-radio-image-wrapper input:checked + img {
|
862 |
+
border-color: #20C19E;
|
863 |
+
}
|
864 |
+
|
865 |
+
.cn-welcome-wrap form .cn-checkbox-image-wrapper img,
|
866 |
+
.cn-welcome-wrap form .cn-radio-image-wrapper img {
|
867 |
+
display: inline-block;
|
868 |
+
padding: 0.5em;
|
869 |
+
border: 2px solid #86868F;
|
870 |
+
border-radius: 3px;
|
871 |
+
box-sizing: content-box;
|
872 |
+
}
|
873 |
+
|
874 |
+
.cn-checkbox-image-wrapper .gdpr {
|
875 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC/ElEQVRoge2ZzZGjMBCFmcMet4rjHjlsANQmsGRgZ7BkMGRgZ7DOYMhgnME4A08GdgZ2AujbA41HiD8JEOawXUWVXUjd73WLVqsVBB4F+OlTv3cBciB7Ng4nAV6ADHjnSz6A7bOxPQQIh94Dd43AaSFodgKkFmNOGoHEYvwySw1IgJtFFHJgC6RD4GTJnedF2jQSAUfNqzfgMFFnAnxqOi9CvNc5UwzG1CWaQede03f1Bl6MhZqxz5l0Jot97BKBRH5nc3hLCETyO52qr1LqL4wjxWm5Akd/UMaJfOzdjpUs8xvYyXp8k//RcjA7Mf01MMVdE3IjyxyfvZyMLIVEIuoarGcZJhqOgY14bJITqO8VSd/AqobZy6T2UPUbi5RSH0op9EeW5igiguVAWZ50YxKvhRoZJ4MC/maCr56iKN5GEgi139EYHVailDpqYHMgKYpir5S6a5FIvQGYIuL9B3jjXapFYnUpOgiCIAC2mpcT872+lJ4Ab1hkqfQRuHslIB9wNHa+BYHrHAToOprKJuacJSgPLH+M1HmRtLkDdkqp95aU+tqb09tthcC5No/moeLcybKpMO5KmZbPydLON3HwzagSflQD9BIid/BI4gD2OpaA2DIbBan+8qC9sD5cOxD4FADZWAJir72kkAjE8sxN4FEGF0WRT4xAVtl1/X6sCQCZlpH6wDtHYHbpIFDVUskA+HUSUEqd9eKrB/xqCVQkNmb+X4SAy8fhmEYnEbDGJanKavDCBPoPWJSnsIvk2BvlAbr3RAaEssZPYx6blN2BK2obGFGX/bBf/EsLrm7SlL3J5k73ZMGmVS9MT5Qt8T0rulGhLHViyso3sZ20uvbif1kiKl5tuFSqI/WH+Gq78HUR4dytc7CRS86fLwo078YQQ5HFXKtLEOq3NMP53lVaNpPIcs4Fy0YB9S70LNdXpgGqjW5g3AvNlvgd+DUwb6vZmHT72aY8rtY+WgN4YI5+fh3cFPUNynqz8inUt//V7OpWAnwHNuZvH/IPPeDD9c6V9FUAAAAASUVORK5CYII=);
|
876 |
+
background-repeat: no-repeat;
|
877 |
+
background-position: center center;
|
878 |
+
}
|
879 |
+
|
880 |
+
.cn-checkbox-image-wrapper .ccpa {
|
881 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAACPElEQVRYheXYvXHbMBTAcY7AEbSA79Smskp30QiqkyLaQPQE8Qb2BtEG4QZil3Ry5ZZaAO/vAqANIwSJD1LmXXD3ToVE8sf3hEcQRVEUBXADfE+Mu2LOAVSkj/q/xj0sGVcvEgeUGTAvDlgBP4CD+Vyl4HaZuNa9WRH5JSK4oZT6CZQxuN+ZOBzYqQ9mxSkYmAuzcUqpyoE0InIUkWcng1UoLresWFlrOwCwczLa2EAispczWzvcxs5YzzXWDm4bistpwk1RfCypr2yppc3BVUvDXYAtsO7OsSRcbY5bAbfArYicrYu36Ob7Fj297wx8Ncf7JwewScGJSD3S00LjOJa9p0/E1SHlDQWm4rqmHI+LAKbgGsx/y23IMbiQVUos7g2G04yjcOYEObga2InIxQNrc3FjK2MvDtP7DOQYAIvGlcBzYub+WRKNwOJw5oRDvW8Ih4icImDxOHNiX3nHcF0GDwGwZJyvvCG4aZuwB9i31lsMbu/DAXsD9IZS6kEpVQ0FoQvPHlxfaU/jR15peGbuGf3mlhqHKYF95c0dj1MCY5ZV1wUy/uT4dOB2BtykwDmyNw0QOM6EyweS9547L/AKOID7VNwcLcUdf1Jxa3T27MjaDOoZL0m4AXRJ3uZ3Pg69p9fy/pxssVYW6GdxbrvJwjXoUnZh40oTFXrT53q4EXiNtYltkCkTaDoc71v734B9z/ex7WdSXHfxzcBvYsbfKXHlECwAd0H/JZ7MjX6ZDBcy0DPYBmyHbugVe8KbbhsHbZ0AAAAASUVORK5CYII=);
|
882 |
+
background-repeat: no-repeat;
|
883 |
+
background-position: center center;
|
884 |
+
}
|
885 |
+
|
886 |
+
.cn-welcome-wrap form .cn-plan-wrapper label > span {
|
887 |
+
margin-left: 2em;
|
888 |
+
}
|
889 |
+
|
890 |
+
.cn-welcome-wrap form .cn-plan-wrapper label {
|
891 |
+
position: relative;
|
892 |
+
display: block;
|
893 |
+
padding: 1.5em 1em;
|
894 |
+
box-sizing: content-box;
|
895 |
+
}
|
896 |
+
|
897 |
+
.cn-welcome-wrap form .cn-plan-overlay {
|
898 |
+
border: 1px solid #86868F;
|
899 |
+
width: 100%;
|
900 |
+
height: 100%;
|
901 |
+
border-radius: 3px;
|
902 |
+
position: absolute;
|
903 |
+
left: 0;
|
904 |
+
top: 0;
|
905 |
+
transition: border-color 0.2s;
|
906 |
+
z-index: 0;
|
907 |
+
background-color: rgba(32,193,158,0);
|
908 |
+
}
|
909 |
+
|
910 |
+
/*
|
911 |
+
.cn-welcome-wrap form .cn-plan-wrapper label input {
|
912 |
+
top: 50%;
|
913 |
+
margin: -8px 0 0;
|
914 |
+
width: 20px;
|
915 |
+
height: 20px;
|
916 |
+
}
|
917 |
+
|
918 |
+
.cn-welcome-wrap form .cn-plan-wrapper label input:checked::before {
|
919 |
+
width: 20px;
|
920 |
+
height: 20px;
|
921 |
+
line-height: 20px;
|
922 |
+
}
|
923 |
+
*/
|
924 |
+
|
925 |
+
.cn-welcome-wrap form .cn-plan-wrapper input:checked + span .cn-plan-overlay {
|
926 |
+
border-color: #20C19E;
|
927 |
+
background-color: rgba(32,193,158,.1);
|
928 |
+
}
|
929 |
+
|
930 |
+
.cn-welcome-wrap form .cn-plan-wrapper input:checked + span .cn-plan-description {
|
931 |
+
color: #fff;
|
932 |
+
}
|
933 |
+
|
934 |
+
.cn-welcome-wrap form .cn-plan-name {
|
935 |
+
display: block;
|
936 |
+
font-size: 1.1em;
|
937 |
+
font-weight: bold;
|
938 |
+
color: #fff;
|
939 |
+
}
|
940 |
+
|
941 |
+
.cn-welcome-wrap form .cn-plan-price {
|
942 |
+
display: inline-block;
|
943 |
+
font-size: 1.1em;
|
944 |
+
font-weight: bold;
|
945 |
+
color: #fff;
|
946 |
+
float: right;
|
947 |
+
}
|
948 |
+
|
949 |
+
.cn-welcome-wrap form .cn-price-off {
|
950 |
+
font-weight: bold;
|
951 |
+
color: #20C19E;
|
952 |
+
}
|
953 |
+
|
954 |
+
.cn-welcome-wrap form .cn-plan-period {
|
955 |
+
font-weight: normal;
|
956 |
+
}
|
957 |
+
|
958 |
+
.cn-welcome-wrap form input::placeholder,
|
959 |
+
.cn-welcome-wrap form select::placeholder {
|
960 |
+
color: #86868F;
|
961 |
+
}
|
962 |
+
|
963 |
+
.cn-welcome-wrap form input:focus,
|
964 |
+
.cn-welcome-wrap form select:focus {
|
965 |
+
border-color: #20C19E;
|
966 |
+
box-shadow: none;
|
967 |
+
}
|
968 |
+
|
969 |
+
.cn-welcome-wrap form select:focus {
|
970 |
+
color: #fff;
|
971 |
+
}
|
972 |
+
|
973 |
+
.cn-welcome-wrap form select:hover {
|
974 |
+
color: #fff;
|
975 |
+
}
|
976 |
+
|
977 |
+
.cn-welcome-wrap .cn-nav {
|
978 |
+
margin-top: 3em;
|
979 |
+
}
|
980 |
+
|
981 |
+
.cn-welcome-wrap form .cn-nav {
|
982 |
+
margin-top: 2.5em;
|
983 |
+
}
|
984 |
+
|
985 |
+
.cn-welcome-wrap .cn-nav .cn-btn {
|
986 |
+
margin: 0 0.25em;
|
987 |
+
}
|
988 |
+
|
989 |
+
.cn-welcome-wrap .cn-nav .cn-btn:first-child {
|
990 |
+
margin-left: 0;
|
991 |
+
}
|
992 |
+
|
993 |
+
.cn-welcome-wrap .cn-nav .cn-btn:last-child {
|
994 |
+
margin-right: 0;
|
995 |
+
}
|
996 |
+
|
997 |
+
.cn-welcome-wrap #cn_preview_frame {
|
998 |
+
width: 100%;
|
999 |
+
height: 200px;
|
1000 |
+
border: 1px solid #86868F;
|
1001 |
+
margin-top: 2.5em;
|
1002 |
+
box-shadow: 0 0 10px 0 rgba(0,0,0,.3);
|
1003 |
+
position: relative;
|
1004 |
+
overflow: hidden;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
.cn-welcome-wrap #cn_preview_frame img {
|
1008 |
+
width: 100%;
|
1009 |
+
height: auto;
|
1010 |
+
display: block;
|
1011 |
+
filter: blur(3px) grayscale(100%);
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
.cn-welcome-wrap #cn_preview_frame_wrapper {
|
1015 |
+
width: 400%;
|
1016 |
+
height: 400%;
|
1017 |
+
transform: scale(0.25) translate(-150%,-150%);
|
1018 |
+
pointer-events: none;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
.cn-welcome-wrap #cn_preview_frame_wrapper::after {
|
1022 |
+
content: '';
|
1023 |
+
display: block;
|
1024 |
+
width: 100%;
|
1025 |
+
height: 100%;
|
1026 |
+
background-color: rgba(0, 0, 0, 0);
|
1027 |
+
position: absolute;
|
1028 |
+
top: 0;
|
1029 |
+
left: 0;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
.cn-welcome-wrap #cn_preview_frame_wrapper iframe {
|
1033 |
+
width: 100%;
|
1034 |
+
height: 100%;
|
1035 |
+
filter: grayscale(100%);
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
.cn-welcome-wrap #cn_preview_about {
|
1039 |
+
margin-top: -1em;
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
.cn-welcome-wrap #cn_preview_about p {
|
1043 |
+
margin: 0;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
.cn-welcome-wrap #cn_preview_about p b {
|
1047 |
+
color: #fff;
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
.cn-comparison {
|
1051 |
+
width: 100%;
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
.cn-comparison tr:not(:last-child) {
|
1055 |
+
box-shadow: 0px 1px 1px rgba(255,255,255,.5);
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
.cn-comparison th,
|
1059 |
+
.cn-comparison td {
|
1060 |
+
padding: 1em;
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
.cn-comparison th {
|
1064 |
+
font-weight: bold;
|
1065 |
+
text-transform: uppercase;
|
1066 |
+
letter-spacing: 0.05em;
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
.cn-spinner {
|
1070 |
+
display: inline-block;
|
1071 |
+
width: 14px;
|
1072 |
+
height: 14px;
|
1073 |
+
max-width: 0;
|
1074 |
+
opacity: 0;
|
1075 |
+
transition: opacity 0.2s, max-width 0.3s;
|
1076 |
+
}
|
1077 |
+
.cn-spinner.spin {
|
1078 |
+
max-width: 14px;
|
1079 |
+
opacity: 1;
|
1080 |
+
margin-right: 10px;
|
1081 |
+
}
|
1082 |
+
.cn-spinner:after {
|
1083 |
+
content: '';
|
1084 |
+
display: block;
|
1085 |
+
width: 12px;
|
1086 |
+
height: 12px;
|
1087 |
+
border-radius: 50%;
|
1088 |
+
border: 2px solid #fff;
|
1089 |
+
border-color: #fff transparent #fff transparent;
|
1090 |
+
animation: cn-spin 0.8s linear infinite;
|
1091 |
+
}
|
1092 |
+
|
1093 |
+
@keyframes cn-spin {
|
1094 |
+
0% {
|
1095 |
+
transform: rotate(0deg);
|
1096 |
+
}
|
1097 |
+
100% {
|
1098 |
+
transform: rotate(360deg);
|
1099 |
+
}
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
@keyframes cn-fadeIn {
|
1103 |
+
from {
|
1104 |
+
opacity: 0;
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
to {
|
1108 |
+
opacity: 1;
|
1109 |
+
}
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
@keyframes cn-fadeOut {
|
1113 |
+
from {
|
1114 |
+
opacity: 1;
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
to {
|
1118 |
+
opacity: 0;
|
1119 |
+
}
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
@keyframes cn-slideIn {
|
1123 |
+
from {
|
1124 |
+
transform: translate3d(0, -100%, 0);
|
1125 |
+
visibility: visible;
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
to {
|
1129 |
+
transform: translate3d(0, 0, 0);
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
@keyframes slideOut {
|
1134 |
+
from {
|
1135 |
+
transform: translate3d(0, 0, 0);
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
to {
|
1139 |
+
visibility: hidden;
|
1140 |
+
transform: translate3d(0, -100%, 0);
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
.cn-sidebar.cn-theme-light {
|
1145 |
+
background: linear-gradient(-45deg, rgba(4,134,138,1), rgba(32,193,158,1));
|
1146 |
+
color: #fff;
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
.cn-sidebar.cn-theme-light a,
|
1150 |
+
.cn-sidebar.cn-theme-light em {
|
1151 |
+
color: #fff;
|
1152 |
+
text-decoration: underline;
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
.cn-sidebar.cn-theme-light a:hover,
|
1156 |
+
.cn-sidebar.cn-theme-light em:hover {
|
1157 |
+
text-decoration: none;
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
.cn-sidebar.cn-theme-light .cn-btn:not(.cn-skip-button) {
|
1161 |
+
border-color: #fff;
|
1162 |
+
background-color: #fff;
|
1163 |
+
color: #191e23;
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
.cn-sidebar.cn-theme-light .cn-btn:not(.cn-skip-button) .cn-spinner::after {
|
1167 |
+
border-color: #191e23 transparent #191e23 transparent;
|
1168 |
+
}
|
1169 |
+
|
1170 |
+
.cn-sidebar.cn-theme-light .cn-btn.cn-skip-button {
|
1171 |
+
color: rgba(255,255,255,0.5);
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
.cn-sidebar.cn-theme-light .cn-btn.cn-skip-button:hover {
|
1175 |
+
color: rgba(255,255,255,1);
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
.cn-sidebar.cn-theme-light #cn_iframe_preview {
|
1179 |
+
border-color: #fff;
|
1180 |
+
box-shadow: 0 0 10px 0 rgba(255,255,255,.3);
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
.cn-sidebar.cn-theme-light form input[type="text"],
|
1184 |
+
.cn-sidebar.cn-theme-light form input[type="password"],
|
1185 |
+
.cn-sidebar.cn-theme-light form input[type="checkbox"],
|
1186 |
+
.cn-sidebar.cn-theme-light form input[type="radio"],
|
1187 |
+
.cn-sidebar.cn-theme-light form select {
|
1188 |
+
border-color: #fff;
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
.cn-sidebar.cn-theme-light form .cn-checkbox-wrapper label,
|
1192 |
+
.cn-sidebar.cn-theme-light form .cn-radio-wrapper label {
|
1193 |
+
color: #fff;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
.cn-sidebar.cn-theme-light .cn-checkbox-image-wrapper input:checked + img,
|
1197 |
+
.cn-sidebar.cn-theme-light .cn-radio-image-wrapper input:checked + img {
|
1198 |
+
border-color: #fff;
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
.cn-sidebar.cn-theme-light form .cn-checkbox-image-wrapper img,
|
1202 |
+
.cn-sidebar.cn-theme-light form .cn-radio-image-wrapper img {
|
1203 |
+
border-color: rgba(255,255,255,0.2);
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
.cn-sidebar.cn-theme-light form .cn-radio-wrapper label input:checked::before {
|
1207 |
+
background-color: #fff;
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
.cn-sidebar.cn-theme-light form input::placeholder,
|
1211 |
+
.cn-sidebar.cn-theme-light form select::placeholder {
|
1212 |
+
color: rgba(255,255,255,0.7);
|
1213 |
+
}
|
1214 |
+
|
1215 |
+
.cn-sidebar.cn-theme-light form input:focus,
|
1216 |
+
.cn-sidebar.cn-theme-light form select:focus {
|
1217 |
+
border-color: #fff;
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
.cn-sidebar.cn-theme-light form .cn-plan-overlay {
|
1221 |
+
border-color: rgba(255,255,255,0.5);
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
.cn-sidebar.cn-theme-light form .cn-plan-wrapper input:checked + span .cn-plan-overlay {
|
1225 |
+
border-color: rgba(255,255,255,1);
|
1226 |
+
background-color: rgba(255,255,255,.2);
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
.cn-sidebar.cn-theme-light .cn-form-container {
|
1230 |
+
background: rgba(0,0,0,0.1);
|
1231 |
+
border: 1px solid rgba(255,255,255,.3);
|
1232 |
+
transition: border-color 0.2s;
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
.cn-sidebar.cn-theme-light .cn-form-container.cn-collapsed {
|
1236 |
+
border-color: rgba(255,255,255,0);
|
1237 |
+
}
|
1238 |
+
|
1239 |
+
.cn-accordion .cn-accordion-item {
|
1240 |
+
overflow: hidden;
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
.cn-accordion .cn-accordion-item:not(:last-child) {
|
1244 |
+
margin-bottom: 0.5em;
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
.cn-accordion .cn-accordion-item.cn-disabled {
|
1248 |
+
pointer-events: none;
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
.cn-accordion .cn-accordion-item.cn-collapsed .cn-accordion-button {
|
1252 |
+
color: rgba(255,255,255,.7);
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.cn-accordion .cn-accordion-item.cn-collapsed .cn-accordion-button:hover {
|
1256 |
+
color: #fff;
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
.cn-accordion .cn-accordion-button {
|
1260 |
+
text-align: left;
|
1261 |
+
font-size: 15px;
|
1262 |
+
font-style: normal;
|
1263 |
+
font-weight: bold;
|
1264 |
+
color: #fff;
|
1265 |
+
width: 100%;
|
1266 |
+
position: relative;
|
1267 |
+
border: none;
|
1268 |
+
outline: none;
|
1269 |
+
background: none;
|
1270 |
+
transition: all 0.2s;
|
1271 |
+
padding: 0;
|
1272 |
+
margin: 0;
|
1273 |
+
cursor: pointer;
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
.cn-accordion .cn-accordion-button:hover {
|
1277 |
+
color: #fff;
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
.cn-accordion .cn-accordion-button:after {
|
1281 |
+
font-family: dashicons;
|
1282 |
+
line-height: 1;
|
1283 |
+
font-weight: 400;
|
1284 |
+
font-style: normal;
|
1285 |
+
text-transform: none;
|
1286 |
+
text-rendering: auto;
|
1287 |
+
font-size: 18px;
|
1288 |
+
text-align: center;
|
1289 |
+
display: block;
|
1290 |
+
content: "\f347";
|
1291 |
+
position: absolute;
|
1292 |
+
top: 50%;
|
1293 |
+
margin-top: -9px;
|
1294 |
+
right: 0;
|
1295 |
+
line-height: 1;
|
1296 |
+
pointer-events: none;
|
1297 |
+
color: #fff;
|
1298 |
+
transform: rotate(180deg);
|
1299 |
+
transition: all 0.3s ease-in-out;
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
.cn-accordion .cn-collapsed .cn-accordion-button:after {
|
1303 |
+
transform: rotate(0);
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
.cn-accordion .cn-accordion-collapse {
|
1307 |
+
overflow-y: hidden;
|
1308 |
+
max-height: 500px; /* approximate max height */
|
1309 |
+
|
1310 |
+
transition-property: all;
|
1311 |
+
transition-duration: .3s;
|
1312 |
+
transition-timing-function: ease-in-out;
|
1313 |
+
}
|
1314 |
+
|
1315 |
+
.cn-accordion .cn-accordion-collapse.cn-form {
|
1316 |
+
margin-bottom: 1.5em;
|
1317 |
+
}
|
1318 |
+
|
1319 |
+
.cn-accordion .cn-collapsed .cn-accordion-collapse {
|
1320 |
+
max-height: 0;
|
1321 |
+
margin-bottom: 0;
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
#cn_card_number, #cn_expiration_date, #cn_cvv {
|
1325 |
+
background: transparent;
|
1326 |
+
border: 1px solid #86868F;
|
1327 |
+
border-radius: 3px;
|
1328 |
+
margin: 0;
|
1329 |
+
padding: 0 15px;
|
1330 |
+
color: #fff;
|
1331 |
+
transition: border-color 0.2s;
|
1332 |
+
height: 3em;
|
1333 |
+
box-shadow: none;
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
#cn_card_number.braintree-hosted-fields-focused, #cn_expiration_date.braintree-hosted-fields-focused, #cn_cvv.braintree-hosted-fields-focused {
|
1337 |
+
border-color: #20C19E;
|
1338 |
+
background-color: transparent;
|
1339 |
+
box-shadow: none;
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
#cn_card_number.braintree-hosted-fields-invalid, #cn_expiration_date.braintree-hosted-fields-invalid, #cn_cvv.braintree-hosted-fields-invalid {
|
1343 |
+
border-color: #DA2439;
|
1344 |
+
background-color: transparent;
|
1345 |
+
box-shadow: none;
|
1346 |
+
}
|
1347 |
+
|
1348 |
+
#cn_card_number.braintree-hosted-fields-valid {
|
1349 |
+
color: #fff;
|
1350 |
+
}
|
css/admin.css
CHANGED
@@ -9,12 +9,48 @@
|
|
9 |
}
|
10 |
|
11 |
.cookie-notice-credits .inner {
|
12 |
-
padding
|
13 |
-
padding-right: 1.33em;
|
14 |
}
|
15 |
|
16 |
-
.cookie-notice-credits .inner
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
.cookie-notice-credits h3 {
|
@@ -96,8 +132,48 @@
|
|
96 |
margin-top: 10px;
|
97 |
}
|
98 |
|
99 |
-
#
|
100 |
-
margin-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
#cn_colors_bar_opacity_range {
|
9 |
}
|
10 |
|
11 |
.cookie-notice-credits .inner {
|
12 |
+
padding: 1.33em;
|
|
|
13 |
}
|
14 |
|
15 |
+
.cookie-notice-credits .inner img {
|
16 |
+
max-width: 80%;
|
17 |
+
height: auto;
|
18 |
+
display: block;
|
19 |
+
margin: 20px auto;
|
20 |
+
}
|
21 |
+
|
22 |
+
.cookie-notice-settings .cookie-notice-credits h2 {
|
23 |
+
border: none;
|
24 |
+
padding-bottom: 0;
|
25 |
+
}
|
26 |
+
|
27 |
+
.cookie-notice-credits .inner {
|
28 |
+
text-align: center;
|
29 |
+
margin-bottom: 10px;
|
30 |
+
}
|
31 |
+
|
32 |
+
.cookie-notice-credits .cn-btn {
|
33 |
+
border-radius: 3em;
|
34 |
+
padding: 0.75em 2.5em;
|
35 |
+
box-shadow: none;
|
36 |
+
border: 2px solid #20C19E;
|
37 |
+
outline: none;
|
38 |
+
background: #20C19E;
|
39 |
+
font-size: 15px;
|
40 |
+
font-weight: bold;
|
41 |
+
color: #fff;
|
42 |
+
cursor: pointer;
|
43 |
+
display: inline-block;
|
44 |
+
text-decoration: none;
|
45 |
+
}
|
46 |
+
|
47 |
+
.cookie-notice-credits .cn-btn:hover,
|
48 |
+
.cookie-notice-credits .cn-btn:focus {
|
49 |
+
box-shadow: none;
|
50 |
+
border: 2px solid #20C19E;
|
51 |
+
background: #20C19E;
|
52 |
+
color: #fff;
|
53 |
+
text-decoration: none !important;
|
54 |
}
|
55 |
|
56 |
.cookie-notice-credits h3 {
|
132 |
margin-top: 10px;
|
133 |
}
|
134 |
|
135 |
+
#cn_app_status {
|
136 |
+
margin-bottom: 10px;
|
137 |
+
}
|
138 |
+
|
139 |
+
#cn_app_status label {
|
140 |
+
text-transform: uppercase;
|
141 |
+
font-weight: bold;
|
142 |
+
position: relative;
|
143 |
+
color: #999;
|
144 |
+
}
|
145 |
+
|
146 |
+
#cn_app_status label.cn-active {
|
147 |
+
color: green;
|
148 |
+
}
|
149 |
+
|
150 |
+
#cn_app_status label.cn-active:before {
|
151 |
+
background-color: green;
|
152 |
+
box-shadow: 0 0 0 2px green;
|
153 |
+
}
|
154 |
+
|
155 |
+
#cn_app_status label.cn-inactive {
|
156 |
+
color: red;
|
157 |
+
}
|
158 |
+
|
159 |
+
#cn_app_status label.cn-inactive:before {
|
160 |
+
background-color: red;
|
161 |
+
box-shadow: 0 0 0 2px red;
|
162 |
+
}
|
163 |
+
|
164 |
+
#cn_app_status label:before{
|
165 |
+
background-color: #999;
|
166 |
+
width: 10px;
|
167 |
+
height: 10px;
|
168 |
+
border-radius: 10px;
|
169 |
+
content: '';
|
170 |
+
display: inline-block;
|
171 |
+
vertical-align: middle;
|
172 |
+
margin-right: 10px;
|
173 |
+
box-shadow: 0 0 0 2px #999;
|
174 |
+
border: 2px solid #fff;
|
175 |
+
position: relative;
|
176 |
+
top: -2px;
|
177 |
}
|
178 |
|
179 |
#cn_colors_bar_opacity_range {
|
css/admin.min.css
CHANGED
@@ -1 +1,195 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Cookie Notice settings */
|
2 |
+
.cookie-notice-credits {
|
3 |
+
float: right;
|
4 |
+
width: 280px;
|
5 |
+
background: #fff;
|
6 |
+
margin: 20px -300px 20px 20px;
|
7 |
+
position: relative;
|
8 |
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
|
9 |
+
}
|
10 |
+
|
11 |
+
.cookie-notice-credits .inner {
|
12 |
+
padding: 1.33em;
|
13 |
+
}
|
14 |
+
|
15 |
+
.cookie-notice-credits .inner img {
|
16 |
+
max-width: 80%;
|
17 |
+
height: auto;
|
18 |
+
display: block;
|
19 |
+
margin: 20px auto;
|
20 |
+
}
|
21 |
+
|
22 |
+
.cookie-notice-settings .cookie-notice-credits h2 {
|
23 |
+
border: none;
|
24 |
+
padding-bottom: 0;
|
25 |
+
}
|
26 |
+
|
27 |
+
.cookie-notice-credits .inner {
|
28 |
+
text-align: center;
|
29 |
+
margin-bottom: 10px;
|
30 |
+
}
|
31 |
+
|
32 |
+
.cookie-notice-credits .cn-btn {
|
33 |
+
border-radius: 3em;
|
34 |
+
padding: 0.75em 2.5em;
|
35 |
+
box-shadow: none;
|
36 |
+
border: 2px solid #20C19E;
|
37 |
+
outline: none;
|
38 |
+
background: #20C19E;
|
39 |
+
font-size: 15px;
|
40 |
+
font-weight: bold;
|
41 |
+
color: #fff;
|
42 |
+
cursor: pointer;
|
43 |
+
display: inline-block;
|
44 |
+
text-decoration: none;
|
45 |
+
}
|
46 |
+
|
47 |
+
.cookie-notice-credits .cn-btn:hover,
|
48 |
+
.cookie-notice-credits .cn-btn:focus {
|
49 |
+
box-shadow: none;
|
50 |
+
border: 2px solid #20C19E;
|
51 |
+
background: #20C19E;
|
52 |
+
color: #fff;
|
53 |
+
text-decoration: none !important;
|
54 |
+
}
|
55 |
+
|
56 |
+
.cookie-notice-credits h3 {
|
57 |
+
font-size: 14px;
|
58 |
+
line-height: 1.4;
|
59 |
+
margin: 0;
|
60 |
+
padding: 0.66em 1.33em;;
|
61 |
+
border-bottom: 1px solid #eee;
|
62 |
+
}
|
63 |
+
|
64 |
+
.cookie-notice-settings .df-credits form {
|
65 |
+
min-width: 260px;
|
66 |
+
margin-bottom: 1em;
|
67 |
+
}
|
68 |
+
|
69 |
+
.cookie-notice-settings .df-credits form input {
|
70 |
+
margin: 0;
|
71 |
+
padding: 0;
|
72 |
+
}
|
73 |
+
|
74 |
+
.cookie-notice-settings {
|
75 |
+
margin-right: 300px;
|
76 |
+
}
|
77 |
+
|
78 |
+
.cookie-notice-settings hr, .df-credits hr {
|
79 |
+
border: solid #eee;
|
80 |
+
border-width: 1px 0 0;
|
81 |
+
clear: both;
|
82 |
+
height: 0;
|
83 |
+
}
|
84 |
+
|
85 |
+
.cookie-notice-settings h2 {
|
86 |
+
margin: 1.5em 0;
|
87 |
+
padding-bottom: 1em;
|
88 |
+
border-bottom: 1px solid #ccc;
|
89 |
+
}
|
90 |
+
|
91 |
+
.cookie-notice-settings form {
|
92 |
+
float: left;
|
93 |
+
min-width: 463px;
|
94 |
+
width: 100%;
|
95 |
+
}
|
96 |
+
|
97 |
+
.cookie-notice-settings .ui-button {
|
98 |
+
margin-bottom: 5px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.cookie-notice-settings .description {
|
102 |
+
font-size: 13px;
|
103 |
+
margin-bottom: 8px;
|
104 |
+
}
|
105 |
+
|
106 |
+
.cookie-notice-settings .description strong {
|
107 |
+
color: #444;
|
108 |
+
}
|
109 |
+
|
110 |
+
#cn_colors label {
|
111 |
+
min-width: 10em;
|
112 |
+
display: inline-block;
|
113 |
+
}
|
114 |
+
|
115 |
+
#cn_colors div {
|
116 |
+
vertical-align: middle;
|
117 |
+
}
|
118 |
+
|
119 |
+
#cn_refuse_code .nav-tab-wrapper {
|
120 |
+
padding-top: 0;
|
121 |
+
}
|
122 |
+
|
123 |
+
#cn_refuse_code .refuse-code-tab {
|
124 |
+
display: none;
|
125 |
+
}
|
126 |
+
|
127 |
+
#cn_refuse_code .refuse-code-tab.active {
|
128 |
+
display: block;
|
129 |
+
}
|
130 |
+
|
131 |
+
#cn_refuse_code .refuse-code-tab .description {
|
132 |
+
margin-top: 10px;
|
133 |
+
}
|
134 |
+
|
135 |
+
#cn_app_status {
|
136 |
+
margin-bottom: 10px;
|
137 |
+
}
|
138 |
+
|
139 |
+
#cn_app_status label {
|
140 |
+
text-transform: uppercase;
|
141 |
+
font-weight: bold;
|
142 |
+
position: relative;
|
143 |
+
color: #999;
|
144 |
+
}
|
145 |
+
|
146 |
+
#cn_app_status label.cn-active {
|
147 |
+
color: green;
|
148 |
+
}
|
149 |
+
|
150 |
+
#cn_app_status label.cn-active:before {
|
151 |
+
background-color: green;
|
152 |
+
box-shadow: 0 0 0 2px green;
|
153 |
+
}
|
154 |
+
|
155 |
+
#cn_app_status label.cn-inactive {
|
156 |
+
color: red;
|
157 |
+
}
|
158 |
+
|
159 |
+
#cn_app_status label.cn-inactive:before {
|
160 |
+
background-color: red;
|
161 |
+
box-shadow: 0 0 0 2px red;
|
162 |
+
}
|
163 |
+
|
164 |
+
#cn_app_status label:before{
|
165 |
+
background-color: #999;
|
166 |
+
width: 10px;
|
167 |
+
height: 10px;
|
168 |
+
border-radius: 10px;
|
169 |
+
content: '';
|
170 |
+
display: inline-block;
|
171 |
+
vertical-align: middle;
|
172 |
+
margin-right: 10px;
|
173 |
+
box-shadow: 0 0 0 2px #999;
|
174 |
+
border: 2px solid #fff;
|
175 |
+
position: relative;
|
176 |
+
top: -2px;
|
177 |
+
}
|
178 |
+
|
179 |
+
#cn_colors_bar_opacity_range {
|
180 |
+
vertical-align: middle;
|
181 |
+
margin-right: 10px;
|
182 |
+
}
|
183 |
+
|
184 |
+
/* All Mobile Sizes (devices and browser) */
|
185 |
+
@media only screen and (max-width: 959px) {
|
186 |
+
.cookie-notice-credits {
|
187 |
+
width: 100%;
|
188 |
+
float: none;
|
189 |
+
margin: 20px 0;
|
190 |
+
}
|
191 |
+
|
192 |
+
.cookie-notice-settings {
|
193 |
+
margin-right: 0;
|
194 |
+
}
|
195 |
+
}
|
css/front.css
CHANGED
@@ -154,7 +154,7 @@
|
|
154 |
|
155 |
.cn-button.bootstrap {
|
156 |
color: #fff;
|
157 |
-
background: #
|
158 |
}
|
159 |
|
160 |
.cn-button.bootstrap:hover {
|
154 |
|
155 |
.cn-button.bootstrap {
|
156 |
color: #fff;
|
157 |
+
background: #20C19E;
|
158 |
}
|
159 |
|
160 |
.cn-button.bootstrap:hover {
|
css/front.min.css
CHANGED
@@ -1 +1,377 @@
|
|
1 |
-
#cookie-notice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#cookie-notice {
|
2 |
+
position: fixed;
|
3 |
+
min-width: 100%;
|
4 |
+
height: auto;
|
5 |
+
z-index: 100000;
|
6 |
+
font-size: 13px;
|
7 |
+
letter-spacing: 0;
|
8 |
+
line-height: 20px;
|
9 |
+
left: 0;
|
10 |
+
text-align: center;
|
11 |
+
/* border-top: 2px solid #fbb03b; */
|
12 |
+
font-weight: normal;
|
13 |
+
font-family: -apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;
|
14 |
+
}
|
15 |
+
|
16 |
+
#cookie-notice,
|
17 |
+
#cookie-notice * {
|
18 |
+
-webkit-box-sizing: border-box;
|
19 |
+
-moz-box-sizing: border-box;
|
20 |
+
box-sizing: border-box;
|
21 |
+
}
|
22 |
+
|
23 |
+
#cookie-notice.cn-animated {
|
24 |
+
-webkit-animation-duration: 0.5s !important;
|
25 |
+
animation-duration: 0.5s !important;
|
26 |
+
-webkit-animation-fill-mode: both;
|
27 |
+
animation-fill-mode: both;
|
28 |
+
}
|
29 |
+
|
30 |
+
#cookie-notice.cn-animated.cn-effect-none {
|
31 |
+
-webkit-animation-duration: 0.001s !important;
|
32 |
+
animation-duration: 0.001s !important;
|
33 |
+
}
|
34 |
+
|
35 |
+
#cookie-notice .cookie-notice-container {
|
36 |
+
display: block;
|
37 |
+
}
|
38 |
+
|
39 |
+
#cookie-notice.cookie-notice-hidden .cookie-notice-container {
|
40 |
+
display: none;
|
41 |
+
}
|
42 |
+
|
43 |
+
#cookie-notice .cookie-revoke-container {
|
44 |
+
display: block;
|
45 |
+
}
|
46 |
+
|
47 |
+
#cookie-notice.cookie-revoke-hidden .cookie-revoke-container {
|
48 |
+
display: none;
|
49 |
+
}
|
50 |
+
|
51 |
+
.cn-position-top {
|
52 |
+
top: 0;
|
53 |
+
}
|
54 |
+
|
55 |
+
.cn-position-bottom {
|
56 |
+
bottom: 0;
|
57 |
+
}
|
58 |
+
|
59 |
+
.cookie-notice-container {
|
60 |
+
padding: 15px 30px;
|
61 |
+
text-align: center;
|
62 |
+
width: 100%;
|
63 |
+
z-index: 2;
|
64 |
+
}
|
65 |
+
|
66 |
+
.cookie-revoke-container {
|
67 |
+
padding: 15px 30px;
|
68 |
+
width: 100%;
|
69 |
+
z-index: 1;
|
70 |
+
}
|
71 |
+
|
72 |
+
.cn-close-icon {
|
73 |
+
position: absolute;
|
74 |
+
right: 15px;
|
75 |
+
top: 50%;
|
76 |
+
margin-top: -10px;
|
77 |
+
width: 15px;
|
78 |
+
height: 15px;
|
79 |
+
opacity: 0.5;
|
80 |
+
padding: 10px;
|
81 |
+
outline: none;
|
82 |
+
}
|
83 |
+
|
84 |
+
.cn-close-icon:hover {
|
85 |
+
opacity: 1;
|
86 |
+
}
|
87 |
+
.cn-close-icon:before,
|
88 |
+
.cn-close-icon:after {
|
89 |
+
position: absolute;
|
90 |
+
content: ' ';
|
91 |
+
height: 15px;
|
92 |
+
width: 2px;
|
93 |
+
top: 3px;
|
94 |
+
background-color: #fff;
|
95 |
+
}
|
96 |
+
.cn-close-icon:before {
|
97 |
+
transform: rotate(45deg);
|
98 |
+
}
|
99 |
+
.cn-close-icon:after {
|
100 |
+
transform: rotate(-45deg);
|
101 |
+
}
|
102 |
+
|
103 |
+
#cookie-notice .cn-revoke-cookie {
|
104 |
+
margin: 0;
|
105 |
+
}
|
106 |
+
|
107 |
+
#cookie-notice .cn-button {
|
108 |
+
margin: 0 0 0 10px;
|
109 |
+
border: none;
|
110 |
+
}
|
111 |
+
|
112 |
+
.cn-button {
|
113 |
+
font-family: -apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;
|
114 |
+
font-weight: normal;
|
115 |
+
font-size: 13px;
|
116 |
+
letter-spacing: 0.25px;
|
117 |
+
line-height: 20px;
|
118 |
+
margin: 0;
|
119 |
+
padding: 0;
|
120 |
+
text-align: center;
|
121 |
+
text-transform: none;
|
122 |
+
display: inline-block;
|
123 |
+
cursor: pointer;
|
124 |
+
touch-action: manipulation;
|
125 |
+
white-space: nowrap;
|
126 |
+
outline: none;
|
127 |
+
box-shadow: none;
|
128 |
+
text-shadow: none;
|
129 |
+
border: none;
|
130 |
+
-webkit-border-radius: 3px;
|
131 |
+
-moz-border-radius: 3px;
|
132 |
+
border-radius: 3px;
|
133 |
+
}
|
134 |
+
|
135 |
+
.cn-button:hover {
|
136 |
+
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.05);
|
137 |
+
text-decoration: none;
|
138 |
+
}
|
139 |
+
|
140 |
+
.cn-button.wp-default,
|
141 |
+
.cn-button.bootstrap {
|
142 |
+
text-decoration: none;
|
143 |
+
padding: 8.5px 10px;
|
144 |
+
line-height: 1;
|
145 |
+
}
|
146 |
+
|
147 |
+
.cn-button.wp-default {
|
148 |
+
color: #fff;
|
149 |
+
background: #fbb03b;
|
150 |
+
}
|
151 |
+
|
152 |
+
.cn-button.wp-default:hover {
|
153 |
+
}
|
154 |
+
|
155 |
+
.cn-button.bootstrap {
|
156 |
+
color: #fff;
|
157 |
+
background: #20C19E;
|
158 |
+
}
|
159 |
+
|
160 |
+
.cn-button.bootstrap:hover {
|
161 |
+
}
|
162 |
+
|
163 |
+
.cn-text-container {
|
164 |
+
margin: 0 0 6px 0;
|
165 |
+
}
|
166 |
+
|
167 |
+
.cn-text-container,
|
168 |
+
.cn-buttons-container {
|
169 |
+
display: inline-block;
|
170 |
+
}
|
171 |
+
|
172 |
+
#cookie-notice.cookie-notice-visible.cn-effect-none,
|
173 |
+
#cookie-notice.cookie-revoke-visible.cn-effect-none {
|
174 |
+
-webkit-animation-name: fadeIn;
|
175 |
+
animation-name: fadeIn;
|
176 |
+
}
|
177 |
+
|
178 |
+
#cookie-notice.cn-effect-none {
|
179 |
+
-webkit-animation-name: fadeOut;
|
180 |
+
animation-name: fadeOut;
|
181 |
+
}
|
182 |
+
|
183 |
+
#cookie-notice.cookie-notice-visible.cn-effect-fade,
|
184 |
+
#cookie-notice.cookie-revoke-visible.cn-effect-fade {
|
185 |
+
-webkit-animation-name: fadeIn;
|
186 |
+
animation-name: fadeIn;
|
187 |
+
}
|
188 |
+
|
189 |
+
#cookie-notice.cn-effect-fade {
|
190 |
+
-webkit-animation-name: fadeOut;
|
191 |
+
animation-name: fadeOut;
|
192 |
+
}
|
193 |
+
|
194 |
+
#cookie-notice.cookie-notice-visible.cn-effect-slide,
|
195 |
+
#cookie-notice.cookie-revoke-visible.cn-effect-slide{
|
196 |
+
-webkit-animation-name: slideInUp;
|
197 |
+
animation-name: slideInUp;
|
198 |
+
}
|
199 |
+
|
200 |
+
#cookie-notice.cn-effect-slide {
|
201 |
+
-webkit-animation-name: slideOutDown;
|
202 |
+
animation-name: slideOutDown;
|
203 |
+
}
|
204 |
+
|
205 |
+
#cookie-notice.cookie-notice-visible.cn-position-top.cn-effect-slide,
|
206 |
+
#cookie-notice.cookie-revoke-visible.cn-position-top.cn-effect-slide {
|
207 |
+
-webkit-animation-name: slideInDown;
|
208 |
+
animation-name: slideInDown;
|
209 |
+
}
|
210 |
+
|
211 |
+
#cookie-notice.cn-position-top.cn-effect-slide {
|
212 |
+
-webkit-animation-name: slideOutUp;
|
213 |
+
animation-name: slideOutUp;
|
214 |
+
}
|
215 |
+
|
216 |
+
@-webkit-keyframes fadeIn {
|
217 |
+
from {
|
218 |
+
opacity: 0;
|
219 |
+
}
|
220 |
+
|
221 |
+
to {
|
222 |
+
opacity: 1;
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
@keyframes fadeIn {
|
227 |
+
from {
|
228 |
+
opacity: 0;
|
229 |
+
}
|
230 |
+
|
231 |
+
to {
|
232 |
+
opacity: 1;
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
@-webkit-keyframes fadeOut {
|
237 |
+
from {
|
238 |
+
opacity: 1;
|
239 |
+
}
|
240 |
+
|
241 |
+
to {
|
242 |
+
opacity: 0;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
@keyframes fadeOut {
|
247 |
+
from {
|
248 |
+
opacity: 1;
|
249 |
+
}
|
250 |
+
|
251 |
+
to {
|
252 |
+
opacity: 0;
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
@-webkit-keyframes slideInUp {
|
257 |
+
from {
|
258 |
+
-webkit-transform: translate3d(0, 100%, 0);
|
259 |
+
transform: translate3d(0, 100%, 0);
|
260 |
+
visibility: visible;
|
261 |
+
}
|
262 |
+
|
263 |
+
to {
|
264 |
+
-webkit-transform: translate3d(0, 0, 0);
|
265 |
+
transform: translate3d(0, 0, 0);
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
@keyframes slideInUp {
|
270 |
+
from {
|
271 |
+
-webkit-transform: translate3d(0, 100%, 0);
|
272 |
+
transform: translate3d(0, 100%, 0);
|
273 |
+
visibility: visible;
|
274 |
+
}
|
275 |
+
|
276 |
+
to {
|
277 |
+
-webkit-transform: translate3d(0, 0, 0);
|
278 |
+
transform: translate3d(0, 0, 0);
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
@-webkit-keyframes slideOutDown {
|
283 |
+
from {
|
284 |
+
-webkit-transform: translate3d(0, 0, 0);
|
285 |
+
transform: translate3d(0, 0, 0);
|
286 |
+
}
|
287 |
+
|
288 |
+
to {
|
289 |
+
visibility: hidden;
|
290 |
+
-webkit-transform: translate3d(0, 100%, 0);
|
291 |
+
transform: translate3d(0, 100%, 0);
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
@keyframes slideOutDown {
|
296 |
+
from {
|
297 |
+
-webkit-transform: translate3d(0, 0, 0);
|
298 |
+
transform: translate3d(0, 0, 0);
|
299 |
+
}
|
300 |
+
|
301 |
+
to {
|
302 |
+
visibility: hidden;
|
303 |
+
-webkit-transform: translate3d(0, 100%, 0);
|
304 |
+
transform: translate3d(0, 100%, 0);
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
@-webkit-keyframes slideInDown {
|
309 |
+
from {
|
310 |
+
-webkit-transform: translate3d(0, -100%, 0);
|
311 |
+
transform: translate3d(0, -100%, 0);
|
312 |
+
visibility: visible;
|
313 |
+
}
|
314 |
+
|
315 |
+
to {
|
316 |
+
-webkit-transform: translate3d(0, 0, 0);
|
317 |
+
transform: translate3d(0, 0, 0);
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
@keyframes slideInDown {
|
322 |
+
from {
|
323 |
+
-webkit-transform: translate3d(0, -100%, 0);
|
324 |
+
transform: translate3d(0, -100%, 0);
|
325 |
+
visibility: visible;
|
326 |
+
}
|
327 |
+
|
328 |
+
to {
|
329 |
+
-webkit-transform: translate3d(0, 0, 0);
|
330 |
+
transform: translate3d(0, 0, 0);
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
@-webkit-keyframes slideOutUp {
|
335 |
+
from {
|
336 |
+
-webkit-transform: translate3d(0, 0, 0);
|
337 |
+
transform: translate3d(0, 0, 0);
|
338 |
+
}
|
339 |
+
|
340 |
+
to {
|
341 |
+
visibility: hidden;
|
342 |
+
-webkit-transform: translate3d(0, -100%, 0);
|
343 |
+
transform: translate3d(0, -100%, 0);
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
@keyframes slideOutUp {
|
348 |
+
from {
|
349 |
+
-webkit-transform: translate3d(0, 0, 0);
|
350 |
+
transform: translate3d(0, 0, 0);
|
351 |
+
}
|
352 |
+
|
353 |
+
to {
|
354 |
+
visibility: hidden;
|
355 |
+
-webkit-transform: translate3d(0, -100%, 0);
|
356 |
+
transform: translate3d(0, -100%, 0);
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
@media all and (max-width: 900px) {
|
361 |
+
.cookie-notice-container #cn-notice-text {
|
362 |
+
display: block;
|
363 |
+
}
|
364 |
+
.cookie-notice-container #cn-notice-buttons {
|
365 |
+
display: block;
|
366 |
+
}
|
367 |
+
#cookie-notice .cn-button {
|
368 |
+
margin: 0 5px 5px 5px;
|
369 |
+
}
|
370 |
+
}
|
371 |
+
|
372 |
+
@media all and (max-width: 480px) {
|
373 |
+
.cookie-notice-container,
|
374 |
+
.cookie-revoke-container {
|
375 |
+
padding: 15px 25px;
|
376 |
+
}
|
377 |
+
}
|
img/cookie-compliance-logo-dark.png
ADDED
Binary file
|
img/cookie-compliance-logo.png
ADDED
Binary file
|
img/cookie-notice-logo-dark.png
ADDED
Binary file
|
img/hu-logo.png
ADDED
Binary file
|
img/layout-bottom.png
ADDED
Binary file
|
img/layout-bottom.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 140 140" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g><rect x="8.75" y="8.732" width="122.5" height="122.5" style="fill:none;fill-rule:nonzero;stroke:#000;stroke-width:8.75px;"/><path d="M8.75,96.232l122.5,0" style="fill:none;fill-rule:nonzero;stroke:#000;stroke-width:8.75px;"/></g></svg>
|
img/layout-center.png
ADDED
Binary file
|
img/layout-center.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 140 140" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g><rect x="8.75" y="8.733" width="122.5" height="122.5" style="fill:none;fill-rule:nonzero;stroke:#000;stroke-width:8.75px;"/><rect x="39.375" y="39.349" width="61.25" height="61.268" style="fill:none;fill-rule:nonzero;stroke:#000;stroke-width:8.8px;"/></g></svg>
|
img/layout-left.png
ADDED
Binary file
|
img/layout-left.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" viewBox="0 0 140 140" width="140" height="140"><g transform="matrix(5.833333333333333,0,0,5.833333333333333,0,0)"><path d="M1.500 1.497 L22.500 1.497 L22.500 22.497 L1.500 22.497 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M7.5 1.497L7.5 22.497" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>
|
img/layout-right.png
ADDED
Binary file
|
img/layout-right.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 140 140" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g><rect x="8.75" y="8.733" width="122.5" height="122.5" style="fill:none;fill-rule:nonzero;stroke:#000;stroke-width:8.75px;"/><path d="M96.25,8.733l0,122.5" style="fill:none;fill-rule:nonzero;stroke:#000;stroke-width:8.75px;"/></g></svg>
|
img/layout-top.png
ADDED
Binary file
|
img/layout-top.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" viewBox="0 0 140 140" width="140" height="140"><g transform="matrix(5.833333333333333,0,0,5.833333333333333,0,0)"><path d="M1.500 1.497 L22.500 1.497 L22.500 22.497 L1.500 22.497 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M1.5 7.497L22.5 7.497" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>
|
img/screen-compliance.png
ADDED
Binary file
|
img/screen-dashboard.png
ADDED
Binary file
|
img/screen-notice.png
ADDED
Binary file
|
img/screen-plus.png
ADDED
Binary file
|
includes/bot-detect.php
ADDED
@@ -0,0 +1,969 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Cookie_Notice_Bot_Detect class.
|
8 |
+
*
|
9 |
+
* Based on CrawlerDetect php class adjusted to PHP 5.2
|
10 |
+
* https://github.com/JayBizzle/Crawler-Detect/blob/master/src/CrawlerDetect.php
|
11 |
+
*
|
12 |
+
* @since 2.0.0
|
13 |
+
* @class Cookie_Notice_Bot_Detect
|
14 |
+
*/
|
15 |
+
class Cookie_Notice_Bot_Detect {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The user agent.
|
19 |
+
*
|
20 |
+
* @var null
|
21 |
+
*/
|
22 |
+
protected $user_agent = null;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Headers that contain a user agent.
|
26 |
+
*
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
protected $http_headers = array();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Store regex matches.
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
protected $matches = array();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Crawlers object.
|
40 |
+
*
|
41 |
+
* @var object
|
42 |
+
*/
|
43 |
+
protected $crawlers = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Exclusions object.
|
47 |
+
*
|
48 |
+
* @var object
|
49 |
+
*/
|
50 |
+
protected $exclusions = array();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Headers object.
|
54 |
+
*
|
55 |
+
* @var object
|
56 |
+
*/
|
57 |
+
protected $ua_http_headers;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Class constructor.
|
61 |
+
*/
|
62 |
+
public function __construct() {
|
63 |
+
$this->crawlers = $this->get_crawlers_list();
|
64 |
+
$this->exclusions = $this->get_exclusions_list();
|
65 |
+
|
66 |
+
add_action( 'after_setup_theme', array( $this, 'init' ) );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Initialize class.
|
71 |
+
*/
|
72 |
+
public function init() {
|
73 |
+
// break on admin side
|
74 |
+
if ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )
|
75 |
+
return;
|
76 |
+
|
77 |
+
$this->ua_http_headers = $this->get_headers_list();
|
78 |
+
$this->set_http_headers();
|
79 |
+
$this->set_user_agent();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Set HTTP headers.
|
84 |
+
*
|
85 |
+
* @param array $http_headers
|
86 |
+
*/
|
87 |
+
public function set_http_headers( $http_headers = null ) {
|
88 |
+
// use global _SERVER if $http_headers aren't defined
|
89 |
+
if ( ! is_array( $http_headers ) || ! count( $http_headers ) ) {
|
90 |
+
$http_headers = $_SERVER;
|
91 |
+
}
|
92 |
+
// clear existing headers
|
93 |
+
$this->http_headers = array();
|
94 |
+
// only save HTTP headers - in PHP land, that means only _SERVER vars that start with HTTP_.
|
95 |
+
foreach ( $http_headers as $key => $value ) {
|
96 |
+
if ( substr( $key, 0, 5 ) === 'HTTP_' ) {
|
97 |
+
$this->http_headers[$key] = $value;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Return user agent headers.
|
104 |
+
*
|
105 |
+
* @return array
|
106 |
+
*/
|
107 |
+
public function get_ua_http_headers() {
|
108 |
+
return $this->ua_http_headers;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Return the user agent.
|
113 |
+
*
|
114 |
+
* @return string
|
115 |
+
*/
|
116 |
+
public function get_user_agent() {
|
117 |
+
return $this->user_agent;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Set the user agent.
|
122 |
+
*
|
123 |
+
* @param string $user_agent
|
124 |
+
*/
|
125 |
+
public function set_user_agent( $user_agent = null ) {
|
126 |
+
if ( false === empty( $user_agent ) ) {
|
127 |
+
return $this->user_agent = $user_agent;
|
128 |
+
} else {
|
129 |
+
$this->user_agent = null;
|
130 |
+
foreach ( $this->get_ua_http_headers() as $alt_header ) {
|
131 |
+
if ( false === empty( $this->http_headers[$alt_header] ) ) { // @todo: should use get_http_header(), but it would be slow.
|
132 |
+
$this->user_agent .= $this->http_headers[$alt_header] . ' ';
|
133 |
+
}
|
134 |
+
}
|
135 |
+
return $this->user_agent = ( ! empty( $this->user_agent ) ? trim( $this->user_agent ) : null);
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Build the user agent regex.
|
141 |
+
*
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function get_regex() {
|
145 |
+
return '(' . implode( '|', $this->crawlers ) . ')';
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Build the replacement regex.
|
150 |
+
*
|
151 |
+
* @return string
|
152 |
+
*/
|
153 |
+
public function get_exclusions() {
|
154 |
+
return '(' . implode( '|', $this->exclusions ) . ')';
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Check user agent string against the regex.
|
159 |
+
*
|
160 |
+
* @param string $user_agent
|
161 |
+
*
|
162 |
+
* @return bool
|
163 |
+
*/
|
164 |
+
public function is_crawler( $user_agent = null ) {
|
165 |
+
$agent = is_null( $user_agent ) ? $this->user_agent : $user_agent;
|
166 |
+
$agent = preg_replace( '/' . $this->get_exclusions() . '/i', '', $agent );
|
167 |
+
if ( strlen( trim( $agent ) ) == 0 ) {
|
168 |
+
return false;
|
169 |
+
} else {
|
170 |
+
$result = preg_match( '/' . $this->get_regex() . '/i', trim( $agent ), $matches );
|
171 |
+
}
|
172 |
+
if ( $matches ) {
|
173 |
+
$this->matches = $matches;
|
174 |
+
}
|
175 |
+
return (bool) $result;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Return the matches.
|
180 |
+
*
|
181 |
+
* @return string
|
182 |
+
*/
|
183 |
+
public function get_matches() {
|
184 |
+
return isset( $this->matches[0] ) ? $this->matches[0] : null;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Return the regular expressions to match against the user agent.
|
189 |
+
*
|
190 |
+
* @return array
|
191 |
+
*/
|
192 |
+
protected function get_crawlers_list() {
|
193 |
+
$data = array(
|
194 |
+
'.*Java.*outbrain',
|
195 |
+
'008\/',
|
196 |
+
'192.comAgent',
|
197 |
+
'2ip\.ru',
|
198 |
+
'404checker',
|
199 |
+
'^bluefish ',
|
200 |
+
'^FDM ',
|
201 |
+
'^Goose\/',
|
202 |
+
'^Java\/',
|
203 |
+
'^Mget',
|
204 |
+
'^NG\/[0-9\.]',
|
205 |
+
'^NING\/',
|
206 |
+
'^PHP\/[0-9]',
|
207 |
+
'^RMA\/',
|
208 |
+
'^Ruby|Ruby\/[0-9]',
|
209 |
+
'^scrutiny\/',
|
210 |
+
'^VSE\/[0-9]',
|
211 |
+
'^WordPress\.com',
|
212 |
+
'^XRL\/[0-9]',
|
213 |
+
'a3logics\.in',
|
214 |
+
'A6-Indexer',
|
215 |
+
'a\.pr-cy\.ru',
|
216 |
+
'Aboundex',
|
217 |
+
'aboutthedomain',
|
218 |
+
'Accoona-AI-Agent',
|
219 |
+
'acoon',
|
220 |
+
'acrylicapps\.com\/pulp',
|
221 |
+
'adbeat',
|
222 |
+
'AddThis',
|
223 |
+
'ADmantX',
|
224 |
+
'adressendeutschland',
|
225 |
+
'Advanced Email Extractor v',
|
226 |
+
'agentslug',
|
227 |
+
'AHC',
|
228 |
+
'aihit',
|
229 |
+
'aiohttp\/',
|
230 |
+
'Airmail',
|
231 |
+
'akula\/',
|
232 |
+
'alertra',
|
233 |
+
'alexa site audit',
|
234 |
+
'alyze\.info',
|
235 |
+
'amagit',
|
236 |
+
'AndroidDownloadManager',
|
237 |
+
'Anemone',
|
238 |
+
'Ant\.com',
|
239 |
+
'Anturis Agent',
|
240 |
+
'AnyEvent-HTTP\/',
|
241 |
+
'Apache-HttpClient\/',
|
242 |
+
'AportWorm\/[0-9]',
|
243 |
+
'AppEngine-Google',
|
244 |
+
'Arachmo',
|
245 |
+
'arachnode',
|
246 |
+
'Arachnophilia',
|
247 |
+
'archive-com',
|
248 |
+
'aria2',
|
249 |
+
'asafaweb.com',
|
250 |
+
'AskQuickly',
|
251 |
+
'Astute',
|
252 |
+
'autocite',
|
253 |
+
'Autonomy',
|
254 |
+
'B-l-i-t-z-B-O-T',
|
255 |
+
'Backlink-Ceck\.de',
|
256 |
+
'Bad-Neighborhood',
|
257 |
+
'baidu\.com',
|
258 |
+
'baypup\/[0-9]',
|
259 |
+
'baypup\/colbert',
|
260 |
+
'BazQux',
|
261 |
+
'BCKLINKS',
|
262 |
+
'BDFetch',
|
263 |
+
'BegunAdvertising\/',
|
264 |
+
'bibnum\.bnf',
|
265 |
+
'BigBozz',
|
266 |
+
'biglotron',
|
267 |
+
'BingLocalSearch',
|
268 |
+
'BingPreview',
|
269 |
+
'binlar',
|
270 |
+
'biz_Directory',
|
271 |
+
'Blackboard Safeassign',
|
272 |
+
'Bloglovin',
|
273 |
+
'BlogPulseLive',
|
274 |
+
'BlogSearch',
|
275 |
+
'Blogtrottr',
|
276 |
+
'boitho\.com-dc',
|
277 |
+
'BPImageWalker',
|
278 |
+
'Braintree-Webhooks',
|
279 |
+
'Branch Metrics API',
|
280 |
+
'Branch-Passthrough',
|
281 |
+
'Browsershots',
|
282 |
+
'BUbiNG',
|
283 |
+
'Butterfly\/',
|
284 |
+
'BuzzSumo',
|
285 |
+
'CakePHP',
|
286 |
+
'CapsuleChecker',
|
287 |
+
'CaretNail',
|
288 |
+
'cb crawl',
|
289 |
+
'CC Metadata Scaper',
|
290 |
+
'Cerberian Drtrs',
|
291 |
+
'CERT\.at-Statistics-Survey',
|
292 |
+
'cg-eye',
|
293 |
+
'changedetection',
|
294 |
+
'Charlotte',
|
295 |
+
'CheckHost',
|
296 |
+
'chkme\.com',
|
297 |
+
'CirrusExplorer\/',
|
298 |
+
'CISPA Vulnerability Notification',
|
299 |
+
'CJNetworkQuality',
|
300 |
+
'clips\.ua\.ac\.be',
|
301 |
+
'Cloud mapping experiment',
|
302 |
+
'CloudFlare-AlwaysOnline',
|
303 |
+
'Cloudinary\/[0-9]',
|
304 |
+
'cmcm\.com',
|
305 |
+
'coccoc',
|
306 |
+
'CommaFeed',
|
307 |
+
'Commons-HttpClient',
|
308 |
+
'Comodo SSL Checker',
|
309 |
+
'contactbigdatafr',
|
310 |
+
'convera',
|
311 |
+
'copyright sheriff',
|
312 |
+
'cosmos\/[0-9]',
|
313 |
+
'Covario-IDS',
|
314 |
+
'CrawlForMe\/[0-9]',
|
315 |
+
'cron-job\.org',
|
316 |
+
'Crowsnest',
|
317 |
+
'curb',
|
318 |
+
'Curious George',
|
319 |
+
'curl',
|
320 |
+
'cuwhois\/[0-9]',
|
321 |
+
'CyberPatrol',
|
322 |
+
'cybo\.com',
|
323 |
+
'DareBoost',
|
324 |
+
'DataparkSearch',
|
325 |
+
'dataprovider',
|
326 |
+
'Daum(oa)?[ \/][0-9]',
|
327 |
+
'DeuSu',
|
328 |
+
'developers\.google\.com\/\+\/web\/snippet\/',
|
329 |
+
'Digg',
|
330 |
+
'Dispatch\/',
|
331 |
+
'dlvr',
|
332 |
+
'DNS-Tools Header-Analyzer',
|
333 |
+
'DNSPod-reporting',
|
334 |
+
'docoloc',
|
335 |
+
'DomainAppender',
|
336 |
+
'dotSemantic',
|
337 |
+
'downforeveryoneorjustme',
|
338 |
+
'downnotifier\.com',
|
339 |
+
'DowntimeDetector',
|
340 |
+
'Dragonfly File Reader',
|
341 |
+
'drupact',
|
342 |
+
'Drupal (\+http:\/\/drupal\.org\/)',
|
343 |
+
'dubaiindex',
|
344 |
+
'EARTHCOM',
|
345 |
+
'Easy-Thumb',
|
346 |
+
'ec2linkfinder',
|
347 |
+
'eCairn-Grabber',
|
348 |
+
'ECCP',
|
349 |
+
'ElectricMonk',
|
350 |
+
'elefent',
|
351 |
+
'EMail Exractor',
|
352 |
+
'EmailWolf',
|
353 |
+
'Embed PHP Library',
|
354 |
+
'Embedly',
|
355 |
+
'europarchive\.org',
|
356 |
+
'evc-batch\/[0-9]',
|
357 |
+
'EventMachine HttpClient',
|
358 |
+
'Evidon',
|
359 |
+
'Evrinid',
|
360 |
+
'ExactSearch',
|
361 |
+
'ExaleadCloudview',
|
362 |
+
'Excel\/',
|
363 |
+
'Exploratodo',
|
364 |
+
'ezooms',
|
365 |
+
'facebookexternalhit',
|
366 |
+
'facebookplatform',
|
367 |
+
'fairshare',
|
368 |
+
'Faraday v',
|
369 |
+
'Faveeo',
|
370 |
+
'Favicon downloader',
|
371 |
+
'FavOrg',
|
372 |
+
'Feed Wrangler',
|
373 |
+
'Feedbin',
|
374 |
+
'FeedBooster',
|
375 |
+
'FeedBucket',
|
376 |
+
'FeedBurner',
|
377 |
+
'FeedChecker',
|
378 |
+
'Feedly',
|
379 |
+
'Feedspot',
|
380 |
+
'feeltiptop',
|
381 |
+
'Fetch API',
|
382 |
+
'Fetch\/[0-9]',
|
383 |
+
'Fever\/[0-9]',
|
384 |
+
'findlink',
|
385 |
+
'findthatfile',
|
386 |
+
'Flamingo_SearchEngine',
|
387 |
+
'FlipboardBrowserProxy',
|
388 |
+
'FlipboardProxy',
|
389 |
+
'FlipboardRSS',
|
390 |
+
'fluffy',
|
391 |
+
'flynxapp',
|
392 |
+
'forensiq',
|
393 |
+
'FoundSeoTool\/[0-9]',
|
394 |
+
'free thumbnails',
|
395 |
+
'FreeWebMonitoring SiteChecker',
|
396 |
+
'Funnelback',
|
397 |
+
'g00g1e\.net',
|
398 |
+
'GAChecker',
|
399 |
+
'geek-tools',
|
400 |
+
'Genderanalyzer',
|
401 |
+
'Genieo',
|
402 |
+
'GentleSource',
|
403 |
+
'GetLinkInfo',
|
404 |
+
'getprismatic\.com',
|
405 |
+
'GetURLInfo\/[0-9]',
|
406 |
+
'GigablastOpenSource',
|
407 |
+
'Go [\d\.]* package http',
|
408 |
+
'Go-http-client',
|
409 |
+
'GomezAgent',
|
410 |
+
'gooblog',
|
411 |
+
'Goodzer\/[0-9]',
|
412 |
+
'Google favicon',
|
413 |
+
'Google Keyword Suggestion',
|
414 |
+
'Google Keyword Tool',
|
415 |
+
'Google Page Speed Insights',
|
416 |
+
'Google PP Default',
|
417 |
+
'Google Search Console',
|
418 |
+
'Google Web Preview',
|
419 |
+
'Google-Adwords',
|
420 |
+
'Google-Apps-Script',
|
421 |
+
'Google-Calendar-Importer',
|
422 |
+
'Google-HTTP-Java-Client',
|
423 |
+
'Google-Publisher-Plugin',
|
424 |
+
'Google-SearchByImage',
|
425 |
+
'Google-Site-Verification',
|
426 |
+
'Google-Structured-Data-Testing-Tool',
|
427 |
+
'google_partner_monitoring',
|
428 |
+
'GoogleDocs',
|
429 |
+
'GoogleHC\/',
|
430 |
+
'GoogleProducer',
|
431 |
+
'GoScraper',
|
432 |
+
'GoSpotCheck',
|
433 |
+
'GoSquared-Status-Checker',
|
434 |
+
'gosquared-thumbnailer',
|
435 |
+
'GotSiteMonitor',
|
436 |
+
'Grammarly',
|
437 |
+
'grouphigh',
|
438 |
+
'grub-client',
|
439 |
+
'GTmetrix',
|
440 |
+
'Hatena',
|
441 |
+
'hawkReader',
|
442 |
+
'HEADMasterSEO',
|
443 |
+
'HeartRails_Capture',
|
444 |
+
'heritrix',
|
445 |
+
'hledejLevne\.cz\/[0-9]',
|
446 |
+
'Holmes',
|
447 |
+
'HootSuite Image proxy',
|
448 |
+
'Hootsuite-WebFeed\/[0-9]',
|
449 |
+
'HostTracker',
|
450 |
+
'ht:\/\/check',
|
451 |
+
'htdig',
|
452 |
+
'HTMLParser\/',
|
453 |
+
'HTTP-Header-Abfrage',
|
454 |
+
'http-kit',
|
455 |
+
'HTTP-Tiny',
|
456 |
+
'HTTP_Compression_Test',
|
457 |
+
'http_request2',
|
458 |
+
'http_requester',
|
459 |
+
'HttpComponents',
|
460 |
+
'httphr',
|
461 |
+
'HTTPMon',
|
462 |
+
'httpscheck',
|
463 |
+
'httpssites_power',
|
464 |
+
'httpunit',
|
465 |
+
'HttpUrlConnection',
|
466 |
+
'httrack',
|
467 |
+
'hosterstats',
|
468 |
+
'huaweisymantec',
|
469 |
+
'HubPages.*crawlingpolicy',
|
470 |
+
'HubSpot Connect',
|
471 |
+
'HubSpot Marketing Grader',
|
472 |
+
'HyperZbozi.cz Feeder',
|
473 |
+
'ichiro',
|
474 |
+
'IdeelaborPlagiaat',
|
475 |
+
'IDG Twitter Links Resolver',
|
476 |
+
'IDwhois\/[0-9]',
|
477 |
+
'Iframely',
|
478 |
+
'igdeSpyder',
|
479 |
+
'IlTrovatore',
|
480 |
+
'ImageEngine\/',
|
481 |
+
'Imagga',
|
482 |
+
'InAGist',
|
483 |
+
'inbound\.li parser',
|
484 |
+
'InDesign%20CC',
|
485 |
+
'infegy',
|
486 |
+
'infohelfer',
|
487 |
+
'InfoWizards Reciprocal Link System PRO',
|
488 |
+
'inpwrd\.com',
|
489 |
+
'Integrity',
|
490 |
+
'integromedb',
|
491 |
+
'internet_archive',
|
492 |
+
'InternetSeer',
|
493 |
+
'internetVista monitor',
|
494 |
+
'IODC',
|
495 |
+
'IOI',
|
496 |
+
'ips-agent',
|
497 |
+
'iqdb\/',
|
498 |
+
'Irokez',
|
499 |
+
'isitup\.org',
|
500 |
+
'iskanie',
|
501 |
+
'iZSearch',
|
502 |
+
'janforman',
|
503 |
+
'Jigsaw',
|
504 |
+
'Jobboerse',
|
505 |
+
'jobo',
|
506 |
+
'Jobrapido',
|
507 |
+
'KeepRight OpenStreetMap Checker',
|
508 |
+
'KimonoLabs\/',
|
509 |
+
'knows\.is',
|
510 |
+
'kouio',
|
511 |
+
'KrOWLer',
|
512 |
+
'kulturarw3',
|
513 |
+
'KumKie',
|
514 |
+
'L\.webis',
|
515 |
+
'Larbin',
|
516 |
+
'LayeredExtractor',
|
517 |
+
'LibVLC',
|
518 |
+
'libwww',
|
519 |
+
'link checker',
|
520 |
+
'Link Valet',
|
521 |
+
'link_thumbnailer',
|
522 |
+
'linkCheck',
|
523 |
+
'linkdex',
|
524 |
+
'LinkExaminer',
|
525 |
+
'linkfluence',
|
526 |
+
'linkpeek',
|
527 |
+
'LinkTiger',
|
528 |
+
'LinkWalker',
|
529 |
+
'Lipperhey',
|
530 |
+
'livedoor ScreenShot',
|
531 |
+
'LoadImpactPageAnalyzer',
|
532 |
+
'LoadImpactRload',
|
533 |
+
'LongURL API',
|
534 |
+
'looksystems\.net',
|
535 |
+
'ltx71',
|
536 |
+
'lwp-trivial',
|
537 |
+
'lycos',
|
538 |
+
'LYT\.SR',
|
539 |
+
'mabontland',
|
540 |
+
'MagpieRSS',
|
541 |
+
'Mail.Ru',
|
542 |
+
'MailChimp\.com',
|
543 |
+
'Mandrill',
|
544 |
+
'marketinggrader',
|
545 |
+
'Mediapartners-Google',
|
546 |
+
'MegaIndex\.ru',
|
547 |
+
'Melvil Rawi\/',
|
548 |
+
'MergeFlow-PageReader',
|
549 |
+
'MetaInspector',
|
550 |
+
'Metaspinner',
|
551 |
+
'MetaURI',
|
552 |
+
'Microsearch',
|
553 |
+
'Microsoft Office ',
|
554 |
+
'Microsoft Windows Network Diagnostics',
|
555 |
+
'Mindjet',
|
556 |
+
'Miniflux',
|
557 |
+
'Mnogosearch',
|
558 |
+
'mogimogi',
|
559 |
+
'Mojolicious (Perl)',
|
560 |
+
'monitis',
|
561 |
+
'Monitority\/[0-9]',
|
562 |
+
'montastic',
|
563 |
+
'MonTools',
|
564 |
+
'Moreover',
|
565 |
+
'Morning Paper',
|
566 |
+
'mowser',
|
567 |
+
'Mrcgiguy',
|
568 |
+
'mShots',
|
569 |
+
'MVAClient',
|
570 |
+
'nagios',
|
571 |
+
'Najdi\.si\/',
|
572 |
+
'NETCRAFT',
|
573 |
+
'NetLyzer FastProbe',
|
574 |
+
'netresearch',
|
575 |
+
'NetShelter ContentScan',
|
576 |
+
'NetTrack',
|
577 |
+
'Netvibes',
|
578 |
+
'Neustar WPM',
|
579 |
+
'NeutrinoAPI',
|
580 |
+
'NewsBlur .*Finder',
|
581 |
+
'NewsGator',
|
582 |
+
'newsme',
|
583 |
+
'newspaper\/',
|
584 |
+
'NG-Search',
|
585 |
+
'nineconnections\.com',
|
586 |
+
'NLNZ_IAHarvester',
|
587 |
+
'Nmap Scripting Engine',
|
588 |
+
'node-superagent',
|
589 |
+
'node\.io',
|
590 |
+
'nominet\.org\.uk',
|
591 |
+
'Norton-Safeweb',
|
592 |
+
'Notifixious',
|
593 |
+
'notifyninja',
|
594 |
+
'nuhk',
|
595 |
+
'nutch',
|
596 |
+
'Nuzzel',
|
597 |
+
'nWormFeedFinder',
|
598 |
+
'Nymesis',
|
599 |
+
'Ocelli\/[0-9]',
|
600 |
+
'oegp',
|
601 |
+
'okhttp',
|
602 |
+
'Omea Reader',
|
603 |
+
'omgili',
|
604 |
+
'Online Domain Tools',
|
605 |
+
'OpenCalaisSemanticProxy',
|
606 |
+
'Openstat\/',
|
607 |
+
'OpenVAS',
|
608 |
+
'Optimizer',
|
609 |
+
'Orbiter',
|
610 |
+
'OrgProbe\/[0-9]',
|
611 |
+
'ow\.ly',
|
612 |
+
'ownCloud News',
|
613 |
+
'Page Analyzer',
|
614 |
+
'Page Valet',
|
615 |
+
'page2rss',
|
616 |
+
'page_verifier',
|
617 |
+
'PagePeeker',
|
618 |
+
'Pagespeed\/[0-9]',
|
619 |
+
'Panopta',
|
620 |
+
'panscient',
|
621 |
+
'parsijoo',
|
622 |
+
'PayPal IPN',
|
623 |
+
'Pcore-HTTP',
|
624 |
+
'Pearltrees',
|
625 |
+
'peerindex',
|
626 |
+
'Peew',
|
627 |
+
'PhantomJS\/',
|
628 |
+
'Photon\/',
|
629 |
+
'phpcrawl',
|
630 |
+
'phpservermon',
|
631 |
+
'Pi-Monster',
|
632 |
+
'Pingdom\.com',
|
633 |
+
'Pingoscope',
|
634 |
+
'PingSpot',
|
635 |
+
'Pinterest',
|
636 |
+
'Pizilla',
|
637 |
+
'Ploetz \+ Zeller',
|
638 |
+
'Plukkie',
|
639 |
+
'PocketParser',
|
640 |
+
'Pompos',
|
641 |
+
'Porkbun',
|
642 |
+
'Port Monitor',
|
643 |
+
'postano',
|
644 |
+
'PostPost',
|
645 |
+
'postrank',
|
646 |
+
'PowerPoint\/',
|
647 |
+
'Priceonomics Analysis Engine',
|
648 |
+
'Prlog',
|
649 |
+
'probethenet',
|
650 |
+
'Project 25499',
|
651 |
+
'Promotion_Tools_www.searchenginepromotionhelp.com',
|
652 |
+
'prospectb2b',
|
653 |
+
'Protopage',
|
654 |
+
'proximic',
|
655 |
+
'PTST ',
|
656 |
+
'PTST\/[0-9]+',
|
657 |
+
'Pulsepoint XT3 web scraper',
|
658 |
+
'Python-httplib2',
|
659 |
+
'python-requests',
|
660 |
+
'Python-urllib',
|
661 |
+
'Qirina Hurdler',
|
662 |
+
'Qseero',
|
663 |
+
'Qualidator.com SiteAnalyzer',
|
664 |
+
'Quora Link Preview',
|
665 |
+
'Qwantify',
|
666 |
+
'Radian6',
|
667 |
+
'RankSonicSiteAuditor',
|
668 |
+
'Readability',
|
669 |
+
'RealPlayer%20Downloader',
|
670 |
+
'RebelMouse',
|
671 |
+
'redback\/',
|
672 |
+
'Redirect Checker Tool',
|
673 |
+
'ReederForMac',
|
674 |
+
'ResponseCodeTest\/[0-9]',
|
675 |
+
'RestSharp',
|
676 |
+
'RetrevoPageAnalyzer',
|
677 |
+
'Riddler',
|
678 |
+
'Rival IQ',
|
679 |
+
'Robosourcer',
|
680 |
+
'Robozilla\/[0-9]',
|
681 |
+
'ROI Hunter',
|
682 |
+
'SalesIntelligent',
|
683 |
+
'SauceNAO',
|
684 |
+
'SBIder',
|
685 |
+
'Scoop',
|
686 |
+
'scooter',
|
687 |
+
'ScoutJet',
|
688 |
+
'ScoutURLMonitor',
|
689 |
+
'Scrapy',
|
690 |
+
'Scrubby',
|
691 |
+
'SearchSight',
|
692 |
+
'semanticdiscovery',
|
693 |
+
'semanticjuice',
|
694 |
+
'SEO Browser',
|
695 |
+
'Seo Servis',
|
696 |
+
'seo-nastroj.cz',
|
697 |
+
'Seobility',
|
698 |
+
'SEOCentro',
|
699 |
+
'SeoCheck',
|
700 |
+
'SeopultContentAnalyzer',
|
701 |
+
'SEOstats',
|
702 |
+
'Server Density Service Monitoring',
|
703 |
+
'servernfo\.com',
|
704 |
+
'Seznam screenshot-generator',
|
705 |
+
'Shelob',
|
706 |
+
'Shoppimon Analyzer',
|
707 |
+
'ShoppimonAgent\/[0-9]',
|
708 |
+
'ShopWiki',
|
709 |
+
'ShortLinkTranslate',
|
710 |
+
'shrinktheweb',
|
711 |
+
'SilverReader',
|
712 |
+
'SimplePie',
|
713 |
+
'SimplyFast',
|
714 |
+
'Site-Shot\/',
|
715 |
+
'Site24x7',
|
716 |
+
'SiteBar',
|
717 |
+
'SiteCondor',
|
718 |
+
'siteexplorer\.info',
|
719 |
+
'SiteGuardian',
|
720 |
+
'Siteimprove\.com',
|
721 |
+
'Sitemap(s)? Generator',
|
722 |
+
'Siteshooter B0t',
|
723 |
+
'SiteTruth',
|
724 |
+
'sitexy\.com',
|
725 |
+
'SkypeUriPreview',
|
726 |
+
'slider\.com',
|
727 |
+
'slurp',
|
728 |
+
'SMRF URL Expander',
|
729 |
+
'Snappy',
|
730 |
+
'SniffRSS',
|
731 |
+
'sniptracker',
|
732 |
+
'Snoopy',
|
733 |
+
'sogou web',
|
734 |
+
'SortSite',
|
735 |
+
'spaziodati',
|
736 |
+
'Specificfeeds',
|
737 |
+
'speedy',
|
738 |
+
'SPEng',
|
739 |
+
'Spinn3r',
|
740 |
+
'spray-can',
|
741 |
+
'Sprinklr ',
|
742 |
+
'spyonweb',
|
743 |
+
'Sqworm',
|
744 |
+
'SSL Labs',
|
745 |
+
'StackRambler',
|
746 |
+
'Statastico\/',
|
747 |
+
'StatusCake',
|
748 |
+
'Stratagems Kumo',
|
749 |
+
'Stroke.cz',
|
750 |
+
'StudioFACA',
|
751 |
+
'suchen',
|
752 |
+
'summify',
|
753 |
+
'Super Monitoring',
|
754 |
+
'Surphace Scout',
|
755 |
+
'SwiteScraper',
|
756 |
+
'Symfony2 BrowserKit',
|
757 |
+
'Sysomos',
|
758 |
+
'T0PHackTeam',
|
759 |
+
'Tarantula\/',
|
760 |
+
'teoma',
|
761 |
+
'terrainformatica\.com',
|
762 |
+
'The Expert HTML Source Viewer',
|
763 |
+
'theinternetrules',
|
764 |
+
'theoldreader\.com',
|
765 |
+
'Thumbshots',
|
766 |
+
'ThumbSniper',
|
767 |
+
'TinEye',
|
768 |
+
'Tiny Tiny RSS',
|
769 |
+
'topster',
|
770 |
+
'touche.com',
|
771 |
+
'Traackr.com',
|
772 |
+
'truwoGPS',
|
773 |
+
'tweetedtimes\.com',
|
774 |
+
'Tweetminster',
|
775 |
+
'Twikle',
|
776 |
+
'Twingly',
|
777 |
+
'Typhoeus',
|
778 |
+
'ubermetrics-technologies',
|
779 |
+
'uclassify',
|
780 |
+
'UdmSearch',
|
781 |
+
'UnwindFetchor',
|
782 |
+
'updated',
|
783 |
+
'Upflow',
|
784 |
+
'URLChecker',
|
785 |
+
'URLitor.com',
|
786 |
+
'urlresolver',
|
787 |
+
'Urlstat',
|
788 |
+
'UrlTrends Ranking Updater',
|
789 |
+
'Vagabondo',
|
790 |
+
'via ggpht\.com GoogleImageProxy',
|
791 |
+
'visionutils',
|
792 |
+
'vkShare',
|
793 |
+
'voltron',
|
794 |
+
'Vortex\/[0-9]',
|
795 |
+
'voyager\/',
|
796 |
+
'VSAgent\/[0-9]',
|
797 |
+
'VSB-TUO\/[0-9]',
|
798 |
+
'VYU2',
|
799 |
+
'w3af\.org',
|
800 |
+
'W3C-checklink',
|
801 |
+
'W3C-mobileOK',
|
802 |
+
'W3C_I18n-Checker',
|
803 |
+
'W3C_Unicorn',
|
804 |
+
'wangling',
|
805 |
+
'Wappalyzer',
|
806 |
+
'WatchMouse',
|
807 |
+
'WbSrch\/',
|
808 |
+
'web-capture\.net',
|
809 |
+
'Web-Monitoring',
|
810 |
+
'Web-sniffer',
|
811 |
+
'Webauskunft',
|
812 |
+
'WebCapture',
|
813 |
+
'webcollage',
|
814 |
+
'WebCookies',
|
815 |
+
'WebCorp',
|
816 |
+
'WebDoc',
|
817 |
+
'WebFetch',
|
818 |
+
'WebImages',
|
819 |
+
'WebIndex',
|
820 |
+
'webkit2png',
|
821 |
+
'webmastercoffee',
|
822 |
+
'webmon ',
|
823 |
+
'webscreenie',
|
824 |
+
'Webshot',
|
825 |
+
'Website Analyzer\/',
|
826 |
+
'websitepulse[+ ]checker',
|
827 |
+
'Websnapr\/',
|
828 |
+
'Websquash\.com',
|
829 |
+
'Webthumb\/[0-9]',
|
830 |
+
'WebThumbnail',
|
831 |
+
'WeCrawlForThePeace',
|
832 |
+
'WeLikeLinks',
|
833 |
+
'WEPA',
|
834 |
+
'WeSEE',
|
835 |
+
'wf84',
|
836 |
+
'wget',
|
837 |
+
'WhatsApp',
|
838 |
+
'WhatsMyIP',
|
839 |
+
'WhatWeb',
|
840 |
+
'Whibse',
|
841 |
+
'Whynder Magnet',
|
842 |
+
'Windows-RSS-Platform',
|
843 |
+
'WinHttpRequest',
|
844 |
+
'wkhtmlto',
|
845 |
+
'wmtips',
|
846 |
+
'Woko',
|
847 |
+
'WomlpeFactory',
|
848 |
+
'Word\/',
|
849 |
+
'WordPress\/',
|
850 |
+
'wotbox',
|
851 |
+
'WP Engine Install Performance API',
|
852 |
+
'WPScan',
|
853 |
+
'wscheck',
|
854 |
+
'WWW-Mechanize',
|
855 |
+
'www\.monitor\.us',
|
856 |
+
'XaxisSemanticsClassifier',
|
857 |
+
'Xenu Link Sleuth',
|
858 |
+
'XING-contenttabreceiver\/[0-9]',
|
859 |
+
'XmlSitemapGenerator',
|
860 |
+
'xpymep([0-9]?)\.exe',
|
861 |
+
'Y!J-(ASR|BSC)',
|
862 |
+
'Yaanb',
|
863 |
+
'yacy',
|
864 |
+
'Yahoo Ad monitoring',
|
865 |
+
'Yahoo Link Preview',
|
866 |
+
'YahooCacheSystem',
|
867 |
+
'YahooSeeker',
|
868 |
+
'YahooYSMcm',
|
869 |
+
'YandeG',
|
870 |
+
'yandex',
|
871 |
+
'yanga',
|
872 |
+
'yeti',
|
873 |
+
'Yo-yo',
|
874 |
+
'Yoleo Consumer',
|
875 |
+
'yoogliFetchAgent',
|
876 |
+
'YottaaMonitor',
|
877 |
+
'yourls\.org',
|
878 |
+
'Zao',
|
879 |
+
'Zemanta Aggregator',
|
880 |
+
'Zend\\\\Http\\\\Client',
|
881 |
+
'Zend_Http_Client',
|
882 |
+
'zgrab',
|
883 |
+
'ZnajdzFoto',
|
884 |
+
'ZyBorg',
|
885 |
+
'[a-z0-9\-_]*((?<!cu)bot|crawler|archiver|transcoder|spider|uptime|validator|fetcher)',
|
886 |
+
);
|
887 |
+
|
888 |
+
return $data;
|
889 |
+
}
|
890 |
+
|
891 |
+
/**
|
892 |
+
* Return the list of strings to remove from the user agent before running the crawler regex.
|
893 |
+
*
|
894 |
+
* @return array
|
895 |
+
*/
|
896 |
+
public function get_exclusions_list() {
|
897 |
+
$data = array(
|
898 |
+
'Safari.[\d\.]*',
|
899 |
+
'Firefox.[\d\.]*',
|
900 |
+
'Chrome.[\d\.]*',
|
901 |
+
'Chromium.[\d\.]*',
|
902 |
+
'MSIE.[\d\.]',
|
903 |
+
'Opera\/[\d\.]*',
|
904 |
+
'Mozilla.[\d\.]*',
|
905 |
+
'AppleWebKit.[\d\.]*',
|
906 |
+
'Trident.[\d\.]*',
|
907 |
+
'Windows NT.[\d\.]*',
|
908 |
+
'Android [\d\.]*',
|
909 |
+
'Macintosh.',
|
910 |
+
'Ubuntu',
|
911 |
+
'Linux',
|
912 |
+
'[ ]Intel',
|
913 |
+
'Mac OS X [\d_]*',
|
914 |
+
'(like )?Gecko(.[\d\.]*)?',
|
915 |
+
'KHTML,',
|
916 |
+
'CriOS.[\d\.]*',
|
917 |
+
'CPU iPhone OS ([0-9_])* like Mac OS X',
|
918 |
+
'CPU OS ([0-9_])* like Mac OS X',
|
919 |
+
'iPod',
|
920 |
+
'compatible',
|
921 |
+
'x86_..',
|
922 |
+
'i686',
|
923 |
+
'x64',
|
924 |
+
'X11',
|
925 |
+
'rv:[\d\.]*',
|
926 |
+
'Version.[\d\.]*',
|
927 |
+
'WOW64',
|
928 |
+
'Win64',
|
929 |
+
'Dalvik.[\d\.]*',
|
930 |
+
' \.NET CLR [\d\.]*',
|
931 |
+
'Presto.[\d\.]*',
|
932 |
+
'Media Center PC',
|
933 |
+
'BlackBerry',
|
934 |
+
'Build',
|
935 |
+
'Opera Mini\/\d{1,2}\.\d{1,2}\.[\d\.]*\/\d{1,2}\.',
|
936 |
+
'Opera',
|
937 |
+
' \.NET[\d\.]*',
|
938 |
+
'\(|\)|;|,', // remove the following characters ( ) : ,
|
939 |
+
);
|
940 |
+
|
941 |
+
return $data;
|
942 |
+
}
|
943 |
+
|
944 |
+
/**
|
945 |
+
* Return all possible HTTP headers that represent the User-Agent string.
|
946 |
+
*
|
947 |
+
* @return array
|
948 |
+
*/
|
949 |
+
public function get_headers_list() {
|
950 |
+
$data = array(
|
951 |
+
// the default User-Agent string.
|
952 |
+
'HTTP_USER_AGENT',
|
953 |
+
// header can occur on devices using Opera Mini.
|
954 |
+
'HTTP_X_OPERAMINI_PHONE_UA',
|
955 |
+
// vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
|
956 |
+
'HTTP_X_DEVICE_USER_AGENT',
|
957 |
+
'HTTP_X_ORIGINAL_USER_AGENT',
|
958 |
+
'HTTP_X_SKYFIRE_PHONE',
|
959 |
+
'HTTP_X_BOLT_PHONE_UA',
|
960 |
+
'HTTP_DEVICE_STOCK_UA',
|
961 |
+
'HTTP_X_UCBROWSER_DEVICE_UA',
|
962 |
+
// sometimes, bots (especially Google) use a genuine user agent, but fill this header in with their email address
|
963 |
+
'HTTP_FROM',
|
964 |
+
);
|
965 |
+
|
966 |
+
return $data;
|
967 |
+
}
|
968 |
+
|
969 |
+
}
|
includes/frontend.php
ADDED
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Cookie_Notice_Frontend class.
|
8 |
+
*
|
9 |
+
* @class Cookie_Notice_Frontend
|
10 |
+
*/
|
11 |
+
class Cookie_Notice_Frontend {
|
12 |
+
private $widget_url = '';
|
13 |
+
private $is_bot = false;
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
// actions
|
17 |
+
add_action( 'init', array( $this, 'init' ) );
|
18 |
+
add_action( 'init', array( $this, 'add_cors_http_header' ) );
|
19 |
+
|
20 |
+
$this->widget_url = '//cdn.hu-manity.co/hu-banner.min.js';
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Init frontend.
|
25 |
+
*/
|
26 |
+
public function init() {
|
27 |
+
// check preview mode
|
28 |
+
$this->preview_mode = isset( $_GET['cn_preview_mode'] );
|
29 |
+
|
30 |
+
// whether to count robots
|
31 |
+
$this->is_bot = Cookie_Notice()->bot_detect->is_crawler();
|
32 |
+
|
33 |
+
// bail if in preview mode or it's a bot request
|
34 |
+
if ( ! $this->preview_mode && ! $this->is_bot ) {
|
35 |
+
// init cookie compliance
|
36 |
+
if ( ! empty( Cookie_Notice()->get_status() ) ) {
|
37 |
+
add_action( 'wp_head', array( $this, 'wp_head_scripts' ), 0 );
|
38 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_compliance_scripts' ) );
|
39 |
+
add_action( 'wp_ajax_cn_save_config', array( $this, 'ajax_save_config' ) );
|
40 |
+
add_action( 'wp_ajax_nopriv_cn_save_config', array( $this, 'ajax_save_config' ) );
|
41 |
+
// init cookie notice
|
42 |
+
} else {
|
43 |
+
// actions
|
44 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_notice_scripts' ) );
|
45 |
+
add_action( 'wp_head', array( $this, 'wp_print_header_scripts' ) );
|
46 |
+
add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
|
47 |
+
add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
|
48 |
+
// filters
|
49 |
+
add_filter( 'body_class', array( $this, 'change_body_class' ) );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Add CORS header for API requests and purge cache.
|
56 |
+
*/
|
57 |
+
public function add_cors_http_header() {
|
58 |
+
header( "Access-Control-Allow-Origin: https://app.hu-manity.co" );
|
59 |
+
header( 'Access-Control-Allow-Methods: GET' );
|
60 |
+
|
61 |
+
// purge cache
|
62 |
+
if ( isset( $_GET['hu_purge_cache'] ) ) {
|
63 |
+
$this->purge_cache();
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Run Cookie Compliance.
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
public function wp_head_scripts() {
|
73 |
+
// get site language
|
74 |
+
$locale = get_locale();
|
75 |
+
$locale_code = explode( '_', $locale );
|
76 |
+
|
77 |
+
$options = array(
|
78 |
+
'appID' => Cookie_Notice()->options['general']['app_id'],
|
79 |
+
'currentLanguage' => $locale_code[0]
|
80 |
+
);
|
81 |
+
|
82 |
+
$cached_config = get_transient( 'cookie_notice_compliance_cache' );
|
83 |
+
|
84 |
+
if ( ! empty( $cached_config ) && is_array( $cached_config ) ) {
|
85 |
+
$options = array_merge( $options, array(
|
86 |
+
'cache' => true,
|
87 |
+
'cacheType' => 'db',
|
88 |
+
'cacheData' => $cached_config
|
89 |
+
) );
|
90 |
+
}
|
91 |
+
|
92 |
+
// print_r( $options ); exit;
|
93 |
+
|
94 |
+
echo '
|
95 |
+
<!-- Hu Banner -->
|
96 |
+
<script type="text/javascript">
|
97 |
+
var huOptions = ' . json_encode( $options ) . ';
|
98 |
+
</script>
|
99 |
+
<script type="text/javascript" src="' . $this->widget_url . '"></script>';
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Load compliance scripts and styles - frontend.
|
104 |
+
*/
|
105 |
+
public function wp_enqueue_compliance_scripts() {
|
106 |
+
wp_enqueue_script(
|
107 |
+
'cookie-notice-compliance',
|
108 |
+
plugins_url( '../js/front-compliance.js', __FILE__ ),
|
109 |
+
array(),
|
110 |
+
Cookie_Notice()->defaults['version'],
|
111 |
+
isset( Cookie_Notice()->options['general']['script_placement'] ) && Cookie_Notice()->options['general']['script_placement'] === 'footer'
|
112 |
+
);
|
113 |
+
|
114 |
+
wp_localize_script(
|
115 |
+
'cookie-notice-compliance',
|
116 |
+
'cnComplianceArgs',
|
117 |
+
array(
|
118 |
+
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
119 |
+
'nonce' => wp_create_nonce( 'cn_save_config' ),
|
120 |
+
'secure' => (int) is_ssl()
|
121 |
+
)
|
122 |
+
);
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Cookie notice output.
|
127 |
+
*
|
128 |
+
* @return mixed
|
129 |
+
*/
|
130 |
+
public function add_cookie_notice() {
|
131 |
+
// WPML >= 3.2
|
132 |
+
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
133 |
+
Cookie_Notice()->options['general']['message_text'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['message_text'], 'Cookie Notice', 'Message in the notice' );
|
134 |
+
Cookie_Notice()->options['general']['accept_text'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['accept_text'], 'Cookie Notice', 'Button text' );
|
135 |
+
Cookie_Notice()->options['general']['refuse_text'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['refuse_text'], 'Cookie Notice', 'Refuse button text' );
|
136 |
+
Cookie_Notice()->options['general']['revoke_message_text'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['revoke_message_text'], 'Cookie Notice', 'Revoke message text' );
|
137 |
+
Cookie_Notice()->options['general']['revoke_text'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['revoke_text'], 'Cookie Notice', 'Revoke button text' );
|
138 |
+
Cookie_Notice()->options['general']['see_more_opt']['text'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['see_more_opt']['text'], 'Cookie Notice', 'Privacy policy text' );
|
139 |
+
Cookie_Notice()->options['general']['see_more_opt']['link'] = apply_filters( 'wpml_translate_single_string', Cookie_Notice()->options['general']['see_more_opt']['link'], 'Cookie Notice', 'Custom link' );
|
140 |
+
// WPML and Polylang compatibility
|
141 |
+
} elseif ( function_exists( 'icl_t' ) ) {
|
142 |
+
Cookie_Notice()->options['general']['message_text'] = icl_t( 'Cookie Notice', 'Message in the notice', Cookie_Notice()->options['general']['message_text'] );
|
143 |
+
Cookie_Notice()->options['general']['accept_text'] = icl_t( 'Cookie Notice', 'Button text', Cookie_Notice()->options['general']['accept_text'] );
|
144 |
+
Cookie_Notice()->options['general']['refuse_text'] = icl_t( 'Cookie Notice', 'Refuse button text', Cookie_Notice()->options['general']['refuse_text'] );
|
145 |
+
Cookie_Notice()->options['general']['revoke_message_text'] = icl_t( 'Cookie Notice', 'Revoke message text', Cookie_Notice()->options['general']['revoke_message_text'] );
|
146 |
+
Cookie_Notice()->options['general']['revoke_text'] = icl_t( 'Cookie Notice', 'Revoke button text', Cookie_Notice()->options['general']['revoke_text'] );
|
147 |
+
Cookie_Notice()->options['general']['see_more_opt']['text'] = icl_t( 'Cookie Notice', 'Privacy policy text', Cookie_Notice()->options['general']['see_more_opt']['text'] );
|
148 |
+
Cookie_Notice()->options['general']['see_more_opt']['link'] = icl_t( 'Cookie Notice', 'Custom link', Cookie_Notice()->options['general']['see_more_opt']['link'] );
|
149 |
+
}
|
150 |
+
|
151 |
+
if ( function_exists( 'icl_object_id' ) )
|
152 |
+
Cookie_Notice()->options['general']['see_more_opt']['id'] = icl_object_id( Cookie_Notice()->options['general']['see_more_opt']['id'], 'page', true );
|
153 |
+
|
154 |
+
// get cookie container args
|
155 |
+
$options = apply_filters( 'cn_cookie_notice_args', array(
|
156 |
+
'position' => Cookie_Notice()->options['general']['position'],
|
157 |
+
'css_style' => Cookie_Notice()->options['general']['css_style'],
|
158 |
+
'css_class' => Cookie_Notice()->options['general']['css_class'],
|
159 |
+
'button_class' => 'cn-button',
|
160 |
+
'colors' => Cookie_Notice()->options['general']['colors'],
|
161 |
+
'message_text' => Cookie_Notice()->options['general']['message_text'],
|
162 |
+
'accept_text' => Cookie_Notice()->options['general']['accept_text'],
|
163 |
+
'refuse_text' => Cookie_Notice()->options['general']['refuse_text'],
|
164 |
+
'revoke_message_text' => Cookie_Notice()->options['general']['revoke_message_text'],
|
165 |
+
'revoke_text' => Cookie_Notice()->options['general']['revoke_text'],
|
166 |
+
'refuse_opt' => Cookie_Notice()->options['general']['refuse_opt'],
|
167 |
+
'revoke_cookies' => Cookie_Notice()->options['general']['revoke_cookies'],
|
168 |
+
'see_more' => Cookie_Notice()->options['general']['see_more'],
|
169 |
+
'see_more_opt' => Cookie_Notice()->options['general']['see_more_opt'],
|
170 |
+
'link_target' => Cookie_Notice()->options['general']['link_target'],
|
171 |
+
'link_position' => Cookie_Notice()->options['general']['link_position'],
|
172 |
+
'aria_label' => __( 'Cookie Notice', 'cookie-notice' )
|
173 |
+
) );
|
174 |
+
|
175 |
+
// check legacy parameters
|
176 |
+
$options = Cookie_Notice()->check_legacy_params( $options, array( 'refuse_opt', 'see_more' ) );
|
177 |
+
|
178 |
+
if ( $options['see_more'] === true )
|
179 |
+
$options['message_text'] = do_shortcode( wp_kses_post( $options['message_text'] ) );
|
180 |
+
else
|
181 |
+
$options['message_text'] = wp_kses_post( $options['message_text'] );
|
182 |
+
|
183 |
+
$options['css_class'] = esc_attr( $options['css_class'] );
|
184 |
+
|
185 |
+
// message output
|
186 |
+
$output = '
|
187 |
+
<!-- Cookie Notice plugin v' . Cookie_Notice()->defaults['version'] . ' by Digital Factory https://dfactory.eu/ -->
|
188 |
+
<div id="cookie-notice" role="banner" class="cookie-notice-hidden cookie-revoke-hidden cn-position-' . $options['position'] . '" aria-label="' . $options['aria_label'] . '" style="background-color: rgba(' . implode( ',', Cookie_Notice()->hex2rgb( $options['colors']['bar'] ) ) . ',' . $options['colors']['bar_opacity'] * 0.01 . ');">'
|
189 |
+
. '<div class="cookie-notice-container" style="color: ' . $options['colors']['text'] . ';">'
|
190 |
+
. '<span id="cn-notice-text" class="cn-text-container">'. $options['message_text'] . '</span>'
|
191 |
+
. '<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_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" aria-label="' . $options['accept_text'] . '">' . $options['accept_text'] . '</a>'
|
192 |
+
. ( $options['refuse_opt'] === true ? '<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'] : '' ) . '" aria-label="' . $options['refuse_text'] . '">' . $options['refuse_text'] . '</a>' : '' )
|
193 |
+
. ( $options['see_more'] === true && $options['link_position'] === 'banner' ? '<a href="' . ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" aria-label="' . $options['see_more_opt']['text'] . '">' . $options['see_more_opt']['text'] . '</a>' : '' )
|
194 |
+
. '</span><a href="javascript:void(0);" id="cn-close-notice" data-cookie-set="accept" class="cn-close-icon" aria-label="' . $options['accept_text'] . '"></a>'
|
195 |
+
. '</div>
|
196 |
+
' . ( $options['refuse_opt'] === true && $options['revoke_cookies'] == true ?
|
197 |
+
'<div class="cookie-revoke-container" style="color: ' . $options['colors']['text'] . ';">'
|
198 |
+
. ( ! empty( $options['revoke_message_text'] ) ? '<span id="cn-revoke-text" class="cn-text-container">'. $options['revoke_message_text'] . '</span>' : '' )
|
199 |
+
. '<span id="cn-revoke-buttons" class="cn-buttons-container"><a href="#" class="cn-revoke-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" aria-label="' . $options['revoke_text'] . '">' . esc_html( $options['revoke_text'] ) . '</a></span>
|
200 |
+
</div>' : '' ) . '
|
201 |
+
</div>
|
202 |
+
<!-- / Cookie Notice plugin -->';
|
203 |
+
|
204 |
+
echo apply_filters( 'cn_cookie_notice_output', $output, $options );
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Load notice scripts and styles - frontend.
|
209 |
+
*/
|
210 |
+
public function wp_enqueue_notice_scripts() {
|
211 |
+
wp_enqueue_script( 'cookie-notice-front', plugins_url( '../js/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array(), Cookie_Notice()->defaults['version'], isset( Cookie_Notice()->options['general']['script_placement'] ) && Cookie_Notice()->options['general']['script_placement'] === 'footer' );
|
212 |
+
|
213 |
+
wp_localize_script(
|
214 |
+
'cookie-notice-front',
|
215 |
+
'cnArgs',
|
216 |
+
array(
|
217 |
+
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
218 |
+
'nonce' => wp_create_nonce( 'cn_save_cases' ),
|
219 |
+
'hideEffect' => Cookie_Notice()->options['general']['hide_effect'],
|
220 |
+
'position' => Cookie_Notice()->options['general']['position'],
|
221 |
+
'onScroll' => (int) Cookie_Notice()->options['general']['on_scroll'],
|
222 |
+
'onScrollOffset' => (int) Cookie_Notice()->options['general']['on_scroll_offset'],
|
223 |
+
'onClick' => (int) Cookie_Notice()->options['general']['on_click'],
|
224 |
+
'cookieName' => 'cookie_notice_accepted',
|
225 |
+
'cookieTime' => Cookie_Notice()->settings->times[Cookie_Notice()->options['general']['time']][1],
|
226 |
+
'cookieTimeRejected' => Cookie_Notice()->settings->times[Cookie_Notice()->options['general']['time_rejected']][1],
|
227 |
+
'cookiePath' => ( defined( 'COOKIEPATH' ) ? (string) COOKIEPATH : '' ),
|
228 |
+
'cookieDomain' => ( defined( 'COOKIE_DOMAIN' ) ? (string) COOKIE_DOMAIN : '' ),
|
229 |
+
'redirection' => (int) Cookie_Notice()->options['general']['redirection'],
|
230 |
+
'cache' => (int) ( defined( 'WP_CACHE' ) && WP_CACHE ),
|
231 |
+
'refuse' => (int) Cookie_Notice()->options['general']['refuse_opt'],
|
232 |
+
'revokeCookies' => (int) Cookie_Notice()->options['general']['revoke_cookies'],
|
233 |
+
'revokeCookiesOpt' => Cookie_Notice()->options['general']['revoke_cookies_opt'],
|
234 |
+
'secure' => (int) is_ssl()
|
235 |
+
)
|
236 |
+
);
|
237 |
+
|
238 |
+
wp_enqueue_style( 'cookie-notice-front', plugins_url( '../css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Print non functional JavaScript in body.
|
243 |
+
*
|
244 |
+
* @return mixed
|
245 |
+
*/
|
246 |
+
public function wp_print_footer_scripts() {
|
247 |
+
if ( Cookie_Notice()->cookies_accepted() ) {
|
248 |
+
$scripts = apply_filters( 'cn_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( Cookie_Notice()->options['general']['refuse_code'], Cookie_Notice()->get_allowed_html() ) ) ) );
|
249 |
+
|
250 |
+
if ( ! empty( $scripts ) )
|
251 |
+
echo $scripts;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Print non functional JavaScript in header.
|
257 |
+
*
|
258 |
+
* @return mixed
|
259 |
+
*/
|
260 |
+
public function wp_print_header_scripts() {
|
261 |
+
if ( Cookie_Notice()->cookies_accepted() ) {
|
262 |
+
$scripts = apply_filters( 'cn_refuse_code_scripts_html', html_entity_decode( trim( wp_kses( Cookie_Notice()->options['general']['refuse_code_head'], Cookie_Notice()->get_allowed_html() ) ) ) );
|
263 |
+
|
264 |
+
if ( ! empty( $scripts ) )
|
265 |
+
echo $scripts;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Add new body classes.
|
271 |
+
*
|
272 |
+
* @param array $classes Body classes
|
273 |
+
* @return array
|
274 |
+
*/
|
275 |
+
public function change_body_class( $classes ) {
|
276 |
+
if ( is_admin() )
|
277 |
+
return $classes;
|
278 |
+
|
279 |
+
if ( Cookie_Notice()->cookies_set() ) {
|
280 |
+
$classes[] = 'cookies-set';
|
281 |
+
|
282 |
+
if ( Cookie_Notice()->cookies_accepted() )
|
283 |
+
$classes[] = 'cookies-accepted';
|
284 |
+
else
|
285 |
+
$classes[] = 'cookies-refused';
|
286 |
+
} else
|
287 |
+
$classes[] = 'cookies-not-set';
|
288 |
+
|
289 |
+
return $classes;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Save compliance config caching.
|
294 |
+
*/
|
295 |
+
public function ajax_save_config() {
|
296 |
+
if ( ! empty( Cookie_Notice()->get_status() ) )
|
297 |
+
return;
|
298 |
+
|
299 |
+
if ( ! wp_verify_nonce( esc_attr( $_REQUEST['nonce'] ), 'cn_save_config' ) )
|
300 |
+
return;
|
301 |
+
|
302 |
+
$json_data = ! empty( $_REQUEST['data'] ) ? esc_attr( $_REQUEST['data'] ) : false;
|
303 |
+
$config_data = array();
|
304 |
+
|
305 |
+
if ( ! empty( $json_data ) )
|
306 |
+
$config_data = json_decode( stripslashes( html_entity_decode( $json_data ) ), true );
|
307 |
+
|
308 |
+
// save data
|
309 |
+
if ( $config_data && is_array( $config_data ) )
|
310 |
+
set_transient( 'cookie_notice_compliance_cache', $config_data, 24 * HOURS_IN_SECONDS );
|
311 |
+
|
312 |
+
return true;
|
313 |
+
exit;
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Purge config cache.
|
318 |
+
*/
|
319 |
+
public function purge_cache() {
|
320 |
+
delete_transient( 'cookie_notice_compliance_cache' );
|
321 |
+
}
|
322 |
+
}
|
includes/settings.php
ADDED
@@ -0,0 +1,1203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Cookie_Notice_Settings class.
|
8 |
+
*
|
9 |
+
* @class Cookie_Notice_Settings
|
10 |
+
*/
|
11 |
+
class Cookie_Notice_Settings {
|
12 |
+
private $app_login_url = '';
|
13 |
+
|
14 |
+
public $positions = array();
|
15 |
+
public $styles = array();
|
16 |
+
public $choices = array();
|
17 |
+
public $links = array();
|
18 |
+
public $link_targets = array();
|
19 |
+
public $link_positions = array();
|
20 |
+
public $colors = array();
|
21 |
+
public $options = array();
|
22 |
+
public $effects = array();
|
23 |
+
public $times = array();
|
24 |
+
public $notices = array();
|
25 |
+
public $script_placements = array();
|
26 |
+
public $countries = array();
|
27 |
+
public $cookie_messages = array();
|
28 |
+
public $preferences_messages = array();
|
29 |
+
|
30 |
+
public function __construct() {
|
31 |
+
// actions
|
32 |
+
add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
|
33 |
+
add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
|
34 |
+
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
35 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
36 |
+
add_action( 'wp_ajax_cn_purge_cache', array( $this, 'ajax_purge_cache' ) );
|
37 |
+
|
38 |
+
$this->app_login_url = 'https://app.hu-manity.co/#/en/cc2/login';
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Load plugin defaults
|
43 |
+
*/
|
44 |
+
public function load_defaults() {
|
45 |
+
$this->positions = array(
|
46 |
+
'top' => __( 'Top', 'cookie-notice' ),
|
47 |
+
'bottom' => __( 'Bottom', 'cookie-notice' )
|
48 |
+
);
|
49 |
+
|
50 |
+
$this->styles = array(
|
51 |
+
'none' => __( 'None', 'cookie-notice' ),
|
52 |
+
'wp-default' => __( 'Light', 'cookie-notice' ),
|
53 |
+
'bootstrap' => __( 'Dark', 'cookie-notice' )
|
54 |
+
);
|
55 |
+
|
56 |
+
$this->revoke_opts = array(
|
57 |
+
'automatic' => __( 'Automatic', 'cookie-notice' ),
|
58 |
+
'manual' => __( 'Manual', 'cookie-notice' )
|
59 |
+
);
|
60 |
+
|
61 |
+
$this->links = array(
|
62 |
+
'page' => __( 'Page link', 'cookie-notice' ),
|
63 |
+
'custom' => __( 'Custom link', 'cookie-notice' )
|
64 |
+
);
|
65 |
+
|
66 |
+
$this->link_targets = array(
|
67 |
+
'_blank',
|
68 |
+
'_self'
|
69 |
+
);
|
70 |
+
|
71 |
+
$this->link_positions = array(
|
72 |
+
'banner' => __( 'Banner', 'cookie-notice' ),
|
73 |
+
'message' => __( 'Message', 'cookie-notice' )
|
74 |
+
);
|
75 |
+
|
76 |
+
$this->colors = array(
|
77 |
+
'text' => __( 'Text color', 'cookie-notice' ),
|
78 |
+
'bar' => __( 'Bar color', 'cookie-notice' ),
|
79 |
+
);
|
80 |
+
|
81 |
+
$this->times = apply_filters(
|
82 |
+
'cn_cookie_expiry',
|
83 |
+
array(
|
84 |
+
'hour' => array( __( 'An hour', 'cookie-notice' ), 3600 ),
|
85 |
+
'day' => array( __( '1 day', 'cookie-notice' ), 86400 ),
|
86 |
+
'week' => array( __( '1 week', 'cookie-notice' ), 604800 ),
|
87 |
+
'month' => array( __( '1 month', 'cookie-notice' ), 2592000 ),
|
88 |
+
'3months' => array( __( '3 months', 'cookie-notice' ), 7862400 ),
|
89 |
+
'6months' => array( __( '6 months', 'cookie-notice' ), 15811200 ),
|
90 |
+
'year' => array( __( '1 year', 'cookie-notice' ), 31536000 ),
|
91 |
+
'infinity' => array( __( 'infinity', 'cookie-notice' ), 2147483647 )
|
92 |
+
)
|
93 |
+
);
|
94 |
+
|
95 |
+
$this->effects = array(
|
96 |
+
'none' => __( 'None', 'cookie-notice' ),
|
97 |
+
'fade' => __( 'Fade', 'cookie-notice' ),
|
98 |
+
'slide' => __( 'Slide', 'cookie-notice' )
|
99 |
+
);
|
100 |
+
|
101 |
+
$this->script_placements = array(
|
102 |
+
'header' => __( 'Header', 'cookie-notice' ),
|
103 |
+
'footer' => __( 'Footer', 'cookie-notice' ),
|
104 |
+
);
|
105 |
+
|
106 |
+
$this->cookie_messages = array(
|
107 |
+
0 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly.', 'cookie-notice' ),
|
108 |
+
1 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, and to personalize your browsing experience.', 'cookie-notice' ),
|
109 |
+
2 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, personalize your browsing experience, and analyze how you use our website. For these reasons, we may share your site usage data with our analytics partners.', 'cookie-notice' ),
|
110 |
+
3 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, personalize your browsing experience, analyze how you use our website, and deliver relevant ads to you. For these reasons, we may share your site usage data with our social media, advertising and analytics partners.', 'cookie-notice' ) );
|
111 |
+
|
112 |
+
$this->preferences_messages = array (
|
113 |
+
0 => __( 'You can choose whether or not you want to consent to our use of cookies through the options below.', 'cookie-notice' ),
|
114 |
+
1 => __( 'You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time.', 'cookie-notice' )
|
115 |
+
);
|
116 |
+
|
117 |
+
$this->countries = array(
|
118 |
+
'AF' => __( 'Afghanistan', 'events-maker' ),
|
119 |
+
'AX' => __( 'Åland Islands', 'events-maker' ),
|
120 |
+
'AL' => __( 'Albania', 'events-maker' ),
|
121 |
+
'DZ' => __( 'Algeria', 'events-maker' ),
|
122 |
+
'AD' => __( 'Andorra', 'events-maker' ),
|
123 |
+
'AO' => __( 'Angola', 'events-maker' ),
|
124 |
+
'AI' => __( 'Anguilla', 'events-maker' ),
|
125 |
+
'AQ' => __( 'Antarctica', 'events-maker' ),
|
126 |
+
'AG' => __( 'Antigua and Barbuda', 'events-maker' ),
|
127 |
+
'AR' => __( 'Argentina', 'events-maker' ),
|
128 |
+
'AM' => __( 'Armenia', 'events-maker' ),
|
129 |
+
'AW' => __( 'Aruba', 'events-maker' ),
|
130 |
+
'AU' => __( 'Australia', 'events-maker' ),
|
131 |
+
'AT' => __( 'Austria', 'events-maker' ),
|
132 |
+
'AZ' => __( 'Azerbaijan', 'events-maker' ),
|
133 |
+
'BS' => __( 'Bahamas', 'events-maker' ),
|
134 |
+
'BH' => __( 'Bahrain', 'events-maker' ),
|
135 |
+
'BD' => __( 'Bangladesh', 'events-maker' ),
|
136 |
+
'BB' => __( 'Barbados', 'events-maker' ),
|
137 |
+
'BY' => __( 'Belarus', 'events-maker' ),
|
138 |
+
'BE' => __( 'Belgium', 'events-maker' ),
|
139 |
+
'PW' => __( 'Belau', 'events-maker' ),
|
140 |
+
'BZ' => __( 'Belize', 'events-maker' ),
|
141 |
+
'BJ' => __( 'Benin', 'events-maker' ),
|
142 |
+
'BM' => __( 'Bermuda', 'events-maker' ),
|
143 |
+
'BT' => __( 'Bhutan', 'events-maker' ),
|
144 |
+
'BO' => __( 'Bolivia', 'events-maker' ),
|
145 |
+
'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'events-maker' ),
|
146 |
+
'BA' => __( 'Bosnia and Herzegovina', 'events-maker' ),
|
147 |
+
'BW' => __( 'Botswana', 'events-maker' ),
|
148 |
+
'BV' => __( 'Bouvet Island', 'events-maker' ),
|
149 |
+
'BR' => __( 'Brazil', 'events-maker' ),
|
150 |
+
'IO' => __( 'British Indian Ocean Territory', 'events-maker' ),
|
151 |
+
'VG' => __( 'British Virgin Islands', 'events-maker' ),
|
152 |
+
'BN' => __( 'Brunei', 'events-maker' ),
|
153 |
+
'BG' => __( 'Bulgaria', 'events-maker' ),
|
154 |
+
'BF' => __( 'Burkina Faso', 'events-maker' ),
|
155 |
+
'BI' => __( 'Burundi', 'events-maker' ),
|
156 |
+
'KH' => __( 'Cambodia', 'events-maker' ),
|
157 |
+
'CM' => __( 'Cameroon', 'events-maker' ),
|
158 |
+
'CA' => __( 'Canada', 'events-maker' ),
|
159 |
+
'CV' => __( 'Cape Verde', 'events-maker' ),
|
160 |
+
'KY' => __( 'Cayman Islands', 'events-maker' ),
|
161 |
+
'CF' => __( 'Central African Republic', 'events-maker' ),
|
162 |
+
'TD' => __( 'Chad', 'events-maker' ),
|
163 |
+
'CL' => __( 'Chile', 'events-maker' ),
|
164 |
+
'CN' => __( 'China', 'events-maker' ),
|
165 |
+
'CX' => __( 'Christmas Island', 'events-maker' ),
|
166 |
+
'CC' => __( 'Cocos (Keeling) Islands', 'events-maker' ),
|
167 |
+
'CO' => __( 'Colombia', 'events-maker' ),
|
168 |
+
'KM' => __( 'Comoros', 'events-maker' ),
|
169 |
+
'CG' => __( 'Congo (Brazzaville)', 'events-maker' ),
|
170 |
+
'CD' => __( 'Congo (Kinshasa)', 'events-maker' ),
|
171 |
+
'CK' => __( 'Cook Islands', 'events-maker' ),
|
172 |
+
'CR' => __( 'Costa Rica', 'events-maker' ),
|
173 |
+
'HR' => __( 'Croatia', 'events-maker' ),
|
174 |
+
'CU' => __( 'Cuba', 'events-maker' ),
|
175 |
+
'CW' => __( 'CuraÇao', 'events-maker' ),
|
176 |
+
'CY' => __( 'Cyprus', 'events-maker' ),
|
177 |
+
'CZ' => __( 'Czech Republic', 'events-maker' ),
|
178 |
+
'DK' => __( 'Denmark', 'events-maker' ),
|
179 |
+
'DJ' => __( 'Djibouti', 'events-maker' ),
|
180 |
+
'DM' => __( 'Dominica', 'events-maker' ),
|
181 |
+
'DO' => __( 'Dominican Republic', 'events-maker' ),
|
182 |
+
'EC' => __( 'Ecuador', 'events-maker' ),
|
183 |
+
'EG' => __( 'Egypt', 'events-maker' ),
|
184 |
+
'SV' => __( 'El Salvador', 'events-maker' ),
|
185 |
+
'GQ' => __( 'Equatorial Guinea', 'events-maker' ),
|
186 |
+
'ER' => __( 'Eritrea', 'events-maker' ),
|
187 |
+
'EE' => __( 'Estonia', 'events-maker' ),
|
188 |
+
'ET' => __( 'Ethiopia', 'events-maker' ),
|
189 |
+
'FK' => __( 'Falkland Islands', 'events-maker' ),
|
190 |
+
'FO' => __( 'Faroe Islands', 'events-maker' ),
|
191 |
+
'FJ' => __( 'Fiji', 'events-maker' ),
|
192 |
+
'FI' => __( 'Finland', 'events-maker' ),
|
193 |
+
'FR' => __( 'France', 'events-maker' ),
|
194 |
+
'GF' => __( 'French Guiana', 'events-maker' ),
|
195 |
+
'PF' => __( 'French Polynesia', 'events-maker' ),
|
196 |
+
'TF' => __( 'French Southern Territories', 'events-maker' ),
|
197 |
+
'GA' => __( 'Gabon', 'events-maker' ),
|
198 |
+
'GM' => __( 'Gambia', 'events-maker' ),
|
199 |
+
'GE' => __( 'Georgia', 'events-maker' ),
|
200 |
+
'DE' => __( 'Germany', 'events-maker' ),
|
201 |
+
'GH' => __( 'Ghana', 'events-maker' ),
|
202 |
+
'GI' => __( 'Gibraltar', 'events-maker' ),
|
203 |
+
'GR' => __( 'Greece', 'events-maker' ),
|
204 |
+
'GL' => __( 'Greenland', 'events-maker' ),
|
205 |
+
'GD' => __( 'Grenada', 'events-maker' ),
|
206 |
+
'GP' => __( 'Guadeloupe', 'events-maker' ),
|
207 |
+
'GT' => __( 'Guatemala', 'events-maker' ),
|
208 |
+
'GG' => __( 'Guernsey', 'events-maker' ),
|
209 |
+
'GN' => __( 'Guinea', 'events-maker' ),
|
210 |
+
'GW' => __( 'Guinea-Bissau', 'events-maker' ),
|
211 |
+
'GY' => __( 'Guyana', 'events-maker' ),
|
212 |
+
'HT' => __( 'Haiti', 'events-maker' ),
|
213 |
+
'HM' => __( 'Heard Island and McDonald Islands', 'events-maker' ),
|
214 |
+
'HN' => __( 'Honduras', 'events-maker' ),
|
215 |
+
'HK' => __( 'Hong Kong', 'events-maker' ),
|
216 |
+
'HU' => __( 'Hungary', 'events-maker' ),
|
217 |
+
'IS' => __( 'Iceland', 'events-maker' ),
|
218 |
+
'IN' => __( 'India', 'events-maker' ),
|
219 |
+
'ID' => __( 'Indonesia', 'events-maker' ),
|
220 |
+
'IR' => __( 'Iran', 'events-maker' ),
|
221 |
+
'IQ' => __( 'Iraq', 'events-maker' ),
|
222 |
+
'IE' => __( 'Republic of Ireland', 'events-maker' ),
|
223 |
+
'IM' => __( 'Isle of Man', 'events-maker' ),
|
224 |
+
'IL' => __( 'Israel', 'events-maker' ),
|
225 |
+
'IT' => __( 'Italy', 'events-maker' ),
|
226 |
+
'CI' => __( 'Ivory Coast', 'events-maker' ),
|
227 |
+
'JM' => __( 'Jamaica', 'events-maker' ),
|
228 |
+
'JP' => __( 'Japan', 'events-maker' ),
|
229 |
+
'JE' => __( 'Jersey', 'events-maker' ),
|
230 |
+
'JO' => __( 'Jordan', 'events-maker' ),
|
231 |
+
'KZ' => __( 'Kazakhstan', 'events-maker' ),
|
232 |
+
'KE' => __( 'Kenya', 'events-maker' ),
|
233 |
+
'KI' => __( 'Kiribati', 'events-maker' ),
|
234 |
+
'KW' => __( 'Kuwait', 'events-maker' ),
|
235 |
+
'KG' => __( 'Kyrgyzstan', 'events-maker' ),
|
236 |
+
'LA' => __( 'Laos', 'events-maker' ),
|
237 |
+
'LV' => __( 'Latvia', 'events-maker' ),
|
238 |
+
'LB' => __( 'Lebanon', 'events-maker' ),
|
239 |
+
'LS' => __( 'Lesotho', 'events-maker' ),
|
240 |
+
'LR' => __( 'Liberia', 'events-maker' ),
|
241 |
+
'LY' => __( 'Libya', 'events-maker' ),
|
242 |
+
'LI' => __( 'Liechtenstein', 'events-maker' ),
|
243 |
+
'LT' => __( 'Lithuania', 'events-maker' ),
|
244 |
+
'LU' => __( 'Luxembourg', 'events-maker' ),
|
245 |
+
'MO' => __( 'Macao S.A.R., China', 'events-maker' ),
|
246 |
+
'MK' => __( 'Macedonia', 'events-maker' ),
|
247 |
+
'MG' => __( 'Madagascar', 'events-maker' ),
|
248 |
+
'MW' => __( 'Malawi', 'events-maker' ),
|
249 |
+
'MY' => __( 'Malaysia', 'events-maker' ),
|
250 |
+
'MV' => __( 'Maldives', 'events-maker' ),
|
251 |
+
'ML' => __( 'Mali', 'events-maker' ),
|
252 |
+
'MT' => __( 'Malta', 'events-maker' ),
|
253 |
+
'MH' => __( 'Marshall Islands', 'events-maker' ),
|
254 |
+
'MQ' => __( 'Martinique', 'events-maker' ),
|
255 |
+
'MR' => __( 'Mauritania', 'events-maker' ),
|
256 |
+
'MU' => __( 'Mauritius', 'events-maker' ),
|
257 |
+
'YT' => __( 'Mayotte', 'events-maker' ),
|
258 |
+
'MX' => __( 'Mexico', 'events-maker' ),
|
259 |
+
'FM' => __( 'Micronesia', 'events-maker' ),
|
260 |
+
'MD' => __( 'Moldova', 'events-maker' ),
|
261 |
+
'MC' => __( 'Monaco', 'events-maker' ),
|
262 |
+
'MN' => __( 'Mongolia', 'events-maker' ),
|
263 |
+
'ME' => __( 'Montenegro', 'events-maker' ),
|
264 |
+
'MS' => __( 'Montserrat', 'events-maker' ),
|
265 |
+
'MA' => __( 'Morocco', 'events-maker' ),
|
266 |
+
'MZ' => __( 'Mozambique', 'events-maker' ),
|
267 |
+
'MM' => __( 'Myanmar', 'events-maker' ),
|
268 |
+
'NA' => __( 'Namibia', 'events-maker' ),
|
269 |
+
'NR' => __( 'Nauru', 'events-maker' ),
|
270 |
+
'NP' => __( 'Nepal', 'events-maker' ),
|
271 |
+
'NL' => __( 'Netherlands', 'events-maker' ),
|
272 |
+
'AN' => __( 'Netherlands Antilles', 'events-maker' ),
|
273 |
+
'NC' => __( 'New Caledonia', 'events-maker' ),
|
274 |
+
'NZ' => __( 'New Zealand', 'events-maker' ),
|
275 |
+
'NI' => __( 'Nicaragua', 'events-maker' ),
|
276 |
+
'NE' => __( 'Niger', 'events-maker' ),
|
277 |
+
'NG' => __( 'Nigeria', 'events-maker' ),
|
278 |
+
'NU' => __( 'Niue', 'events-maker' ),
|
279 |
+
'NF' => __( 'Norfolk Island', 'events-maker' ),
|
280 |
+
'KP' => __( 'North Korea', 'events-maker' ),
|
281 |
+
'NO' => __( 'Norway', 'events-maker' ),
|
282 |
+
'OM' => __( 'Oman', 'events-maker' ),
|
283 |
+
'PK' => __( 'Pakistan', 'events-maker' ),
|
284 |
+
'PS' => __( 'Palestinian Territory', 'events-maker' ),
|
285 |
+
'PA' => __( 'Panama', 'events-maker' ),
|
286 |
+
'PG' => __( 'Papua New Guinea', 'events-maker' ),
|
287 |
+
'PY' => __( 'Paraguay', 'events-maker' ),
|
288 |
+
'PE' => __( 'Peru', 'events-maker' ),
|
289 |
+
'PH' => __( 'Philippines', 'events-maker' ),
|
290 |
+
'PN' => __( 'Pitcairn', 'events-maker' ),
|
291 |
+
'PL' => __( 'Poland', 'events-maker' ),
|
292 |
+
'PT' => __( 'Portugal', 'events-maker' ),
|
293 |
+
'QA' => __( 'Qatar', 'events-maker' ),
|
294 |
+
'RE' => __( 'Reunion', 'events-maker' ),
|
295 |
+
'RO' => __( 'Romania', 'events-maker' ),
|
296 |
+
'RU' => __( 'Russia', 'events-maker' ),
|
297 |
+
'RW' => __( 'Rwanda', 'events-maker' ),
|
298 |
+
'BL' => __( 'Saint Barthélemy', 'events-maker' ),
|
299 |
+
'SH' => __( 'Saint Helena', 'events-maker' ),
|
300 |
+
'KN' => __( 'Saint Kitts and Nevis', 'events-maker' ),
|
301 |
+
'LC' => __( 'Saint Lucia', 'events-maker' ),
|
302 |
+
'MF' => __( 'Saint Martin (French part)', 'events-maker' ),
|
303 |
+
'SX' => __( 'Saint Martin (Dutch part)', 'events-maker' ),
|
304 |
+
'PM' => __( 'Saint Pierre and Miquelon', 'events-maker' ),
|
305 |
+
'VC' => __( 'Saint Vincent and the Grenadines', 'events-maker' ),
|
306 |
+
'SM' => __( 'San Marino', 'events-maker' ),
|
307 |
+
'ST' => __( 'São Tomé and Príncipe', 'events-maker' ),
|
308 |
+
'SA' => __( 'Saudi Arabia', 'events-maker' ),
|
309 |
+
'SN' => __( 'Senegal', 'events-maker' ),
|
310 |
+
'RS' => __( 'Serbia', 'events-maker' ),
|
311 |
+
'SC' => __( 'Seychelles', 'events-maker' ),
|
312 |
+
'SL' => __( 'Sierra Leone', 'events-maker' ),
|
313 |
+
'SG' => __( 'Singapore', 'events-maker' ),
|
314 |
+
'SK' => __( 'Slovakia', 'events-maker' ),
|
315 |
+
'SI' => __( 'Slovenia', 'events-maker' ),
|
316 |
+
'SB' => __( 'Solomon Islands', 'events-maker' ),
|
317 |
+
'SO' => __( 'Somalia', 'events-maker' ),
|
318 |
+
'ZA' => __( 'South Africa', 'events-maker' ),
|
319 |
+
'GS' => __( 'South Georgia/Sandwich Islands', 'events-maker' ),
|
320 |
+
'KR' => __( 'South Korea', 'events-maker' ),
|
321 |
+
'SS' => __( 'South Sudan', 'events-maker' ),
|
322 |
+
'ES' => __( 'Spain', 'events-maker' ),
|
323 |
+
'LK' => __( 'Sri Lanka', 'events-maker' ),
|
324 |
+
'SD' => __( 'Sudan', 'events-maker' ),
|
325 |
+
'SR' => __( 'Suriname', 'events-maker' ),
|
326 |
+
'SJ' => __( 'Svalbard and Jan Mayen', 'events-maker' ),
|
327 |
+
'SZ' => __( 'Swaziland', 'events-maker' ),
|
328 |
+
'SE' => __( 'Sweden', 'events-maker' ),
|
329 |
+
'CH' => __( 'Switzerland', 'events-maker' ),
|
330 |
+
'SY' => __( 'Syria', 'events-maker' ),
|
331 |
+
'TW' => __( 'Taiwan', 'events-maker' ),
|
332 |
+
'TJ' => __( 'Tajikistan', 'events-maker' ),
|
333 |
+
'TZ' => __( 'Tanzania', 'events-maker' ),
|
334 |
+
'TH' => __( 'Thailand', 'events-maker' ),
|
335 |
+
'TL' => __( 'Timor-Leste', 'events-maker' ),
|
336 |
+
'TG' => __( 'Togo', 'events-maker' ),
|
337 |
+
'TK' => __( 'Tokelau', 'events-maker' ),
|
338 |
+
'TO' => __( 'Tonga', 'events-maker' ),
|
339 |
+
'TT' => __( 'Trinidad and Tobago', 'events-maker' ),
|
340 |
+
'TN' => __( 'Tunisia', 'events-maker' ),
|
341 |
+
'TR' => __( 'Turkey', 'events-maker' ),
|
342 |
+
'TM' => __( 'Turkmenistan', 'events-maker' ),
|
343 |
+
'TC' => __( 'Turks and Caicos Islands', 'events-maker' ),
|
344 |
+
'TV' => __( 'Tuvalu', 'events-maker' ),
|
345 |
+
'UG' => __( 'Uganda', 'events-maker' ),
|
346 |
+
'UA' => __( 'Ukraine', 'events-maker' ),
|
347 |
+
'AE' => __( 'United Arab Emirates', 'events-maker' ),
|
348 |
+
'GB' => __( 'United Kingdom', 'events-maker' ),
|
349 |
+
'US' => __( 'United States', 'events-maker' ),
|
350 |
+
'UY' => __( 'Uruguay', 'events-maker' ),
|
351 |
+
'UZ' => __( 'Uzbekistan', 'events-maker' ),
|
352 |
+
'VU' => __( 'Vanuatu', 'events-maker' ),
|
353 |
+
'VA' => __( 'Vatican', 'events-maker' ),
|
354 |
+
'VE' => __( 'Venezuela', 'events-maker' ),
|
355 |
+
'VN' => __( 'Vietnam', 'events-maker' ),
|
356 |
+
'WF' => __( 'Wallis and Futuna', 'events-maker' ),
|
357 |
+
'EH' => __( 'Western Sahara', 'events-maker' ),
|
358 |
+
'WS' => __( 'Western Samoa', 'events-maker' ),
|
359 |
+
'YE' => __( 'Yemen', 'events-maker' ),
|
360 |
+
'ZM' => __( 'Zambia', 'events-maker' ),
|
361 |
+
'ZW' => __( 'Zimbabwe', 'events-maker' )
|
362 |
+
);
|
363 |
+
|
364 |
+
// set default text strings
|
365 |
+
Cookie_Notice()->defaults['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' );
|
366 |
+
Cookie_Notice()->defaults['general']['accept_text'] = __( 'Ok', 'cookie-notice' );
|
367 |
+
Cookie_Notice()->defaults['general']['refuse_text'] = __( 'No', 'cookie-notice' );
|
368 |
+
Cookie_Notice()->defaults['general']['revoke_message_text'] = __( 'You can revoke your consent any time using the Revoke consent button.', 'cookie-notice' );
|
369 |
+
Cookie_Notice()->defaults['general']['revoke_text'] = __( 'Revoke consent', 'cookie-notice' );
|
370 |
+
Cookie_Notice()->defaults['general']['see_more_opt']['text'] = __( 'Privacy policy', 'cookie-notice' );
|
371 |
+
|
372 |
+
// set translation strings on plugin activation
|
373 |
+
if ( Cookie_Notice()->options['general']['translate'] === true ) {
|
374 |
+
Cookie_Notice()->options['general']['translate'] = false;
|
375 |
+
|
376 |
+
Cookie_Notice()->options['general']['message_text'] = Cookie_Notice()->defaults['general']['message_text'];
|
377 |
+
Cookie_Notice()->options['general']['accept_text'] = Cookie_Notice()->defaults['general']['accept_text'];
|
378 |
+
Cookie_Notice()->options['general']['refuse_text'] = Cookie_Notice()->defaults['general']['refuse_text'];
|
379 |
+
Cookie_Notice()->options['general']['revoke_message_text'] = Cookie_Notice()->defaults['general']['revoke_message_text'];
|
380 |
+
Cookie_Notice()->options['general']['revoke_text'] = Cookie_Notice()->defaults['general']['revoke_text'];
|
381 |
+
Cookie_Notice()->options['general']['see_more_opt']['text'] = Cookie_Notice()->defaults['general']['see_more_opt']['text'];
|
382 |
+
|
383 |
+
update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
|
384 |
+
}
|
385 |
+
|
386 |
+
// WPML >= 3.2
|
387 |
+
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
388 |
+
$this->register_wpml_strings();
|
389 |
+
// WPML and Polylang compatibility
|
390 |
+
} elseif ( function_exists( 'icl_register_string' ) ) {
|
391 |
+
icl_register_string( 'Cookie Notice', 'Message in the notice', Cookie_Notice()->options['general']['message_text'] );
|
392 |
+
icl_register_string( 'Cookie Notice', 'Button text', Cookie_Notice()->options['general']['accept_text'] );
|
393 |
+
icl_register_string( 'Cookie Notice', 'Refuse button text', Cookie_Notice()->options['general']['refuse_text'] );
|
394 |
+
icl_register_string( 'Cookie Notice', 'Revoke message text', Cookie_Notice()->options['general']['revoke_message_text'] );
|
395 |
+
icl_register_string( 'Cookie Notice', 'Revoke button text', Cookie_Notice()->options['general']['revoke_text'] );
|
396 |
+
icl_register_string( 'Cookie Notice', 'Privacy policy text', Cookie_Notice()->options['general']['see_more_opt']['text'] );
|
397 |
+
icl_register_string( 'Cookie Notice', 'Custom link', Cookie_Notice()->options['general']['see_more_opt']['link'] );
|
398 |
+
}
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Add submenu.
|
403 |
+
*/
|
404 |
+
public function admin_menu_options() {
|
405 |
+
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' ) );
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Options page output.
|
410 |
+
*
|
411 |
+
* @return mixed
|
412 |
+
*/
|
413 |
+
public function options_page() {
|
414 |
+
echo '
|
415 |
+
<div class="wrap">
|
416 |
+
<h2>' . __( 'Cookie Notice & Compliance for GDPR/CCPA', 'cookie-notice' ) . '</h2>
|
417 |
+
<div class="cookie-notice-settings">
|
418 |
+
<div class="cookie-notice-credits">
|
419 |
+
<div class="inside">
|
420 |
+
<div class="inner">';
|
421 |
+
|
422 |
+
// compliance enabled
|
423 |
+
if ( ! empty( Cookie_Notice()->get_status() ) ) {
|
424 |
+
echo ' <h2>We\'re Promoting Privacy™</h2>
|
425 |
+
<p>' . __( 'Promote the privacy of your website visitors without affecting how you do your business.', 'cookie-notice' ) . '</p>';
|
426 |
+
} else {
|
427 |
+
echo ' <h1><b>' . __( 'Cookie Compliance™', 'cookie-notice' ) . '</b></h1>
|
428 |
+
<h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
|
429 |
+
<div class="cn-lead">
|
430 |
+
<p>' . __( 'An all new web application to help you deliver better consent experiences and comply with GDPR and CCPA more effectively.', 'cookie-notice' ) . '</p>
|
431 |
+
</div>
|
432 |
+
<img src="' . plugins_url( '../img/screen-dashboard.png', __FILE__ ) . '">
|
433 |
+
<a href="' . esc_url( admin_url( 'index.php?page=cookie-notice-welcome' ) ) . '" class="cn-btn">' . __( 'Upgrade', 'cookie-notice' ) . '</a>';
|
434 |
+
}
|
435 |
+
|
436 |
+
echo '
|
437 |
+
</div>
|
438 |
+
</div>
|
439 |
+
</div>
|
440 |
+
<form action="options.php" method="post">';
|
441 |
+
|
442 |
+
settings_fields( 'cookie_notice_options' );
|
443 |
+
do_settings_sections( 'cookie_notice_options' );
|
444 |
+
|
445 |
+
echo '
|
446 |
+
<p class="submit">';
|
447 |
+
submit_button( '', 'primary', 'save_cookie_notice_options', false );
|
448 |
+
echo ' ';
|
449 |
+
submit_button( __( 'Reset to defaults', 'cookie-notice' ), 'secondary', 'reset_cookie_notice_options', false );
|
450 |
+
echo '
|
451 |
+
</p>
|
452 |
+
</form>
|
453 |
+
</div>
|
454 |
+
<div class="clear"></div>
|
455 |
+
</div>';
|
456 |
+
}
|
457 |
+
|
458 |
+
/**
|
459 |
+
* Regiseter plugin settings.
|
460 |
+
*/
|
461 |
+
public function register_settings() {
|
462 |
+
register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) );
|
463 |
+
|
464 |
+
|
465 |
+
// compliance enabled
|
466 |
+
if ( ! empty( Cookie_Notice()->get_status() ) ) {
|
467 |
+
// configuration
|
468 |
+
add_settings_section( 'cookie_notice_compliance', __( 'Cookie Compliance Settings', 'cookie-notice' ), array( $this, 'cn_section_compliance' ), 'cookie_notice_options' );
|
469 |
+
add_settings_field( 'cn_app_status', __( 'Compliance status', 'cookie-notice' ), array( $this, 'cn_app_status' ), 'cookie_notice_options', 'cookie_notice_compliance' );
|
470 |
+
add_settings_field( 'cn_app_id', __( 'App ID', 'cookie-notice' ), array( $this, 'cn_app_id' ), 'cookie_notice_options', 'cookie_notice_compliance' );
|
471 |
+
add_settings_field( 'cn_app_key', __( 'App Key', 'cookie-notice' ), array( $this, 'cn_app_key' ), 'cookie_notice_options', 'cookie_notice_compliance' );
|
472 |
+
|
473 |
+
add_settings_section( 'cookie_notice_configuration', __( 'Miscellaneous Settings', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
|
474 |
+
add_settings_field( 'cn_app_purge_cache', __( 'Cache', 'cookie-notice' ), array( $this, 'cn_app_purge_cache' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
475 |
+
add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
476 |
+
add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
477 |
+
// compliance disabled
|
478 |
+
} else {
|
479 |
+
// configuration
|
480 |
+
add_settings_section( 'cookie_notice_compliance', __( 'Cookie Compliance Settings', 'cookie-notice' ), array( $this, 'cn_section_compliance' ), 'cookie_notice_options' );
|
481 |
+
add_settings_field( 'cn_app_status', __( 'Compliance status', 'cookie-notice' ), array( $this, 'cn_app_status' ), 'cookie_notice_options', 'cookie_notice_compliance' );
|
482 |
+
add_settings_field( 'cn_app_id', __( 'App ID', 'cookie-notice' ), array( $this, 'cn_app_id' ), 'cookie_notice_options', 'cookie_notice_compliance' );
|
483 |
+
add_settings_field( 'cn_app_key', __( 'App Key', 'cookie-notice' ), array( $this, 'cn_app_key' ), 'cookie_notice_options', 'cookie_notice_compliance' );
|
484 |
+
|
485 |
+
add_settings_section( 'cookie_notice_configuration', __( 'Cookie Notice Settings', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
|
486 |
+
add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
487 |
+
add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
488 |
+
add_settings_field( 'cn_see_more', __( 'Privacy policy', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
489 |
+
add_settings_field( 'cn_refuse_opt', __( 'Refuse consent', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
490 |
+
add_settings_field( 'cn_revoke_opt', __( 'Revoke consent', 'cookie-notice' ), array( $this, 'cn_revoke_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
491 |
+
add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
492 |
+
add_settings_field( 'cn_redirection', __( 'Reloading', 'cookie-notice' ), array( $this, 'cn_redirection' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
493 |
+
add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
494 |
+
add_settings_field( 'cn_on_click', __( 'On click', 'cookie-notice' ), array( $this, 'cn_on_click' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
495 |
+
add_settings_field( 'cn_time', __( 'Accepted expiry', 'cookie-notice' ), array( $this, 'cn_time' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
496 |
+
add_settings_field( 'cn_time_rejected', __( 'Rejected expiry', 'cookie-notice' ), array( $this, 'cn_time_rejected' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
497 |
+
add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
498 |
+
add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
|
499 |
+
|
500 |
+
// design
|
501 |
+
add_settings_section( 'cookie_notice_design', __( 'Cookie Notice Design', 'cookie-notice' ), array( $this, 'cn_section_design' ), 'cookie_notice_options' );
|
502 |
+
add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
|
503 |
+
add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
|
504 |
+
add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
|
505 |
+
add_settings_field( 'cn_css_class', __( 'Button class', 'cookie-notice' ), array( $this, 'cn_css_class' ), 'cookie_notice_options', 'cookie_notice_design' );
|
506 |
+
add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
|
507 |
+
}
|
508 |
+
}
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Section callback: fix for WP < 3.3
|
512 |
+
*/
|
513 |
+
public function cn_section_configuration() {}
|
514 |
+
public function cn_section_compliance() {}
|
515 |
+
public function cn_section_design() {}
|
516 |
+
|
517 |
+
/**
|
518 |
+
* Compliance status.
|
519 |
+
*/
|
520 |
+
public function cn_app_status() {
|
521 |
+
$app_status = Cookie_Notice()->get_status();
|
522 |
+
|
523 |
+
switch ( $app_status ) {
|
524 |
+
case 'active':
|
525 |
+
echo '
|
526 |
+
<fieldset>
|
527 |
+
<div id="cn_app_status">
|
528 |
+
<label class="cn-active">' . __( 'Active', 'cookie-notice' ) . '</label>
|
529 |
+
</div>
|
530 |
+
<div id="cn_app_actions">
|
531 |
+
<a href="' . $this->app_login_url . '" class="button button-primary button-hero" target="_blank">' . __( 'Log in & Configure', 'cookie-notice' ) . '</a>
|
532 |
+
<p class="description">' . __( 'Log into the Cookie Compliance™ web application and configure your Privacy Experience.', 'cookie-notice' ) . '</p>
|
533 |
+
</div>
|
534 |
+
</fieldset>';
|
535 |
+
break;
|
536 |
+
case 'pending':
|
537 |
+
echo '
|
538 |
+
<fieldset>
|
539 |
+
<div id="cn_app_status">
|
540 |
+
<label class="cn-pending">' . __( 'Pending', 'cookie-notice' ) . '</label>
|
541 |
+
</div>
|
542 |
+
<div id="cn_app_actions">
|
543 |
+
<a href="' . $this->app_login_url . '" class="button button-primary button-hero" target="_blank">' . __( 'Log in & Complete setup', 'cookie-notice' ) . '</a>
|
544 |
+
<p class="description">' . __( 'Log into the Cookie Compliance™ web application and complete the setup process.', 'cookie-notice' ) . '</p>
|
545 |
+
</div>
|
546 |
+
</fieldset>';
|
547 |
+
break;
|
548 |
+
default:
|
549 |
+
echo '
|
550 |
+
<fieldset>
|
551 |
+
<div id="cn_app_status">
|
552 |
+
<label class="cn-inactive">' . __( 'Inactive', 'cookie-notice' ) . '</label>
|
553 |
+
</div>
|
554 |
+
<div id="cn_app_actions">
|
555 |
+
<a href="' . admin_url( 'index.php?page=cookie-notice-welcome' ) . '" class="button button-primary button-hero">' . __( 'Add GDPR/CCPA Compliance', 'cookie-notice' ) . '</a>
|
556 |
+
<p class="description">' . __( 'Launch Cookie Compliance™ and add GDPR & CCPA compliance features.', 'cookie-notice' ) . '</p>
|
557 |
+
</div>
|
558 |
+
</fieldset>';
|
559 |
+
break;
|
560 |
+
}
|
561 |
+
}
|
562 |
+
|
563 |
+
/**
|
564 |
+
* App welcome.
|
565 |
+
*/
|
566 |
+
public function cn_app_id() {
|
567 |
+
echo '
|
568 |
+
<fieldset>
|
569 |
+
<div id="cn_app_id">
|
570 |
+
<input type="text" class="regular-text" name="cookie_notice_options[app_id]" value="' . esc_attr( Cookie_Notice()->options['general']['app_id'] ) . '" />
|
571 |
+
<p class="description">' . __( 'Enter your Cooking Compliance™ application ID.', 'cookie-notice' ) . '</p>
|
572 |
+
</div>
|
573 |
+
</fieldset>';
|
574 |
+
}
|
575 |
+
|
576 |
+
/**
|
577 |
+
* App ID option.
|
578 |
+
*/
|
579 |
+
public function cn_app_key() {
|
580 |
+
echo '
|
581 |
+
<div id="cn_app_key">
|
582 |
+
<input type="password" class="regular-text" name="cookie_notice_options[app_key]" value="' . esc_attr( Cookie_Notice()->options['general']['app_key'] ) . '" />
|
583 |
+
<p class="description">' . __( 'Enter your Cooking Compliance™ application secret key.', 'cookie-notice' ) . '</p>
|
584 |
+
</div>';
|
585 |
+
}
|
586 |
+
|
587 |
+
/**
|
588 |
+
* App ID option.
|
589 |
+
*/
|
590 |
+
public function cn_app_purge_cache() {
|
591 |
+
echo '
|
592 |
+
<div id="cn_app_purge_cache">
|
593 |
+
<div class="cn-button-container">
|
594 |
+
<a href="#" class="button button-secondary">' . __( 'Purge Cache', 'cookie-notice' ) . '</a>
|
595 |
+
</div>
|
596 |
+
<p class="description">' . __( 'Click the Purge Cache button to refresh the app configuration.', 'cookie-notice' ) . '</p>
|
597 |
+
</div>';
|
598 |
+
}
|
599 |
+
|
600 |
+
/**
|
601 |
+
* App Key option.
|
602 |
+
*/
|
603 |
+
public function cn_message_text() {
|
604 |
+
echo '
|
605 |
+
<div id="cn_message_text">
|
606 |
+
<textarea name="cookie_notice_options[message_text]" class="large-text" cols="50" rows="5">' . esc_textarea( Cookie_Notice()->options['general']['message_text'] ) . '</textarea>
|
607 |
+
<p class="description">' . __( 'Enter the cookie notice message.', 'cookie-notice' ) . '</p>
|
608 |
+
</div>';
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Accept cookie label option.
|
613 |
+
*/
|
614 |
+
public function cn_accept_text() {
|
615 |
+
echo '
|
616 |
+
<div id="cn_accept_text">
|
617 |
+
<input type="text" class="regular-text" name="cookie_notice_options[accept_text]" value="' . esc_attr( Cookie_Notice()->options['general']['accept_text'] ) . '" />
|
618 |
+
<p class="description">' . __( 'The text of the option to accept the notice and make it disappear.', 'cookie-notice' ) . '</p>
|
619 |
+
</div>';
|
620 |
+
}
|
621 |
+
|
622 |
+
/**
|
623 |
+
* Enable/Disable third party non functional cookies option.
|
624 |
+
*/
|
625 |
+
public function cn_refuse_opt() {
|
626 |
+
echo '
|
627 |
+
<fieldset>
|
628 |
+
<label><input id="cn_refuse_opt" type="checkbox" name="cookie_notice_options[refuse_opt]" value="1" ' . checked( true, Cookie_Notice()->options['general']['refuse_opt'], false ) . ' />' . __( 'Enable to give to the user the possibility to refuse third party non functional cookies.', 'cookie-notice' ) . '</label>
|
629 |
+
<div id="cn_refuse_opt_container"' . ( Cookie_Notice()->options['general']['refuse_opt'] === false ? ' style="display: none;"' : '' ) . '>
|
630 |
+
<div id="cn_refuse_text">
|
631 |
+
<input type="text" class="regular-text" name="cookie_notice_options[refuse_text]" value="' . esc_attr( Cookie_Notice()->options['general']['refuse_text'] ) . '" />
|
632 |
+
<p class="description">' . __( 'The text of the button to refuse the consent.', 'cookie-notice' ) . '</p>
|
633 |
+
</div>
|
634 |
+
</div>
|
635 |
+
</fieldset>';
|
636 |
+
}
|
637 |
+
|
638 |
+
/**
|
639 |
+
* Non functional cookies code.
|
640 |
+
*/
|
641 |
+
public function cn_refuse_code() {
|
642 |
+
$allowed_html = Cookie_Notice()->get_allowed_html();
|
643 |
+
$active = ! empty( Cookie_Notice()->options['general']['refuse_code'] ) && empty( Cookie_Notice()->options['general']['refuse_code_head'] ) ? 'body' : 'head';
|
644 |
+
|
645 |
+
echo '
|
646 |
+
<fieldset>
|
647 |
+
<div id="cn_refuse_code">
|
648 |
+
<div id="cn_refuse_code_fields">
|
649 |
+
<h2 class="nav-tab-wrapper">
|
650 |
+
<a id="refuse_head-tab" class="nav-tab' . ( $active === 'head' ? ' nav-tab-active' : '' ) . '" href="#refuse_head">' . __( 'Head', 'cookie-notice' ) . '</a>
|
651 |
+
<a id="refuse_body-tab" class="nav-tab' . ( $active === 'body' ? ' nav-tab-active' : '' ) . '" href="#refuse_body">' . __( 'Body', 'cookie-notice' ) . '</a>
|
652 |
+
</h2>
|
653 |
+
<div id="refuse_head" class="refuse-code-tab' . ( $active === 'head' ? ' active' : '' ) . '">
|
654 |
+
<p class="description">' . __( 'The code to be used in your site header, before the closing head tag.', 'cookie-notice' ) . '</p>
|
655 |
+
<textarea name="cookie_notice_options[refuse_code_head]" class="large-text" cols="50" rows="8">' . html_entity_decode( trim( wp_kses( Cookie_Notice()->options['general']['refuse_code_head'], $allowed_html ) ) ) . '</textarea>
|
656 |
+
</div>
|
657 |
+
<div id="refuse_body" class="refuse-code-tab' . ( $active === 'body' ? ' active' : '' ) . '">
|
658 |
+
<p class="description">' . __( 'The code to be used in your site footer, before the closing body tag.', 'cookie-notice' ) . '</p>
|
659 |
+
<textarea name="cookie_notice_options[refuse_code]" class="large-text" cols="50" rows="8">' . html_entity_decode( trim( wp_kses( Cookie_Notice()->options['general']['refuse_code'], $allowed_html ) ) ) . '</textarea>
|
660 |
+
</div>
|
661 |
+
</div>
|
662 |
+
<p class="description">' . __( 'Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted.', 'cookie-notice' ) . '</br>' . __( 'To get the user consent status use the <code>cn_cookies_accepted()</code> function.', 'cookie-notice' ) . '</p>
|
663 |
+
</div>
|
664 |
+
</fieldset>';
|
665 |
+
}
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Revoke cookies option.
|
669 |
+
*/
|
670 |
+
public function cn_revoke_opt() {
|
671 |
+
echo '
|
672 |
+
<fieldset>
|
673 |
+
<label><input id="cn_revoke_cookies" type="checkbox" name="cookie_notice_options[revoke_cookies]" value="1" ' . checked( true, Cookie_Notice()->options['general']['revoke_cookies'], false ) . ' />' . __( 'Enable to give to the user the possibility to revoke their consent <i>(requires "Refuse consent" option enabled)</i>.', 'cookie-notice' ) . '</label>
|
674 |
+
<div id="cn_revoke_opt_container"' . ( Cookie_Notice()->options['general']['revoke_cookies'] ? '' : ' style="display: none;"' ) . '>
|
675 |
+
<textarea name="cookie_notice_options[revoke_message_text]" class="large-text" cols="50" rows="2">' . esc_textarea( Cookie_Notice()->options['general']['revoke_message_text'] ) . '</textarea>
|
676 |
+
<p class="description">' . __( 'Enter the revoke message.', 'cookie-notice' ) . '</p>
|
677 |
+
<input type="text" class="regular-text" name="cookie_notice_options[revoke_text]" value="' . esc_attr( Cookie_Notice()->options['general']['revoke_text'] ) . '" />
|
678 |
+
<p class="description">' . __( 'The text of the button to revoke the consent.', 'cookie-notice' ) . '</p>';
|
679 |
+
|
680 |
+
foreach ( $this->revoke_opts as $value => $label ) {
|
681 |
+
echo '
|
682 |
+
<label><input id="cn_revoke_cookies-' . $value . '" type="radio" name="cookie_notice_options[revoke_cookies_opt]" value="' . $value . '" ' . checked( $value, Cookie_Notice()->options['general']['revoke_cookies_opt'], false ) . ' />' . esc_html( $label ) . '</label>';
|
683 |
+
}
|
684 |
+
|
685 |
+
echo '
|
686 |
+
<p class="description">' . __( 'Select the method for displaying the revoke button - automatic (in the banner) or manual using <code>[cookies_revoke]</code> shortcode.', 'cookie-notice' ) . '</p>
|
687 |
+
</div>
|
688 |
+
</fieldset>';
|
689 |
+
}
|
690 |
+
|
691 |
+
/**
|
692 |
+
* Redirection on cookie accept.
|
693 |
+
*/
|
694 |
+
public function cn_redirection() {
|
695 |
+
echo '
|
696 |
+
<fieldset>
|
697 |
+
<label><input id="cn_redirection" type="checkbox" name="cookie_notice_options[redirection]" value="1" ' . checked( true, Cookie_Notice()->options['general']['redirection'], false ) . ' />' . __( 'Enable to reload the page after the notice is accepted.', 'cookie-notice' ) . '</label>
|
698 |
+
</fieldset>';
|
699 |
+
}
|
700 |
+
|
701 |
+
/**
|
702 |
+
* Privacy policy link option.
|
703 |
+
*/
|
704 |
+
public function cn_see_more() {
|
705 |
+
$pages = get_pages(
|
706 |
+
array(
|
707 |
+
'sort_order' => 'ASC',
|
708 |
+
'sort_column' => 'post_title',
|
709 |
+
'hierarchical' => 0,
|
710 |
+
'child_of' => 0,
|
711 |
+
'parent' => -1,
|
712 |
+
'offset' => 0,
|
713 |
+
'post_type' => 'page',
|
714 |
+
'post_status' => 'publish'
|
715 |
+
)
|
716 |
+
);
|
717 |
+
|
718 |
+
echo '
|
719 |
+
<fieldset>
|
720 |
+
<label><input id="cn_see_more" type="checkbox" name="cookie_notice_options[see_more]" value="1" ' . checked( true, Cookie_Notice()->options['general']['see_more'], false ) . ' />' . __( 'Enable privacy policy link.', 'cookie-notice' ) . '</label>
|
721 |
+
<div id="cn_see_more_opt"' . (Cookie_Notice()->options['general']['see_more'] === false ? ' style="display: none;"' : '') . '>
|
722 |
+
<input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][text]" value="' . esc_attr( Cookie_Notice()->options['general']['see_more_opt']['text'] ) . '" />
|
723 |
+
<p class="description">' . __( 'The text of the privacy policy button.', 'cookie-notice' ) . '</p>
|
724 |
+
<div id="cn_see_more_opt_custom_link">';
|
725 |
+
|
726 |
+
foreach ( $this->links as $value => $label ) {
|
727 |
+
$value = esc_attr( $value );
|
728 |
+
|
729 |
+
echo '
|
730 |
+
<label><input id="cn_see_more_link-' . $value . '" type="radio" name="cookie_notice_options[see_more_opt][link_type]" value="' . $value . '" ' . checked( $value, Cookie_Notice()->options['general']['see_more_opt']['link_type'], false ) . ' />' . esc_html( $label ) . '</label>';
|
731 |
+
}
|
732 |
+
|
733 |
+
echo '
|
734 |
+
</div>
|
735 |
+
<p class="description">' . __( 'Select where to redirect user for more information.', 'cookie-notice' ) . '</p>
|
736 |
+
<div id="cn_see_more_opt_page"' . (Cookie_Notice()->options['general']['see_more_opt']['link_type'] === 'custom' ? ' style="display: none;"' : '') . '>
|
737 |
+
<select name="cookie_notice_options[see_more_opt][id]">
|
738 |
+
<option value="0" ' . selected( 0, Cookie_Notice()->options['general']['see_more_opt']['id'], false ) . '>' . __( '-- select page --', 'cookie-notice' ) . '</option>';
|
739 |
+
|
740 |
+
if ( $pages ) {
|
741 |
+
foreach ( $pages as $page ) {
|
742 |
+
echo '
|
743 |
+
<option value="' . $page->ID . '" ' . selected( $page->ID, Cookie_Notice()->options['general']['see_more_opt']['id'], false ) . '>' . esc_html( $page->post_title ) . '</option>';
|
744 |
+
}
|
745 |
+
}
|
746 |
+
|
747 |
+
echo '
|
748 |
+
</select>
|
749 |
+
<p class="description">' . __( 'Select from one of your site\'s pages.', 'cookie-notice' ) . '</p>';
|
750 |
+
|
751 |
+
global $wp_version;
|
752 |
+
|
753 |
+
if ( version_compare( $wp_version, '4.9.6', '>=' ) ) {
|
754 |
+
echo '
|
755 |
+
<label><input id="cn_see_more_opt_sync" type="checkbox" name="cookie_notice_options[see_more_opt][sync]" value="1" ' . checked( true, Cookie_Notice()->options['general']['see_more_opt']['sync'], false ) . ' />' . __( 'Synchronize with WordPress Privacy Policy page.', 'cookie-notice' ) . '</label>';
|
756 |
+
}
|
757 |
+
|
758 |
+
echo '
|
759 |
+
</div>
|
760 |
+
<div id="cn_see_more_opt_link"' . (Cookie_Notice()->options['general']['see_more_opt']['link_type'] === 'page' ? ' style="display: none;"' : '') . '>
|
761 |
+
<input type="text" class="regular-text" name="cookie_notice_options[see_more_opt][link]" value="' . esc_attr( Cookie_Notice()->options['general']['see_more_opt']['link'] ) . '" />
|
762 |
+
<p class="description">' . __( 'Enter the full URL starting with http(s)://', 'cookie-notice' ) . '</p>
|
763 |
+
</div>
|
764 |
+
<div id="cn_see_more_link_target">';
|
765 |
+
|
766 |
+
foreach ( $this->link_targets as $target ) {
|
767 |
+
echo '
|
768 |
+
<label><input id="cn_see_more_link_target-' . $target . '" type="radio" name="cookie_notice_options[link_target]" value="' . $target . '" ' . checked( $target, Cookie_Notice()->options['general']['link_target'], false ) . ' />' . $target . '</label>';
|
769 |
+
}
|
770 |
+
|
771 |
+
echo '
|
772 |
+
<p class="description">' . esc_html__( 'Select the privacy policy link target.', 'cookie-notice' ) . '</p>
|
773 |
+
</div>
|
774 |
+
<div id="cn_see_more_link_position">';
|
775 |
+
|
776 |
+
foreach ( $this->link_positions as $position => $label ) {
|
777 |
+
echo '
|
778 |
+
<label><input id="cn_see_more_link_position-' . $position . '" type="radio" name="cookie_notice_options[link_position]" value="' . $position . '" ' . checked( $position, Cookie_Notice()->options['general']['link_position'], false ) . ' />' . esc_html( $label ) . '</label>';
|
779 |
+
}
|
780 |
+
|
781 |
+
echo '
|
782 |
+
<p class="description">' . esc_html__( 'Select the privacy policy link position.', 'cookie-notice' ) . '</p>
|
783 |
+
</div></div>
|
784 |
+
</fieldset>';
|
785 |
+
}
|
786 |
+
|
787 |
+
/**
|
788 |
+
* Expiration time option.
|
789 |
+
*/
|
790 |
+
public function cn_time() {
|
791 |
+
echo '
|
792 |
+
<fieldset>
|
793 |
+
<div id="cn_time">
|
794 |
+
<select name="cookie_notice_options[time]">';
|
795 |
+
|
796 |
+
foreach ( $this->times as $time => $arr ) {
|
797 |
+
$time = esc_attr( $time );
|
798 |
+
|
799 |
+
echo '
|
800 |
+
<option value="' . $time . '" ' . selected( $time, Cookie_Notice()->options['general']['time'] ) . '>' . esc_html( $arr[0] ) . '</option>';
|
801 |
+
}
|
802 |
+
|
803 |
+
echo '
|
804 |
+
</select>
|
805 |
+
<p class="description">' . __( 'The amount of time that the cookie should be stored for when user accepts the notice.', 'cookie-notice' ) . '</p>
|
806 |
+
</div>
|
807 |
+
</fieldset>';
|
808 |
+
}
|
809 |
+
|
810 |
+
/**
|
811 |
+
* Expiration time option.
|
812 |
+
*/
|
813 |
+
public function cn_time_rejected() {
|
814 |
+
echo '
|
815 |
+
<fieldset>
|
816 |
+
<div id="cn_time_rejected">
|
817 |
+
<select name="cookie_notice_options[time_rejected]">';
|
818 |
+
|
819 |
+
foreach ( $this->times as $time => $arr ) {
|
820 |
+
$time = esc_attr( $time );
|
821 |
+
|
822 |
+
echo '
|
823 |
+
<option value="' . $time . '" ' . selected( $time, Cookie_Notice()->options['general']['time_rejected'] ) . '>' . esc_html( $arr[0] ) . '</option>';
|
824 |
+
}
|
825 |
+
|
826 |
+
echo '
|
827 |
+
</select>
|
828 |
+
<p class="description">' . __( 'The amount of time that the cookie should be stored for when the user doesn\'t accept the notice.', 'cookie-notice' ) . '</p>
|
829 |
+
</div>
|
830 |
+
</fieldset>';
|
831 |
+
}
|
832 |
+
|
833 |
+
/**
|
834 |
+
* Script placement option.
|
835 |
+
*/
|
836 |
+
public function cn_script_placement() {
|
837 |
+
echo '
|
838 |
+
<fieldset>';
|
839 |
+
|
840 |
+
foreach ( $this->script_placements as $value => $label ) {
|
841 |
+
echo '
|
842 |
+
<label><input id="cn_script_placement-' . $value . '" type="radio" name="cookie_notice_options[script_placement]" value="' . esc_attr( $value ) . '" ' . checked( $value, Cookie_Notice()->options['general']['script_placement'], false ) . ' />' . esc_html( $label ) . '</label>';
|
843 |
+
}
|
844 |
+
|
845 |
+
echo '
|
846 |
+
<p class="description">' . __( 'Select where all the plugin scripts should be placed.', 'cookie-notice' ) . '</p>
|
847 |
+
</fieldset>';
|
848 |
+
}
|
849 |
+
|
850 |
+
/**
|
851 |
+
* Position option.
|
852 |
+
*/
|
853 |
+
public function cn_position() {
|
854 |
+
echo '
|
855 |
+
<fieldset>
|
856 |
+
<div id="cn_position">';
|
857 |
+
|
858 |
+
foreach ( $this->positions as $value => $label ) {
|
859 |
+
$value = esc_attr( $value );
|
860 |
+
|
861 |
+
echo '
|
862 |
+
<label><input id="cn_position-' . $value . '" type="radio" name="cookie_notice_options[position]" value="' . $value . '" ' . checked( $value, Cookie_Notice()->options['general']['position'], false ) . ' />' . esc_html( $label ) . '</label>';
|
863 |
+
}
|
864 |
+
|
865 |
+
echo '
|
866 |
+
<p class="description">' . __( 'Select location for the notice.', 'cookie-notice' ) . '</p>
|
867 |
+
</div>
|
868 |
+
</fieldset>';
|
869 |
+
}
|
870 |
+
|
871 |
+
/**
|
872 |
+
* Animation effect option.
|
873 |
+
*/
|
874 |
+
public function cn_hide_effect() {
|
875 |
+
echo '
|
876 |
+
<fieldset>
|
877 |
+
<div id="cn_hide_effect">';
|
878 |
+
|
879 |
+
foreach ( $this->effects as $value => $label ) {
|
880 |
+
$value = esc_attr( $value );
|
881 |
+
|
882 |
+
echo '
|
883 |
+
<label><input id="cn_hide_effect-' . $value . '" type="radio" name="cookie_notice_options[hide_effect]" value="' . $value . '" ' . checked( $value, Cookie_Notice()->options['general']['hide_effect'], false ) . ' />' . esc_html( $label ) . '</label>';
|
884 |
+
}
|
885 |
+
|
886 |
+
echo '
|
887 |
+
<p class="description">' . __( 'Select the animation style.', 'cookie-notice' ) . '</p>
|
888 |
+
</div>
|
889 |
+
</fieldset>';
|
890 |
+
}
|
891 |
+
|
892 |
+
/**
|
893 |
+
* On scroll option.
|
894 |
+
*/
|
895 |
+
public function cn_on_scroll() {
|
896 |
+
echo '
|
897 |
+
<fieldset>
|
898 |
+
<label><input id="cn_on_scroll" type="checkbox" name="cookie_notice_options[on_scroll]" value="1" ' . checked( true, Cookie_Notice()->options['general']['on_scroll'], false ) . ' />' . __( 'Enable to accept the notice when user scrolls.', 'cookie-notice' ) . '</label>
|
899 |
+
<div id="cn_on_scroll_offset"' . ( Cookie_Notice()->options['general']['on_scroll'] === false || Cookie_Notice()->options['general']['on_scroll'] == false ? ' style="display: none;"' : '' ) . '>
|
900 |
+
<input type="text" class="text" name="cookie_notice_options[on_scroll_offset]" value="' . esc_attr( Cookie_Notice()->options['general']['on_scroll_offset'] ) . '" /> <span>px</span>
|
901 |
+
<p class="description">' . __( 'Number of pixels user has to scroll to accept the notice and make it disappear.', 'cookie-notice' ) . '</p>
|
902 |
+
</div>
|
903 |
+
</fieldset>';
|
904 |
+
}
|
905 |
+
|
906 |
+
/**
|
907 |
+
* On click option.
|
908 |
+
*/
|
909 |
+
public function cn_on_click() {
|
910 |
+
echo '
|
911 |
+
<fieldset>
|
912 |
+
<label><input id="cn_on_click" type="checkbox" name="cookie_notice_options[on_click]" value="1" ' . checked( true, Cookie_Notice()->options['general']['on_click'], false ) . ' />' . __( 'Enable to accept the notice on any click on the page.', 'cookie-notice' ) . '</label>
|
913 |
+
</fieldset>';
|
914 |
+
}
|
915 |
+
|
916 |
+
/**
|
917 |
+
* Delete plugin data on deactivation.
|
918 |
+
*/
|
919 |
+
public function cn_deactivation_delete() {
|
920 |
+
echo '
|
921 |
+
<fieldset>
|
922 |
+
<label><input id="cn_deactivation_delete" type="checkbox" name="cookie_notice_options[deactivation_delete]" value="1" ' . checked( true, Cookie_Notice()->options['general']['deactivation_delete'], false ) . '/>' . __( 'Enable if you want all plugin data to be deleted on deactivation.', 'cookie-notice' ) . '</label>
|
923 |
+
</fieldset>';
|
924 |
+
}
|
925 |
+
|
926 |
+
/**
|
927 |
+
* CSS style option.
|
928 |
+
*/
|
929 |
+
public function cn_css_style() {
|
930 |
+
echo '
|
931 |
+
<fieldset>
|
932 |
+
<div id="cn_css_style">';
|
933 |
+
|
934 |
+
foreach ( $this->styles as $value => $label ) {
|
935 |
+
$value = esc_attr( $value );
|
936 |
+
|
937 |
+
echo '
|
938 |
+
<label><input id="cn_css_style-' . $value . '" type="radio" name="cookie_notice_options[css_style]" value="' . $value . '" ' . checked( $value, Cookie_Notice()->options['general']['css_style'], false ) . ' />' . esc_html( $label ) . '</label>';
|
939 |
+
}
|
940 |
+
|
941 |
+
echo '
|
942 |
+
<p class="description">' . __( 'Select the buttons style.', 'cookie-notice' ) . '</p>
|
943 |
+
</div>
|
944 |
+
</fieldset>';
|
945 |
+
}
|
946 |
+
|
947 |
+
/**
|
948 |
+
* CSS style option.
|
949 |
+
*/
|
950 |
+
public function cn_css_class() {
|
951 |
+
echo '
|
952 |
+
<fieldset>
|
953 |
+
<div id="cn_css_class">
|
954 |
+
<input type="text" class="regular-text" name="cookie_notice_options[css_class]" value="' . esc_attr( Cookie_Notice()->options['general']['css_class'] ) . '" />
|
955 |
+
<p class="description">' . __( 'Enter additional button CSS classes separated by spaces.', 'cookie-notice' ) . '</p>
|
956 |
+
</div>
|
957 |
+
</fieldset>';
|
958 |
+
}
|
959 |
+
|
960 |
+
/**
|
961 |
+
* Colors option.
|
962 |
+
*/
|
963 |
+
public function cn_colors() {
|
964 |
+
echo '
|
965 |
+
<fieldset>';
|
966 |
+
|
967 |
+
foreach ( $this->colors as $value => $label ) {
|
968 |
+
$value = esc_attr( $value );
|
969 |
+
|
970 |
+
echo '
|
971 |
+
<div id="cn_colors-' . $value . '"><label>' . esc_html( $label ) . '</label><br />
|
972 |
+
<input class="cn_color" type="text" name="cookie_notice_options[colors][' . $value . ']" value="' . esc_attr( Cookie_Notice()->options['general']['colors'][$value] ) . '" />' .
|
973 |
+
'</div>';
|
974 |
+
}
|
975 |
+
|
976 |
+
// print_r( Cookie_Notice()->options['general']['colors'] );
|
977 |
+
|
978 |
+
echo '
|
979 |
+
<div id="cn_colors-bar_opacity"><label>' . __( 'Bar opacity', 'cookie-notice' ) . '</label><br />
|
980 |
+
<div><input id="cn_colors_bar_opacity_range" class="cn_range" type="range" min="50" max="100" step="1" name="cookie_notice_options[colors][bar_opacity]" value="' . absint( Cookie_Notice()->options['general']['colors']['bar_opacity'] ) . '" onchange="cn_colors_bar_opacity_text.value = cn_colors_bar_opacity_range.value" /><input id="cn_colors_bar_opacity_text" class="small-text" type="number" onchange="cn_colors_bar_opacity_range.value = cn_colors_bar_opacity_text.value" min="50" max="100" value="' . absint( Cookie_Notice()->options['general']['colors']['bar_opacity'] ) . '" /></div>' .
|
981 |
+
'</div>';
|
982 |
+
|
983 |
+
echo '
|
984 |
+
</fieldset>';
|
985 |
+
}
|
986 |
+
|
987 |
+
/**
|
988 |
+
* Validate options.
|
989 |
+
*
|
990 |
+
* @param array $input
|
991 |
+
* @return array
|
992 |
+
*/
|
993 |
+
public function validate_options( $input ) {
|
994 |
+
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
995 |
+
return $input;
|
996 |
+
|
997 |
+
if ( isset( $_POST['save_cookie_notice_options'] ) ) {
|
998 |
+
// app id
|
999 |
+
$input['app_id'] = sanitize_text_field( isset( $input['app_id'] ) ? $input['app_id'] : Cookie_Notice()->defaults['general']['app_id'] );
|
1000 |
+
|
1001 |
+
// app key
|
1002 |
+
$input['app_key'] = sanitize_text_field( isset( $input['app_key'] ) ? $input['app_key'] : Cookie_Notice()->defaults['general']['app_key'] );
|
1003 |
+
|
1004 |
+
// set app status
|
1005 |
+
if ( ! empty( $input['app_id'] ) && ! empty( $input['app_key'] ) ) {
|
1006 |
+
$app_status = esc_attr( Cookie_Notice()->welcome_api->get_app_status( $input['app_id'] ) );
|
1007 |
+
|
1008 |
+
update_option( 'cookie_notice_status', $app_status );
|
1009 |
+
} else {
|
1010 |
+
update_option( 'cookie_notice_status', '' );
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
// position
|
1014 |
+
$input['position'] = sanitize_text_field( isset( $input['position'] ) && in_array( $input['position'], array_keys( $this->positions ) ) ? $input['position'] : Cookie_Notice()->defaults['general']['position'] );
|
1015 |
+
|
1016 |
+
// colors
|
1017 |
+
$input['colors']['text'] = sanitize_text_field( isset( $input['colors']['text'] ) && $input['colors']['text'] !== '' && preg_match( '/^#[a-f0-9]{6}$/', $input['colors']['text'] ) === 1 ? $input['colors']['text'] : Cookie_Notice()->defaults['general']['colors']['text'] );
|
1018 |
+
$input['colors']['bar'] = sanitize_text_field( isset( $input['colors']['bar'] ) && $input['colors']['bar'] !== '' && preg_match( '/^#[a-f0-9]{6}$/', $input['colors']['bar'] ) === 1 ? $input['colors']['bar'] : Cookie_Notice()->defaults['general']['colors']['bar'] );
|
1019 |
+
$input['colors']['bar_opacity'] = absint( isset( $input['colors']['bar_opacity'] ) && $input['colors']['bar_opacity'] >= 50 ? $input['colors']['bar_opacity'] : Cookie_Notice()->defaults['general']['colors']['bar_opacity'] );
|
1020 |
+
|
1021 |
+
// texts
|
1022 |
+
$input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : Cookie_Notice()->defaults['general']['message_text'] );
|
1023 |
+
$input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : Cookie_Notice()->defaults['general']['accept_text'] );
|
1024 |
+
$input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : Cookie_Notice()->defaults['general']['refuse_text'] );
|
1025 |
+
$input['revoke_message_text'] = wp_kses_post( isset( $input['revoke_message_text'] ) && $input['revoke_message_text'] !== '' ? $input['revoke_message_text'] : Cookie_Notice()->defaults['general']['revoke_message_text'] );
|
1026 |
+
$input['revoke_text'] = sanitize_text_field( isset( $input['revoke_text'] ) && $input['revoke_text'] !== '' ? $input['revoke_text'] : Cookie_Notice()->defaults['general']['revoke_text'] );
|
1027 |
+
$input['refuse_opt'] = (bool) isset( $input['refuse_opt'] );
|
1028 |
+
$input['revoke_cookies'] = isset( $input['revoke_cookies'] );
|
1029 |
+
$input['revoke_cookies_opt'] = isset( $input['revoke_cookies_opt'] ) && array_key_exists( $input['revoke_cookies_opt'], $this->revoke_opts ) ? $input['revoke_cookies_opt'] : Cookie_Notice()->defaults['general']['revoke_cookies_opt'];
|
1030 |
+
|
1031 |
+
// get allowed HTML
|
1032 |
+
$allowed_html = Cookie_Notice()->get_allowed_html();
|
1033 |
+
|
1034 |
+
// body refuse code
|
1035 |
+
$input['refuse_code'] = wp_kses( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : Cookie_Notice()->defaults['general']['refuse_code'], $allowed_html );
|
1036 |
+
|
1037 |
+
// head refuse code
|
1038 |
+
$input['refuse_code_head'] = wp_kses( isset( $input['refuse_code_head'] ) && $input['refuse_code_head'] !== '' ? $input['refuse_code_head'] : Cookie_Notice()->defaults['general']['refuse_code_head'], $allowed_html );
|
1039 |
+
|
1040 |
+
// css button style
|
1041 |
+
$input['css_style'] = sanitize_text_field( isset( $input['css_style'] ) && in_array( $input['css_style'], array_keys( $this->styles ) ) ? $input['css_style'] : Cookie_Notice()->defaults['general']['css_style'] );
|
1042 |
+
|
1043 |
+
// css button class
|
1044 |
+
$input['css_class'] = sanitize_text_field( isset( $input['css_class'] ) ? $input['css_class'] : Cookie_Notice()->defaults['general']['css_class'] );
|
1045 |
+
|
1046 |
+
// link target
|
1047 |
+
$input['link_target'] = sanitize_text_field( isset( $input['link_target'] ) && in_array( $input['link_target'], array_keys( $this->link_targets ) ) ? $input['link_target'] : Cookie_Notice()->defaults['general']['link_target'] );
|
1048 |
+
|
1049 |
+
// time
|
1050 |
+
$input['time'] = sanitize_text_field( isset( $input['time'] ) && in_array( $input['time'], array_keys( $this->times ) ) ? $input['time'] : Cookie_Notice()->defaults['general']['time'] );
|
1051 |
+
$input['time_rejected'] = sanitize_text_field( isset( $input['time_rejected'] ) && in_array( $input['time_rejected'], array_keys( $this->times ) ) ? $input['time_rejected'] : Cookie_Notice()->defaults['general']['time_rejected'] );
|
1052 |
+
|
1053 |
+
// script placement
|
1054 |
+
$input['script_placement'] = sanitize_text_field( isset( $input['script_placement'] ) && in_array( $input['script_placement'], array_keys( $this->script_placements ) ) ? $input['script_placement'] : Cookie_Notice()->defaults['general']['script_placement'] );
|
1055 |
+
|
1056 |
+
// hide effect
|
1057 |
+
$input['hide_effect'] = sanitize_text_field( isset( $input['hide_effect'] ) && in_array( $input['hide_effect'], array_keys( $this->effects ) ) ? $input['hide_effect'] : Cookie_Notice()->defaults['general']['hide_effect'] );
|
1058 |
+
|
1059 |
+
// redirection
|
1060 |
+
$input['redirection'] = isset( $input['redirection'] );
|
1061 |
+
|
1062 |
+
// on scroll
|
1063 |
+
$input['on_scroll'] = isset( $input['on_scroll'] );
|
1064 |
+
|
1065 |
+
// on scroll offset
|
1066 |
+
$input['on_scroll_offset'] = absint( isset( $input['on_scroll_offset'] ) && $input['on_scroll_offset'] !== '' ? $input['on_scroll_offset'] : Cookie_Notice()->defaults['general']['on_scroll_offset'] );
|
1067 |
+
|
1068 |
+
// on click
|
1069 |
+
$input['on_click'] = isset( $input['on_click'] );
|
1070 |
+
|
1071 |
+
// deactivation
|
1072 |
+
$input['deactivation_delete'] = isset( $input['deactivation_delete'] );
|
1073 |
+
|
1074 |
+
// privacy policy
|
1075 |
+
$input['see_more'] = isset( $input['see_more'] );
|
1076 |
+
$input['see_more_opt']['text'] = sanitize_text_field( isset( $input['see_more_opt']['text'] ) && $input['see_more_opt']['text'] !== '' ? $input['see_more_opt']['text'] : Cookie_Notice()->defaults['general']['see_more_opt']['text'] );
|
1077 |
+
$input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : Cookie_Notice()->defaults['general']['see_more_opt']['link_type'] );
|
1078 |
+
|
1079 |
+
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
1080 |
+
$input['see_more_opt']['link'] = ( $input['see_more'] === true ? esc_url( $input['see_more_opt']['link'] ) : '' );
|
1081 |
+
elseif ( $input['see_more_opt']['link_type'] === 'page' ) {
|
1082 |
+
$input['see_more_opt']['id'] = ( $input['see_more'] === true ? (int) $input['see_more_opt']['id'] : 0 );
|
1083 |
+
$input['see_more_opt']['sync'] = isset( $input['see_more_opt']['sync'] );
|
1084 |
+
|
1085 |
+
if ( $input['see_more_opt']['sync'] )
|
1086 |
+
update_option( 'wp_page_for_privacy_policy', $input['see_more_opt']['id'] );
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
// policy link position
|
1090 |
+
$input['link_position'] = sanitize_text_field( isset( $input['link_position'] ) && in_array( $input['link_position'], array_keys( $this->link_positions ) ) ? $input['link_position'] : Cookie_Notice()->defaults['general']['link_position'] );
|
1091 |
+
|
1092 |
+
// message link position?
|
1093 |
+
if ( $input['see_more'] === true && $input['link_position'] === 'message' && strpos( $input['message_text'], '[cookies_policy_link' ) === false )
|
1094 |
+
$input['message_text'] .= ' [cookies_policy_link]';
|
1095 |
+
|
1096 |
+
$input['update_version'] = Cookie_Notice()->options['general']['update_version'];
|
1097 |
+
$input['update_notice'] = Cookie_Notice()->options['general']['update_notice'];
|
1098 |
+
|
1099 |
+
$input['translate'] = false;
|
1100 |
+
|
1101 |
+
// WPML >= 3.2
|
1102 |
+
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
1103 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Message in the notice', $input['message_text'] );
|
1104 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Button text', $input['accept_text'] );
|
1105 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Refuse button text', $input['refuse_text'] );
|
1106 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke message text', $input['revoke_message_text'] );
|
1107 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke button text', $input['revoke_text'] );
|
1108 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Privacy policy text', $input['see_more_opt']['text'] );
|
1109 |
+
|
1110 |
+
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
1111 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', 'Custom link', $input['see_more_opt']['link'] );
|
1112 |
+
}
|
1113 |
+
|
1114 |
+
// purge cache on save
|
1115 |
+
delete_transient( 'cookie_notice_compliance_cache' );
|
1116 |
+
|
1117 |
+
} elseif ( isset( $_POST['reset_cookie_notice_options'] ) ) {
|
1118 |
+
|
1119 |
+
$input = Cookie_Notice()->defaults['general'];
|
1120 |
+
|
1121 |
+
add_settings_error( 'reset_cookie_notice_options', 'reset_cookie_notice_options', __( 'Settings restored to defaults.', 'cookie-notice' ), 'updated' );
|
1122 |
+
|
1123 |
+
// set app status
|
1124 |
+
update_option( 'cookie_notice_status', '' );
|
1125 |
+
|
1126 |
+
// purge cache on save
|
1127 |
+
delete_transient( 'cookie_notice_compliance_cache' );
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
return $input;
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
/**
|
1134 |
+
* Load scripts and styles - admin.
|
1135 |
+
*/
|
1136 |
+
public function admin_enqueue_scripts( $page ) {
|
1137 |
+
if ( $page !== 'settings_page_cookie-notice' )
|
1138 |
+
return;
|
1139 |
+
|
1140 |
+
wp_enqueue_script(
|
1141 |
+
'cookie-notice-admin', plugins_url( '../js/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), Cookie_Notice()->defaults['version']
|
1142 |
+
);
|
1143 |
+
|
1144 |
+
wp_localize_script(
|
1145 |
+
'cookie-notice-admin', 'cnArgs', array(
|
1146 |
+
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
1147 |
+
'nonce' => wp_create_nonce( 'cn-purge-cache' ),
|
1148 |
+
'resetToDefaults' => __( 'Are you sure you want to reset these settings to defaults?', 'cookie-notice' )
|
1149 |
+
)
|
1150 |
+
);
|
1151 |
+
|
1152 |
+
wp_enqueue_style( 'wp-color-picker' );
|
1153 |
+
wp_enqueue_style( 'cookie-notice-admin', plugins_url( '../css/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
/**
|
1157 |
+
* Register WPML (>= 3.2) strings if needed.
|
1158 |
+
*
|
1159 |
+
* @return void
|
1160 |
+
*/
|
1161 |
+
private function register_wpml_strings() {
|
1162 |
+
global $wpdb;
|
1163 |
+
|
1164 |
+
// prepare strings
|
1165 |
+
$strings = array(
|
1166 |
+
'Message in the notice' => $this->options['general']['message_text'],
|
1167 |
+
'Button text' => $this->options['general']['accept_text'],
|
1168 |
+
'Refuse button text' => $this->options['general']['refuse_text'],
|
1169 |
+
'Revoke message text' => $this->options['general']['revoke_message_text'],
|
1170 |
+
'Revoke button text' => $this->options['general']['revoke_text'],
|
1171 |
+
'Privacy policy text' => $this->options['general']['see_more_opt']['text'],
|
1172 |
+
'Custom link' => $this->options['general']['see_more_opt']['link']
|
1173 |
+
);
|
1174 |
+
|
1175 |
+
// get query results
|
1176 |
+
$results = $wpdb->get_col( $wpdb->prepare( "SELECT name FROM " . $wpdb->prefix . "icl_strings WHERE context = %s", 'Cookie Notice' ) );
|
1177 |
+
|
1178 |
+
// check results
|
1179 |
+
foreach( $strings as $string => $value ) {
|
1180 |
+
// string does not exist?
|
1181 |
+
if ( ! in_array( $string, $results, true ) ) {
|
1182 |
+
// register string
|
1183 |
+
do_action( 'wpml_register_single_string', 'Cookie Notice', $string, $value );
|
1184 |
+
}
|
1185 |
+
}
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
/**
|
1189 |
+
* Save compliance config caching.
|
1190 |
+
*/
|
1191 |
+
public function ajax_purge_cache() {
|
1192 |
+
if ( ! check_ajax_referer( 'cn-purge-cache', 'nonce' ) )
|
1193 |
+
echo false;
|
1194 |
+
|
1195 |
+
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
1196 |
+
echo false;
|
1197 |
+
|
1198 |
+
delete_transient( 'cookie_notice_compliance_cache' );
|
1199 |
+
|
1200 |
+
echo true;
|
1201 |
+
exit;
|
1202 |
+
}
|
1203 |
+
}
|
includes/welcome-api.php
ADDED
@@ -0,0 +1,769 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Cookie_Notice_Welcome_API class.
|
8 |
+
*
|
9 |
+
* @class Cookie_Notice_Welcome_API
|
10 |
+
*/
|
11 |
+
class Cookie_Notice_Welcome_API {
|
12 |
+
// api urls
|
13 |
+
private $account_api_url = '';
|
14 |
+
private $designer_api_url = '';
|
15 |
+
private $x_api_key = '';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Constructor.
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
add_action( 'wp_ajax_cn_api_request', array( $this, 'api_request' ) );
|
24 |
+
|
25 |
+
$this->account_api_url = 'https://account-api.hu-manity.co';
|
26 |
+
$this->designer_api_url = 'https://designer-api.hu-manity.co';
|
27 |
+
$this->x_api_key = 'hudft60djisdusdjwek';
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Ajax API request
|
32 |
+
*/
|
33 |
+
public function api_request() {
|
34 |
+
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
35 |
+
wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
36 |
+
|
37 |
+
if ( ! check_ajax_referer( 'cookie-notice-welcome', 'nonce' ) )
|
38 |
+
wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
39 |
+
|
40 |
+
if ( empty( $_POST['request'] ) )
|
41 |
+
wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
42 |
+
|
43 |
+
if ( ( $_POST['request'] === 'payment' && ! empty( $_POST['cn_payment_nonce'] ) && ! wp_verify_nonce( $_POST['cn_payment_nonce'], 'cn_api_payment' ) ) || ( ! empty( $_POST['cn_nonce'] ) && ! wp_verify_nonce( $_POST['cn_nonce'], 'cn_api_' . $_POST['request'] ) ) )
|
44 |
+
wp_die( __( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
45 |
+
|
46 |
+
$request = in_array( $_POST['request'], array( 'register', 'login', 'configure', 'select_plan', 'payment', 'get_bt_init_token' ), true ) ? $_POST['request'] : '';
|
47 |
+
$errors = array();
|
48 |
+
$response = false;
|
49 |
+
|
50 |
+
if ( ! $request )
|
51 |
+
return false;
|
52 |
+
|
53 |
+
// get app token data
|
54 |
+
$data_token = get_transient( 'cookie_notice_app_token' );
|
55 |
+
$api_token = ! empty( $data_token->token ) ? $data_token->token : '';
|
56 |
+
$admin_id = ! empty( $data_token->email ) ? $data_token->email : '';
|
57 |
+
$app_id = Cookie_Notice()->options['general']['app_id'];
|
58 |
+
|
59 |
+
$params = array();
|
60 |
+
|
61 |
+
switch ( $request ) {
|
62 |
+
case 'get_bt_init_token':
|
63 |
+
$result = $this->request( 'get_token' );
|
64 |
+
|
65 |
+
// is token available?
|
66 |
+
if ( ! empty( $result->token ) )
|
67 |
+
$response = array( 'token' => $result->token );
|
68 |
+
break;
|
69 |
+
|
70 |
+
case 'payment':
|
71 |
+
$error = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
|
72 |
+
|
73 |
+
// empty data?
|
74 |
+
if ( empty( $_POST['payment_nonce'] ) || empty( $_POST['plan'] ) || empty( $_POST['method'] ) ) {
|
75 |
+
$response = $error;
|
76 |
+
break;
|
77 |
+
}
|
78 |
+
|
79 |
+
// validate plan and payment method
|
80 |
+
$plan = in_array( $_POST['plan'], array( 'compliance_monthly', 'compliance_yearly' ), true ) ? $_POST['plan'] : false;
|
81 |
+
$method = in_array( $_POST['method'], array( 'credit_card', 'paypal' ), true ) ? $_POST['method'] : false;
|
82 |
+
|
83 |
+
// valid plan and payment method?
|
84 |
+
if ( empty( $plan ) || empty( $method ) ) {
|
85 |
+
$response = array( 'error' => __( 'Empty plan or payment method data.', 'cookie-notice' ) );
|
86 |
+
break;
|
87 |
+
}
|
88 |
+
|
89 |
+
$result = $this->request( 'get_customer', array( 'AppID' => $app_id ) );
|
90 |
+
|
91 |
+
// user found?
|
92 |
+
if ( ! empty( $result->id ) ) {
|
93 |
+
$customer = $result;
|
94 |
+
// create user
|
95 |
+
} else {
|
96 |
+
$result = $this->request(
|
97 |
+
'create_customer',
|
98 |
+
array(
|
99 |
+
'AppID' => $app_id,
|
100 |
+
'AdminID' => $admin_id, // remove later - AdminID from API response
|
101 |
+
'paymentMethodNonce' => esc_attr( $_POST['payment_nonce'] )
|
102 |
+
)
|
103 |
+
);
|
104 |
+
|
105 |
+
if ( ! empty( $result->success ) ) {
|
106 |
+
$customer = $result->customer;
|
107 |
+
} else {
|
108 |
+
$customer = $result;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
// file_put_contents( plugin_dir_path( __FILE__ ) . "bt-customer.txt", print_r( $customer, true ) . PHP_EOL, FILE_APPEND );
|
113 |
+
|
114 |
+
// user created/received?
|
115 |
+
if ( empty( $customer->id ) ) {
|
116 |
+
$response = array( 'error' => __( 'Unable to create customer data.', 'cookie-notice' ) );
|
117 |
+
break;
|
118 |
+
}
|
119 |
+
|
120 |
+
// @todo: check if subscribtion exists
|
121 |
+
$subscription = $this->request(
|
122 |
+
'create_subscription',
|
123 |
+
array(
|
124 |
+
'AppID' => $app_id,
|
125 |
+
'PlanId' => $plan,
|
126 |
+
'paymentMethodToken' => $customer->paymentMethods[0]->token
|
127 |
+
)
|
128 |
+
);
|
129 |
+
|
130 |
+
// file_put_contents( plugin_dir_path( __FILE__ ) . "bt-subscription.txt", print_r( $subscription, true ) . PHP_EOL, FILE_APPEND );
|
131 |
+
|
132 |
+
// subscription assigned?
|
133 |
+
if ( ! empty( $subscription->error ) ) {
|
134 |
+
$response = $subscription->error;
|
135 |
+
break;
|
136 |
+
}
|
137 |
+
|
138 |
+
// get options
|
139 |
+
$app_config = get_transient( 'cookie_notice_app_config' );
|
140 |
+
|
141 |
+
// create quick config
|
142 |
+
$params = ! empty( $app_config ) && is_array( $app_config ) ? $app_config : array();
|
143 |
+
|
144 |
+
// cast to objects
|
145 |
+
foreach ( $params as $key => $array ) {
|
146 |
+
$object = new stdClass();
|
147 |
+
|
148 |
+
foreach ( $array as $subkey => $value ) {
|
149 |
+
$new_params[$key] = $object;
|
150 |
+
$new_params[$key]->{$subkey} = $value;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
$params = $new_params;
|
155 |
+
$params['AppID'] = $app_id;
|
156 |
+
// @todo When mutliple default languages are supported
|
157 |
+
$params['DefaultLanguage'] = 'en';
|
158 |
+
|
159 |
+
$response = $this->request( 'quick_config', $params );
|
160 |
+
|
161 |
+
if ( $response->status === 200 ) {
|
162 |
+
// notify publish app
|
163 |
+
$params = array(
|
164 |
+
'AppID' => $app_id
|
165 |
+
);
|
166 |
+
|
167 |
+
$response = $this->request( 'notify_app', $params );
|
168 |
+
|
169 |
+
if ( $response->status === 200 ) {
|
170 |
+
$response = true;
|
171 |
+
|
172 |
+
// update app status
|
173 |
+
update_option( 'cookie_notice_status', 'active' );
|
174 |
+
} else {
|
175 |
+
// errors?
|
176 |
+
if ( ! empty( $response->error ) ) {
|
177 |
+
break;
|
178 |
+
}
|
179 |
+
|
180 |
+
// errors?
|
181 |
+
if ( ! empty( $response->message ) ) {
|
182 |
+
$response->error = $response->message;
|
183 |
+
break;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
} else {
|
187 |
+
// errors?
|
188 |
+
if ( ! empty( $response->error ) ) {
|
189 |
+
$response->error = $response->error;
|
190 |
+
break;
|
191 |
+
}
|
192 |
+
|
193 |
+
// errors?
|
194 |
+
if ( ! empty( $response->message ) ) {
|
195 |
+
$response->error = $response->message;
|
196 |
+
break;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
break;
|
200 |
+
|
201 |
+
case 'register':
|
202 |
+
$email = is_email( $_POST['email'] );
|
203 |
+
$pass = ! empty( $_POST['pass'] ) ? esc_attr( $_POST['pass'] ) : '';
|
204 |
+
$pass2 = ! empty( $_POST['pass2'] ) ? esc_attr( $_POST['pass2'] ) : '';
|
205 |
+
$terms = isset( $_POST['terms'] );
|
206 |
+
$language = ! empty( $_POST['language'] ) ? esc_attr( $_POST['language'] ) : 'en';
|
207 |
+
|
208 |
+
if ( ! $terms ) {
|
209 |
+
$response = array( 'error' => __( "Please accept the Terms of Service to proceed.", 'cookie-notice' ) );
|
210 |
+
break;
|
211 |
+
}
|
212 |
+
|
213 |
+
if ( ! $email ) {
|
214 |
+
$response = array( 'error' => __( 'Email is not allowed to be empty.', 'cookie-notice' ) );
|
215 |
+
break;
|
216 |
+
}
|
217 |
+
|
218 |
+
if ( ! $pass ) {
|
219 |
+
$response = array( 'error' => __( 'Password is not allowed to be empty.', 'cookie-notice' ) );
|
220 |
+
break;
|
221 |
+
}
|
222 |
+
|
223 |
+
if ( $pass !== $pass2 ) {
|
224 |
+
$response = array( 'error' => __( "Passwords do not match.", 'cookie-notice' ) );
|
225 |
+
break;
|
226 |
+
}
|
227 |
+
|
228 |
+
$params = array(
|
229 |
+
'AdminID' => $email,
|
230 |
+
'Password' => $pass,
|
231 |
+
'Language' => $language
|
232 |
+
);
|
233 |
+
|
234 |
+
$response = $this->request( $request, $params );
|
235 |
+
|
236 |
+
// errors?
|
237 |
+
if ( ! empty( $response->error ) ) {
|
238 |
+
break;
|
239 |
+
}
|
240 |
+
|
241 |
+
// errors?
|
242 |
+
if ( ! empty( $response->message ) ) {
|
243 |
+
$response->error = $response->message;
|
244 |
+
break;
|
245 |
+
}
|
246 |
+
|
247 |
+
// ok, so log in now
|
248 |
+
$params = array(
|
249 |
+
'AdminID' => $email,
|
250 |
+
'Password' => $pass
|
251 |
+
);
|
252 |
+
|
253 |
+
$response = $this->request( 'login', $params );
|
254 |
+
|
255 |
+
// errors?
|
256 |
+
if ( ! empty( $response->error ) ) {
|
257 |
+
break;
|
258 |
+
}
|
259 |
+
|
260 |
+
// errors?
|
261 |
+
if ( ! empty( $response->message ) ) {
|
262 |
+
$response->error = $response->message;
|
263 |
+
break;
|
264 |
+
}
|
265 |
+
// token in response?
|
266 |
+
if ( empty( $response->data->token ) ) {
|
267 |
+
$response = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
|
268 |
+
break;
|
269 |
+
}
|
270 |
+
|
271 |
+
// set token
|
272 |
+
set_transient( 'cookie_notice_app_token', $response->data, 24 * HOUR_IN_SECONDS );
|
273 |
+
|
274 |
+
// multisite?
|
275 |
+
if ( is_multisite() ) {
|
276 |
+
switch_to_blog( 1 );
|
277 |
+
$site_title = get_bloginfo( 'name' );
|
278 |
+
$site_url = network_site_url();
|
279 |
+
$site_description = get_bloginfo( 'description' );
|
280 |
+
restore_current_blog();
|
281 |
+
} else {
|
282 |
+
$site_title = get_bloginfo( 'name' );
|
283 |
+
$site_url = get_home_url();
|
284 |
+
$site_description = get_bloginfo( 'description' );
|
285 |
+
}
|
286 |
+
|
287 |
+
// create new app, no need to check existing
|
288 |
+
$params = array(
|
289 |
+
'DomainName' => $site_title,
|
290 |
+
'DomainUrl' => $site_url,
|
291 |
+
);
|
292 |
+
|
293 |
+
if ( ! empty( $site_description ) )
|
294 |
+
$params['DomainDescription'] = $site_description;
|
295 |
+
|
296 |
+
$response = $this->request( 'app_create', $params );
|
297 |
+
|
298 |
+
// errors?
|
299 |
+
if ( ! empty( $response->message ) ) {
|
300 |
+
$response->error = $response->message;
|
301 |
+
break;
|
302 |
+
}
|
303 |
+
|
304 |
+
// data in response?
|
305 |
+
if ( empty( $response->data->AppID ) || empty( $response->data->SecretKey ) ) {
|
306 |
+
$response = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
|
307 |
+
break;
|
308 |
+
}
|
309 |
+
|
310 |
+
// update options: app ID and secret key
|
311 |
+
Cookie_Notice()->options['general'] = wp_parse_args( array( 'app_id' => $response->data->AppID, 'app_key' => $response->data->SecretKey ), Cookie_Notice()->options['general'] );
|
312 |
+
|
313 |
+
update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
|
314 |
+
|
315 |
+
// update app status
|
316 |
+
update_option( 'cookie_notice_status', 'pending' );
|
317 |
+
|
318 |
+
break;
|
319 |
+
|
320 |
+
case 'login':
|
321 |
+
$email = is_email( $_POST['email'] );
|
322 |
+
$pass = ! empty( $_POST['pass'] ) ? esc_attr( $_POST['pass'] ) : '';
|
323 |
+
|
324 |
+
if ( ! $email ) {
|
325 |
+
$response = array( 'error' => __( 'Email is not allowed to be empty.', 'cookie-notice' ) );
|
326 |
+
break;
|
327 |
+
}
|
328 |
+
|
329 |
+
if ( ! $pass ) {
|
330 |
+
$response = array( 'error' => __( 'Password is not allowed to be empty.', 'cookie-notice' ) );
|
331 |
+
break;
|
332 |
+
}
|
333 |
+
|
334 |
+
$params = array(
|
335 |
+
'AdminID' => $email,
|
336 |
+
'Password' => $pass
|
337 |
+
);
|
338 |
+
|
339 |
+
$response = $this->request( $request, $params );
|
340 |
+
|
341 |
+
// errors?
|
342 |
+
if ( ! empty( $response->error ) ) {
|
343 |
+
break;
|
344 |
+
}
|
345 |
+
|
346 |
+
// errors?
|
347 |
+
if ( ! empty( $response->message ) ) {
|
348 |
+
$response->error = $response->message;
|
349 |
+
break;
|
350 |
+
}
|
351 |
+
|
352 |
+
// token in response?
|
353 |
+
if ( empty( $response->data->token ) ) {
|
354 |
+
$response = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
|
355 |
+
break;
|
356 |
+
}
|
357 |
+
|
358 |
+
// set token
|
359 |
+
set_transient( 'cookie_notice_app_token', $response->data, 24 * HOUR_IN_SECONDS );
|
360 |
+
|
361 |
+
// get apps and check if one for the current domain already exists
|
362 |
+
$response = $this->request( 'list_apps', array() );
|
363 |
+
|
364 |
+
// echo '<pre>'; print_r( $response ); echo '</pre>'; exit;
|
365 |
+
|
366 |
+
// errors?
|
367 |
+
if ( ! empty( $response->message ) ) {
|
368 |
+
$response->error = $response->message;
|
369 |
+
break;
|
370 |
+
}
|
371 |
+
|
372 |
+
$apps_list = array();
|
373 |
+
$app_exists = false;
|
374 |
+
|
375 |
+
// multisite?
|
376 |
+
if ( is_multisite() ) {
|
377 |
+
switch_to_blog( 1 );
|
378 |
+
$site_title = get_bloginfo( 'name' );
|
379 |
+
$site_url = network_site_url();
|
380 |
+
$site_description = get_bloginfo( 'description' );
|
381 |
+
restore_current_blog();
|
382 |
+
} else {
|
383 |
+
$site_title = get_bloginfo( 'name' );
|
384 |
+
$site_url = get_home_url();
|
385 |
+
$site_description = get_bloginfo( 'description' );
|
386 |
+
}
|
387 |
+
|
388 |
+
// apps added, check if current one exists
|
389 |
+
if ( ! empty( $response->data ) ) {
|
390 |
+
$apps_list = (array) $response->data;
|
391 |
+
|
392 |
+
foreach ( $apps_list as $index => $app ) {
|
393 |
+
$site_without_http = trim( str_replace( array( 'http://', 'https://' ), '', $site_url ), '/' );
|
394 |
+
|
395 |
+
if ( $app->DomainUrl === $site_without_http ) {
|
396 |
+
$app_exists = $app;
|
397 |
+
|
398 |
+
continue;
|
399 |
+
}
|
400 |
+
}
|
401 |
+
}
|
402 |
+
|
403 |
+
// if no app, create one
|
404 |
+
if ( ! $app_exists ) {
|
405 |
+
// create new app
|
406 |
+
$params = array(
|
407 |
+
'DomainName' => $site_title,
|
408 |
+
'DomainUrl' => $site_url,
|
409 |
+
);
|
410 |
+
|
411 |
+
if ( ! empty( $site_description ) )
|
412 |
+
$params['DomainDescription'] = $site_description;
|
413 |
+
|
414 |
+
$response = $this->request( 'app_create', $params );
|
415 |
+
|
416 |
+
// errors?
|
417 |
+
if ( ! empty( $response->message ) ) {
|
418 |
+
$response->error = $response->message;
|
419 |
+
break;
|
420 |
+
}
|
421 |
+
|
422 |
+
$app_exists = $response->data;
|
423 |
+
}
|
424 |
+
|
425 |
+
// check if we have the valid app data
|
426 |
+
if ( empty( $app_exists->AppID ) || empty( $app_exists->SecretKey ) ) {
|
427 |
+
$response = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
|
428 |
+
break;
|
429 |
+
}
|
430 |
+
|
431 |
+
// update options: app ID and secret key
|
432 |
+
Cookie_Notice()->options['general'] = wp_parse_args( array( 'app_id' => $app_exists->AppID, 'app_key' => $app_exists->SecretKey ), Cookie_Notice()->options['general'] );
|
433 |
+
|
434 |
+
update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
|
435 |
+
|
436 |
+
// update app status
|
437 |
+
update_option( 'cookie_notice_status', 'pending' );
|
438 |
+
|
439 |
+
// check if the app has an active subscription
|
440 |
+
if ( $app_exists->PaymentStatus === 'Active' ) {
|
441 |
+
$response = array( 'error' => sprintf( __( 'You have an active subscription for %s', 'cookie-notice' ), $site_url ) );
|
442 |
+
|
443 |
+
// update app status
|
444 |
+
update_option( 'cookie_notice_status', 'active' );
|
445 |
+
break;
|
446 |
+
}
|
447 |
+
break;
|
448 |
+
|
449 |
+
case 'configure':
|
450 |
+
$fields = array(
|
451 |
+
'cn_position',
|
452 |
+
'cn_color_primary',
|
453 |
+
'cn_color_background',
|
454 |
+
'cn_color_border',
|
455 |
+
'cn_color_text',
|
456 |
+
'cn_color_heading',
|
457 |
+
'cn_color_button_text',
|
458 |
+
'cn_laws',
|
459 |
+
'cn_purposes'
|
460 |
+
);
|
461 |
+
|
462 |
+
$options = array();
|
463 |
+
|
464 |
+
// loop through potential config form fields
|
465 |
+
foreach ( $fields as $field ) {
|
466 |
+
if ( isset( $_POST[$field] ) ) {
|
467 |
+
switch ( $field ) {
|
468 |
+
case 'cn_position':
|
469 |
+
$options['design']['position'] = esc_attr( $_POST[$field] );
|
470 |
+
break;
|
471 |
+
case 'cn_color_primary':
|
472 |
+
$options['design']['primaryColor'] = esc_attr( $_POST[$field] );
|
473 |
+
break;
|
474 |
+
case 'cn_color_background':
|
475 |
+
$options['design']['bannerColor'] = esc_attr( $_POST[$field] );
|
476 |
+
break;
|
477 |
+
case 'cn_color_border':
|
478 |
+
$options['design']['borderColor'] = esc_attr( $_POST[$field] );
|
479 |
+
break;
|
480 |
+
case 'cn_color_text':
|
481 |
+
$options['design']['textColor'] = esc_attr( $_POST[$field] );
|
482 |
+
break;
|
483 |
+
case 'cn_color_heading':
|
484 |
+
$options['design']['headingColor'] = esc_attr( $_POST[$field] );
|
485 |
+
break;
|
486 |
+
case 'cn_color_button_text':
|
487 |
+
$options['design']['btnTextColor'] = esc_attr( $_POST[$field] );
|
488 |
+
break;
|
489 |
+
case 'cn_laws':
|
490 |
+
$options['laws'] = array_map( 'esc_attr', $_POST[$field] );
|
491 |
+
$new_options = array();
|
492 |
+
|
493 |
+
foreach ( $options['laws'] as $law ) {
|
494 |
+
$new_options[$law] = true;
|
495 |
+
}
|
496 |
+
|
497 |
+
$options['laws'] = $new_options;
|
498 |
+
|
499 |
+
// GDPR
|
500 |
+
if ( in_array( 'gdpr', $options['laws'] ) ) {
|
501 |
+
$options['config']['privacyPolicyLink'] = true;
|
502 |
+
} else {
|
503 |
+
$options['config']['privacyPolicyLink'] = false;
|
504 |
+
}
|
505 |
+
|
506 |
+
// CCPA
|
507 |
+
if ( in_array( 'ccpa', $options['laws'] ) ) {
|
508 |
+
$options['config']['dontSellLink'] = true;
|
509 |
+
} else {
|
510 |
+
$options['config']['dontSellLink'] = false;
|
511 |
+
}
|
512 |
+
break;
|
513 |
+
case 'cn_purposes':
|
514 |
+
$options['text']['bodyText'] = Cookie_Notice()->settings->cookie_messages[absint( $_POST[$field] )];
|
515 |
+
break;
|
516 |
+
}
|
517 |
+
}
|
518 |
+
}
|
519 |
+
|
520 |
+
// set options
|
521 |
+
set_transient( 'cookie_notice_app_config', $options, 24 * HOUR_IN_SECONDS );
|
522 |
+
|
523 |
+
break;
|
524 |
+
|
525 |
+
case 'select_plan':
|
526 |
+
break;
|
527 |
+
}
|
528 |
+
|
529 |
+
echo json_encode( $response );
|
530 |
+
exit;
|
531 |
+
}
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Youzign API request.
|
535 |
+
*
|
536 |
+
* @param string $action The requested action.
|
537 |
+
* @param array $_data Parameters for the API action.
|
538 |
+
* @return false|object
|
539 |
+
*/
|
540 |
+
private function request( $request = '', $params = '' ) {
|
541 |
+
$api_args = array(
|
542 |
+
'timeout' => 60,
|
543 |
+
'sslverify' => false,
|
544 |
+
'headers' => array( 'x-api-key' => $this->x_api_key )
|
545 |
+
);
|
546 |
+
$api_params = array();
|
547 |
+
$json = false;
|
548 |
+
|
549 |
+
// get app token data
|
550 |
+
$data_token = get_transient( 'cookie_notice_app_token' );
|
551 |
+
$api_token = ! empty( $data_token->token ) ? $data_token->token : '';
|
552 |
+
$admin_id = ! empty( $data_token->email ) ? $data_token->email : '';
|
553 |
+
|
554 |
+
switch ( $request ) {
|
555 |
+
case 'register':
|
556 |
+
$api_url = $this->account_api_url . '/api/account/account/registration';
|
557 |
+
$api_args['method'] = 'POST';
|
558 |
+
break;
|
559 |
+
|
560 |
+
case 'login':
|
561 |
+
$api_url = $this->account_api_url . '/api/account/account/login';
|
562 |
+
$api_args['method'] = 'POST';
|
563 |
+
break;
|
564 |
+
|
565 |
+
case 'list_apps':
|
566 |
+
$api_url = $this->account_api_url . '/api/account/app/list';
|
567 |
+
$api_args['method'] = 'GET';
|
568 |
+
$api_args['headers'] = array_merge(
|
569 |
+
$api_args['headers'],
|
570 |
+
array(
|
571 |
+
'Authorization' => 'Bearer ' . $api_token
|
572 |
+
)
|
573 |
+
);
|
574 |
+
break;
|
575 |
+
|
576 |
+
case 'app_create':
|
577 |
+
$api_url = $this->account_api_url . '/api/account/app/add';
|
578 |
+
$api_args['method'] = 'POST';
|
579 |
+
$api_args['headers'] = array_merge(
|
580 |
+
$api_args['headers'],
|
581 |
+
array(
|
582 |
+
'Authorization' => 'Bearer ' . $api_token
|
583 |
+
)
|
584 |
+
);
|
585 |
+
break;
|
586 |
+
|
587 |
+
case 'get_config':
|
588 |
+
$api_url = $this->designer_api_url . '/api/designer/user-design-live';
|
589 |
+
$api_args['method'] = 'GET';
|
590 |
+
break;
|
591 |
+
|
592 |
+
case 'quick_config':
|
593 |
+
$json = true;
|
594 |
+
$api_url = $this->designer_api_url . '/api/designer/user-design/quick';
|
595 |
+
$api_args['method'] = 'POST';
|
596 |
+
$api_args['headers'] = array_merge(
|
597 |
+
$api_args['headers'],
|
598 |
+
array(
|
599 |
+
'Authorization' => 'Bearer ' . $api_token,
|
600 |
+
'Content-Type' => 'application/json; charset=utf-8'
|
601 |
+
)
|
602 |
+
);
|
603 |
+
break;
|
604 |
+
|
605 |
+
case 'notify_app':
|
606 |
+
$json = true;
|
607 |
+
$api_url = $this->account_api_url . '/api/account/app/notifyAppPublished';
|
608 |
+
$api_args['method'] = 'POST';
|
609 |
+
$api_args['headers'] = array_merge(
|
610 |
+
$api_args['headers'],
|
611 |
+
array(
|
612 |
+
'Authorization' => 'Bearer ' . $api_token,
|
613 |
+
'Content-Type' => 'application/json; charset=utf-8'
|
614 |
+
)
|
615 |
+
);
|
616 |
+
break;
|
617 |
+
|
618 |
+
// braintree init token
|
619 |
+
case 'get_token':
|
620 |
+
$api_url = $this->account_api_url . '/api/account/braintree';
|
621 |
+
$api_args['method'] = 'GET';
|
622 |
+
$api_args['headers'] = array_merge(
|
623 |
+
$api_args['headers'],
|
624 |
+
array(
|
625 |
+
'Authorization' => 'Bearer ' . $api_token
|
626 |
+
)
|
627 |
+
);
|
628 |
+
break;
|
629 |
+
|
630 |
+
// braintree get customer
|
631 |
+
case 'get_customer':
|
632 |
+
$json = true;
|
633 |
+
$api_url = $this->account_api_url . '/api/account/braintree/findcustomer';
|
634 |
+
$api_args['method'] = 'POST';
|
635 |
+
$api_args['data_format'] = 'body';
|
636 |
+
$api_args['headers'] = array_merge(
|
637 |
+
$api_args['headers'],
|
638 |
+
array(
|
639 |
+
'Authorization' => 'Bearer ' . $api_token,
|
640 |
+
'Content-Type' => 'application/json; charset=utf-8'
|
641 |
+
)
|
642 |
+
);
|
643 |
+
break;
|
644 |
+
|
645 |
+
// braintree create customer in vault
|
646 |
+
case 'create_customer':
|
647 |
+
$json = true;
|
648 |
+
$api_url = $this->account_api_url . '/api/account/braintree/createcustomer';
|
649 |
+
$api_args['method'] = 'POST';
|
650 |
+
$api_args['headers'] = array_merge(
|
651 |
+
$api_args['headers'],
|
652 |
+
array(
|
653 |
+
'Authorization' => 'Bearer ' . $api_token,
|
654 |
+
'Content-Type' => 'application/json; charset=utf-8'
|
655 |
+
)
|
656 |
+
);
|
657 |
+
break;
|
658 |
+
|
659 |
+
// braintree assign subscription to the customer
|
660 |
+
case 'create_subscription':
|
661 |
+
$json = true;
|
662 |
+
$api_url = $this->account_api_url . '/api/account/braintree/createsubscription';
|
663 |
+
$api_args['method'] = 'POST';
|
664 |
+
$api_args['headers'] = array_merge(
|
665 |
+
$api_args['headers'],
|
666 |
+
array(
|
667 |
+
'Authorization' => 'Bearer ' . $api_token,
|
668 |
+
'Content-Type' => 'application/json; charset=utf-8'
|
669 |
+
)
|
670 |
+
);
|
671 |
+
break;
|
672 |
+
}
|
673 |
+
|
674 |
+
if ( ! empty( $params ) && is_array( $params ) ) {
|
675 |
+
foreach ( $params as $key => $param ) {
|
676 |
+
if ( is_object( $param ) )
|
677 |
+
$api_params[$key] = $param;
|
678 |
+
else
|
679 |
+
$api_params[$key] = esc_attr( $param );
|
680 |
+
}
|
681 |
+
|
682 |
+
if ( $json )
|
683 |
+
$api_args['body'] = json_encode( $api_params );
|
684 |
+
else
|
685 |
+
$api_args['body'] = $api_params;
|
686 |
+
}
|
687 |
+
|
688 |
+
$response = wp_remote_request( $api_url, $api_args );
|
689 |
+
|
690 |
+
if ( is_wp_error( $response ) )
|
691 |
+
$result = array( 'error' => $response->get_error_message() );
|
692 |
+
else {
|
693 |
+
$content_type = wp_remote_retrieve_header( $response, 'Content-Type' );
|
694 |
+
|
695 |
+
// HTML response, means error
|
696 |
+
if ( $content_type == 'text/html' ) {
|
697 |
+
$result = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
|
698 |
+
} else {
|
699 |
+
$result = wp_remote_retrieve_body( $response );
|
700 |
+
// detect json or array
|
701 |
+
$result = is_array( $result ) ? $result : json_decode( $result );
|
702 |
+
}
|
703 |
+
}
|
704 |
+
|
705 |
+
return $result;
|
706 |
+
}
|
707 |
+
|
708 |
+
/**
|
709 |
+
* Ajax API request
|
710 |
+
*/
|
711 |
+
public function get_app_status( $app_id ) {
|
712 |
+
$result = '';
|
713 |
+
|
714 |
+
if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) )
|
715 |
+
return false;
|
716 |
+
|
717 |
+
$params = array(
|
718 |
+
'AppID' => $app_id
|
719 |
+
);
|
720 |
+
|
721 |
+
$response = $this->request( 'get_config', $params );
|
722 |
+
|
723 |
+
if ( ! empty( $response->data ) ) {
|
724 |
+
$result = 'active';
|
725 |
+
} else {
|
726 |
+
if ( ! empty( $response->error ) ) {
|
727 |
+
if ( $response->error == 'App is not puplised yet' )
|
728 |
+
$result = 'pending';
|
729 |
+
}
|
730 |
+
}
|
731 |
+
|
732 |
+
return $result;
|
733 |
+
}
|
734 |
+
|
735 |
+
/**
|
736 |
+
* Defines the function used to initial the cURL library.
|
737 |
+
*
|
738 |
+
* @param string $url To URL to which the request is being made
|
739 |
+
* @param string $params The URL query parameters
|
740 |
+
* @return string $response The response, if available; otherwise, null
|
741 |
+
*/
|
742 |
+
private function curl( $url, $args ) {
|
743 |
+
$curl = curl_init( $url );
|
744 |
+
|
745 |
+
$headers = array();
|
746 |
+
|
747 |
+
foreach ( $args['headers'] as $header => $value ) {
|
748 |
+
$headers[] = $header . ': ' . $value;
|
749 |
+
}
|
750 |
+
|
751 |
+
curl_setopt( $curl, CURLOPT_HTTPHEADER, $headers );
|
752 |
+
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
|
753 |
+
curl_setopt( $curl, CURLOPT_HEADER, false );
|
754 |
+
curl_setopt( $curl, CURLOPT_USERAGENT, '' );
|
755 |
+
curl_setopt( $curl, CURLOPT_HTTPGET, true );
|
756 |
+
curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'GET' );
|
757 |
+
curl_setopt( $curl, CURLOPT_POSTFIELDS, $args['body'] );
|
758 |
+
curl_setopt( $curl, CURLOPT_TIMEOUT, 10 );
|
759 |
+
|
760 |
+
$response = curl_exec( $curl );
|
761 |
+
|
762 |
+
if ( 0 !== curl_errno( $curl ) || 200 !== curl_getinfo( $curl, CURLINFO_HTTP_CODE ) )
|
763 |
+
$response = null;
|
764 |
+
|
765 |
+
curl_close( $curl );
|
766 |
+
|
767 |
+
return $response;
|
768 |
+
}
|
769 |
+
}
|
includes/welcome-frontend.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Cookie_Notice_Welcome_Frontend class.
|
8 |
+
*
|
9 |
+
* @class Cookie_Notice_Welcome_Frontend
|
10 |
+
*/
|
11 |
+
class Cookie_Notice_Welcome_Frontend {
|
12 |
+
private $widget_url = '';
|
13 |
+
private $preview_mode = false;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Constructor.
|
17 |
+
*
|
18 |
+
* @return void
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
add_action( 'after_setup_theme', array( $this, 'preview_init' ), 1 );
|
22 |
+
|
23 |
+
$this->widget_url = '//cdn.hu-manity.co/hu-banner.min.js';
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Initialize preview mode.
|
28 |
+
*/
|
29 |
+
public function preview_init() {
|
30 |
+
// check preview mode
|
31 |
+
$this->preview_mode = isset( $_GET['cn_preview_mode'] ) ? absint( $_GET['cn_preview_mode'] ) : false;
|
32 |
+
|
33 |
+
if ( $this->preview_mode !== false ) {
|
34 |
+
// filters
|
35 |
+
add_filter( 'show_admin_bar', '__return_false' );
|
36 |
+
add_filter( 'cn_cookie_notice_output', '__return_false', 1000 );
|
37 |
+
|
38 |
+
// actions
|
39 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'wp_dequeue_scripts' ) );
|
40 |
+
|
41 |
+
// only in live preview
|
42 |
+
if ( $this->preview_mode === 1 ) {
|
43 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
44 |
+
add_action( 'wp_head', array( $this, 'wp_head_scripts' ), 0 );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Load scripts and styles.
|
51 |
+
*
|
52 |
+
* @return void
|
53 |
+
*/
|
54 |
+
public function wp_enqueue_scripts( $page ) {
|
55 |
+
// show only in live preview
|
56 |
+
if ( $this->preview_mode === 1 ) {
|
57 |
+
wp_enqueue_script( 'cookie-notice-welcome-frontend', plugins_url( '../js/front-welcome.js', __FILE__ ), array( 'jquery', 'underscore' ), Cookie_Notice()->defaults['version'] );
|
58 |
+
|
59 |
+
wp_localize_script(
|
60 |
+
'cookie-notice-welcome-frontend',
|
61 |
+
'cnFrontWelcome',
|
62 |
+
array(
|
63 |
+
'previewMode' => $this->preview_mode,
|
64 |
+
'allowedURLs' => $this->get_allowed_urls(),
|
65 |
+
'cookieMessage' => Cookie_Notice()->settings->cookie_messages,
|
66 |
+
'preferencesMessage' => Cookie_Notice()->settings->preferences_messages
|
67 |
+
)
|
68 |
+
);
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Unload scripts and styles.
|
74 |
+
*
|
75 |
+
* @return void
|
76 |
+
*/
|
77 |
+
public function wp_dequeue_scripts( $page ) {
|
78 |
+
// deregister native CN
|
79 |
+
wp_dequeue_script( 'cookie-notice-front' );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* .
|
84 |
+
*
|
85 |
+
* @return void
|
86 |
+
*/
|
87 |
+
public function wp_head_scripts() {
|
88 |
+
$options = array(
|
89 |
+
'currentLanguage' => 'en',
|
90 |
+
'previewMode' => true
|
91 |
+
);
|
92 |
+
|
93 |
+
echo '
|
94 |
+
<!-- Hu Banner -->
|
95 |
+
<script type="text/javascript">
|
96 |
+
var huOptions = ' . json_encode( $options ) . ';
|
97 |
+
</script>
|
98 |
+
<script type="text/javascript" src="' . $this->widget_url . '"></script>
|
99 |
+
<style>.hu-preview-mode #hu::after {content: "";position: fixed;width: 100%;height: 100%;display: block;top: 0;left: 0;}</style>';
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Get URLs allowed to be previewed.
|
104 |
+
*
|
105 |
+
* @return array
|
106 |
+
*/
|
107 |
+
public function get_allowed_urls() {
|
108 |
+
$allowed_urls = array( home_url( '/' ) );
|
109 |
+
|
110 |
+
if ( is_ssl() && ! $this->is_cross_domain() )
|
111 |
+
$allowed_urls[] = home_url( '/', 'https' );
|
112 |
+
|
113 |
+
return $allowed_urls;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Determines whether the admin and the frontend are on different domains.
|
118 |
+
*
|
119 |
+
* @return bool
|
120 |
+
*/
|
121 |
+
public function is_cross_domain() {
|
122 |
+
$admin_origin = wp_parse_url( admin_url() );
|
123 |
+
$home_origin = wp_parse_url( home_url() );
|
124 |
+
|
125 |
+
return ( strtolower( $admin_origin['host'] ) !== strtolower( $home_origin['host'] ) );
|
126 |
+
}
|
127 |
+
}
|
includes/welcome.php
ADDED
@@ -0,0 +1,626 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Cookie_Notice_Welcome class.
|
8 |
+
*
|
9 |
+
* @class Cookie_Notice_Welcome
|
10 |
+
*/
|
11 |
+
class Cookie_Notice_Welcome {
|
12 |
+
|
13 |
+
private $app_login_url = '';
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
// actions
|
17 |
+
add_action( 'admin_menu', array( $this, 'admin_menus' ) );
|
18 |
+
add_action( 'admin_head', array( $this, 'admin_head' ), 1 );
|
19 |
+
add_action( 'admin_init', array( $this, 'welcome' ) );
|
20 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
21 |
+
add_action( 'wp_ajax_cn_welcome_screen', array( $this, 'welcome_screen' ) );
|
22 |
+
|
23 |
+
// filters
|
24 |
+
add_filter( 'admin_footer_text', '__return_false', 1000 );
|
25 |
+
add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
|
26 |
+
|
27 |
+
$this->app_login_url = 'https://app.hu-manity.co/#/en/cc2/login';
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Add admin menus/screens.
|
32 |
+
*
|
33 |
+
* @return void
|
34 |
+
*/
|
35 |
+
public function admin_menus() {
|
36 |
+
$welcome_page_title = __( 'Welcome to Cookie Notice', 'cookie-notice' );
|
37 |
+
// about
|
38 |
+
$about = add_dashboard_page( $welcome_page_title, $welcome_page_title, 'manage_options', 'cookie-notice-welcome', array( $this, 'welcome_page' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Add styles just for this page, and remove dashboard page links.
|
43 |
+
*
|
44 |
+
* @return void
|
45 |
+
*/
|
46 |
+
public function admin_head() {
|
47 |
+
remove_submenu_page( 'index.php', 'cookie-notice-welcome' );
|
48 |
+
|
49 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] === 'cookie-notice-welcome' )
|
50 |
+
remove_all_actions( 'admin_notices' );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Load scripts and styles - admin.
|
55 |
+
*/
|
56 |
+
public function admin_enqueue_scripts( $page ) {
|
57 |
+
if ( $page !== 'dashboard_page_cookie-notice-welcome' )
|
58 |
+
return;
|
59 |
+
|
60 |
+
wp_enqueue_style( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.css', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
|
61 |
+
|
62 |
+
wp_enqueue_script( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.js', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
|
63 |
+
wp_enqueue_script( 'cookie-notice-welcome', plugins_url( '../js/admin-welcome.js', __FILE__ ), array( 'jquery' ), Cookie_Notice()->defaults['version'] );
|
64 |
+
wp_enqueue_script( 'cookie-notice-braintree-client', 'https://js.braintreegateway.com/web/3.71.0/js/client.min.js', array(), null, false );
|
65 |
+
wp_enqueue_script( 'cookie-notice-braintree-hostedfields', 'https://js.braintreegateway.com/web/3.71.0/js/hosted-fields.min.js', array(), null, false );
|
66 |
+
wp_enqueue_script( 'cookie-notice-braintree-paypal', 'https://js.braintreegateway.com/web/3.71.0/js/paypal-checkout.min.js', array(), null, false );
|
67 |
+
|
68 |
+
wp_localize_script(
|
69 |
+
'cookie-notice-welcome',
|
70 |
+
'cnArgs',
|
71 |
+
array(
|
72 |
+
'ajaxURL' => admin_url( 'admin-ajax.php' ),
|
73 |
+
'nonce' => wp_create_nonce( 'cookie-notice-welcome' ),
|
74 |
+
'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ),
|
75 |
+
'invalidFields' => __( 'Please fill all the required fields.', 'cookie-notice' )
|
76 |
+
)
|
77 |
+
);
|
78 |
+
|
79 |
+
wp_enqueue_style( 'cookie-notice-welcome', plugins_url( '../css/admin-welcome.css', __FILE__ ) );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Add one or more classes to the body tag in the dashboard.
|
84 |
+
*
|
85 |
+
* @param string $classes
|
86 |
+
* @return string
|
87 |
+
*/
|
88 |
+
public function admin_body_class( $classes ) {
|
89 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] === 'cookie-notice-welcome' )
|
90 |
+
$classes .= ' folded';
|
91 |
+
|
92 |
+
return $classes;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Send user to the welcome page on first activation.
|
97 |
+
*
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function welcome() {
|
101 |
+
// bail if no activation redirect transient is set
|
102 |
+
if ( ! get_transient( 'cn_activation_redirect' ) )
|
103 |
+
return;
|
104 |
+
|
105 |
+
// delete the redirect transient
|
106 |
+
delete_transient( 'cn_activation_redirect' );
|
107 |
+
|
108 |
+
// bail if activating from network, or bulk, or within an iFrame
|
109 |
+
if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) )
|
110 |
+
return;
|
111 |
+
|
112 |
+
if ( (isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action']) && (isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'cookie-notice.php' )) )
|
113 |
+
return;
|
114 |
+
|
115 |
+
wp_safe_redirect( admin_url( 'index.php?page=cookie-notice-welcome' ) );
|
116 |
+
exit;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Output the welcome screen.
|
121 |
+
*
|
122 |
+
* @return void
|
123 |
+
*/
|
124 |
+
public function welcome_page() {
|
125 |
+
// get plugin version
|
126 |
+
$plugin_version = substr( Cookie_Notice()->defaults['version'], 0, 3 );
|
127 |
+
$screen = ( isset( $_GET['screen'] ) ? (int) $_GET['screen'] : 1 );
|
128 |
+
|
129 |
+
$this->welcome_screen( $screen );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Render welcome screen sidebar step.
|
134 |
+
*
|
135 |
+
* @param int $step
|
136 |
+
* @return mixed
|
137 |
+
*/
|
138 |
+
public function welcome_screen( $screen, $echo = true ) {
|
139 |
+
if ( ! current_user_can( 'install_plugins' ) )
|
140 |
+
wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
141 |
+
|
142 |
+
$sidebars = array( 'about', 'login', 'register', 'configure', 'select_plan', 'success' );
|
143 |
+
$steps = array( 1, 2, 3, 4 );
|
144 |
+
$screens = array_merge( $sidebars, $steps );
|
145 |
+
|
146 |
+
$is_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
|
147 |
+
$screen = ! empty( $screen ) && in_array( $screen, $screens ) ? $screen : ( isset( $_REQUEST['screen'] ) && in_array( $_REQUEST['screen'], $screens ) ? esc_attr( $_REQUEST['screen'] ) : '' );
|
148 |
+
|
149 |
+
if ( empty( $screen ) )
|
150 |
+
wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
151 |
+
|
152 |
+
if ( $is_ajax && ! check_ajax_referer( 'cookie-notice-welcome', 'nonce' ) )
|
153 |
+
wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
|
154 |
+
|
155 |
+
$logo_url = plugins_url( '../img/cookie-compliance-logo.png', __FILE__ );
|
156 |
+
|
157 |
+
// get token data
|
158 |
+
$token_data = get_transient( 'cookie_notice_app_token' );
|
159 |
+
|
160 |
+
// step screens
|
161 |
+
if ( in_array( $screen, $steps ) ) {
|
162 |
+
$html = '
|
163 |
+
<div class="wrap full-width-layout cn-welcome-wrap cn-welcome-step-' . $screen . ' has-loader">';
|
164 |
+
|
165 |
+
if ( $screen == 1 ) {
|
166 |
+
$html .= $this->welcome_screen( 'about', false );
|
167 |
+
|
168 |
+
$html .= '
|
169 |
+
<div class="cn-content cn-sidebar-visible">
|
170 |
+
<div class="cn-inner">
|
171 |
+
<div class="cn-content-full">
|
172 |
+
<h1><b>Cookie Compliance™</b></h1>
|
173 |
+
<h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
|
174 |
+
<div class="cn-lead">
|
175 |
+
<p>' . __( 'An all new web application to help you deliver better consent experiences and comply with GDPR and CCPA more effectively.', 'cookie-notice' ) . '</p>
|
176 |
+
</div>
|
177 |
+
<div class="cn-hero-image">
|
178 |
+
<img src="' . plugins_url( '../img/screen-dashboard.png', __FILE__ ) . '">
|
179 |
+
</div>
|
180 |
+
<div class="cn-lead">
|
181 |
+
<p>' . __( 'Digital Factory - the original developers of Cookie Notice - has joined forces with <a href="https://hu-manity.co" target="_blank" class="cn-link">Hu-manity.co</a>, the company known for introducing the 31st Human Right, to launch the Cookie Compliance™ web application.', 'cookie-notice' ) . '</p>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
</div>';
|
186 |
+
} elseif ( $screen == 2 ) {
|
187 |
+
$html .= $this->welcome_screen( 'configure', false );
|
188 |
+
|
189 |
+
$html .= '
|
190 |
+
<div id="cn_upgrade_iframe" class="cn-content cn-sidebar-visible has-loader cn-loading"><span class="cn-spinner"></span>
|
191 |
+
<iframe id="cn_iframe_id" src="' . home_url( '/?cn_preview_mode=1' ) . '"></iframe>
|
192 |
+
</div>';
|
193 |
+
} elseif ( $screen == 3 ) {
|
194 |
+
// get options
|
195 |
+
$app_config = get_transient( 'cookie_notice_app_config' );
|
196 |
+
|
197 |
+
// echo '<pre>'; print_r( $app_config ); echo '</pre>';
|
198 |
+
|
199 |
+
$html .= $this->welcome_screen( 'register', false );
|
200 |
+
|
201 |
+
$html .= '
|
202 |
+
<div class="cn-content cn-sidebar-visible">
|
203 |
+
<div class="cn-inner">
|
204 |
+
<div class="cn-content-full">
|
205 |
+
<h1><b>' . __( 'Privacy Made Easy', 'cookie-notice' ) . '</b></h1>
|
206 |
+
<h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
|
207 |
+
<div class="cn-lead">
|
208 |
+
<p>' . __( 'Cookie Compliance™ adds GDPR & CCPA compliance features, and a new Privacy Experience to Cookie Notice.', 'cookie-notice' ) . '</p>
|
209 |
+
</div>
|
210 |
+
<div class="cn-hero-image">
|
211 |
+
<div class="cn-flex-item">
|
212 |
+
<div class="cn-logo-container">
|
213 |
+
<img src="' . plugins_url( '../img/cookie-notice-logo-dark.png', __FILE__ ) . '">
|
214 |
+
<span class="cn-badge">' . __( 'WP Plugin', 'cookie-notice' ) . '</span>
|
215 |
+
</div>
|
216 |
+
<img src="' . plugins_url( '../img/screen-notice.png', __FILE__ ) . '">
|
217 |
+
<ul>
|
218 |
+
<li><span>' . __( 'Customizable notice message', 'cookie-notice' ) . '</span></li>
|
219 |
+
<li><span>' . __( 'Consent on click, scroll or close', 'cookie-notice' ) . '</span></li>
|
220 |
+
<li><span>' . __( 'Multiple cookie expiry options', 'cookie-notice' ) . '</span></li>
|
221 |
+
<li><span>' . __( 'Link to Privacy Policy page', 'cookie-notice' ) . '</span></li>
|
222 |
+
</ul>
|
223 |
+
</div>
|
224 |
+
<div class="cn-flex-item">
|
225 |
+
<img src="' . plugins_url( '../img/screen-plus.png', __FILE__ ) . '">
|
226 |
+
</div>
|
227 |
+
<div class="cn-flex-item">
|
228 |
+
<div class="cn-logo-container">
|
229 |
+
<img src="' . plugins_url( '../img/cookie-compliance-logo-dark.png', __FILE__ ) . '">
|
230 |
+
<span class="cn-badge">' . __( 'Web App', 'cookie-notice' ) . '</span>
|
231 |
+
</div>
|
232 |
+
<img src="' . plugins_url( '../img/screen-compliance.png', __FILE__ ) . '">
|
233 |
+
<ul>
|
234 |
+
<li><span>' . __( 'Customizable <b>GDPR & CCPA</b> notice templates', 'cookie-notice' ) . '</span></li>
|
235 |
+
<li><span>' . __( '<b>Consent Analytics</b> Dashboard', 'cookie-notice' ) . '</span></li>
|
236 |
+
<li><span>' . __( 'Cookie <b>Autoblocking</b> (complies with GDPR Art.7)', 'cookie-notice' ) . '</span></li>
|
237 |
+
<li><span>' . __( '<b>Cookie Categories</b> (complies with GDPR Art.32)', 'cookie-notice' ) . '</span></li>
|
238 |
+
<li><span>' . __( '<b>Proof-of-Consent</b> Storage (complies with GDPR Art.30)', 'cookie-notice' ) . '</span></li>
|
239 |
+
<li><span>' . __( "Link to <b>'Do Not Sell'</b> page (supports CCPA Sec.1798)", 'cookie-notice' ) . '</span></li>
|
240 |
+
<li><span>' . __( 'Enhanced design controls and options', 'cookie-notice' ) . '</span></li>
|
241 |
+
<li><span>' . __( 'Multiple new banner positions', 'cookie-notice' ) . '</span></li>
|
242 |
+
<li><span>' . __( 'Custom language localization', 'cookie-notice' ) . '</span></li>
|
243 |
+
</ul>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>';
|
249 |
+
} elseif ( $screen == 4 ) {
|
250 |
+
$html .= $this->welcome_screen( 'success', false );
|
251 |
+
|
252 |
+
$html .= '
|
253 |
+
<div class="cn-content cn-sidebar-visible">
|
254 |
+
<div class="cn-inner">
|
255 |
+
<div class="cn-content-full">
|
256 |
+
<h1><b>' . __( 'Welcome', 'cookie-notice' ) . '</b></h1>
|
257 |
+
<h2>' . __( 'You are now Promoting Privacy', 'cookie-notice' ) . '</h2>
|
258 |
+
<div class="cn-lead">
|
259 |
+
<p>' . __( 'Log into the Cookie Compliance™ web application and continue configuring your Privacy Experience.', 'cookie-notice' ) . '</p>
|
260 |
+
</div>
|
261 |
+
<div class="cn-buttons">
|
262 |
+
<a href="' . $this->app_login_url . '" class="cn-btn cn-btn-lg" target="_blank">' . __( 'Go to Application', 'cookie-notice' ) . '</a>
|
263 |
+
</div>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
</div>';
|
267 |
+
}
|
268 |
+
|
269 |
+
$html .= '
|
270 |
+
</div>';
|
271 |
+
// sidebar screens
|
272 |
+
} elseif ( in_array( $screen, $sidebars ) ) {
|
273 |
+
$html = '';
|
274 |
+
|
275 |
+
if ( $screen === 'about' ) {
|
276 |
+
|
277 |
+
$theme = wp_get_theme();
|
278 |
+
|
279 |
+
$html .= '
|
280 |
+
<div class="cn-sidebar cn-sidebar-left has-loader">
|
281 |
+
<div class="cn-inner">
|
282 |
+
<div class="cn-header">
|
283 |
+
<div class="cn-top-bar">
|
284 |
+
<div class="cn-logo"><img src="' . $logo_url . '"></div>
|
285 |
+
</div>
|
286 |
+
</div>
|
287 |
+
<div class="cn-body">
|
288 |
+
<h2>' . __( 'GDPR & CCPA Upgrade Ready', 'cookie-notice' ) . '</h2>
|
289 |
+
<div class="cn-lead"><p><b>' . __( 'Simulate Cookie Compliance™ on your site.', 'cookie-notice' ) . '</b></p><p>' . __( 'Click below to see what the next generation of Cookie Notice looks like running on your website.', 'cookie-notice' ) . '</p></div>
|
290 |
+
<div id="cn_preview_about">
|
291 |
+
<p>' . __( 'Site URL', 'cookie-notice' ) . ': <b>' . home_url() . '</b></p>
|
292 |
+
<p>' . __( 'Site Name', 'cookie-notice' ) . ': <b>' . get_bloginfo( 'name' ) . '</b></p>
|
293 |
+
</div>
|
294 |
+
' // <div id="cn_preview_frame"><img src=" ' . esc_url( $theme->get_screenshot() ) . '" /></div>
|
295 |
+
. '<div id="cn_preview_frame"><div id="cn_preview_frame_wrapper"><iframe id="cn_iframe_id" src="' . home_url( '/?cn_preview_mode=0' ) . '" scrolling="no" frameborder="0"></iframe></div></div>
|
296 |
+
<div class="cn-buttons">
|
297 |
+
<button type="button" class="cn-btn cn-btn-lg cn-screen-button" data-screen="2"><span class="cn-spinner"></span>' . __( 'Launch Live Demo', 'cookie-notice' ) . '</button>
|
298 |
+
</div>
|
299 |
+
</div>';
|
300 |
+
} elseif ( $screen === 'configure' ) {
|
301 |
+
$html .= '
|
302 |
+
<div class="cn-sidebar cn-sidebar-left has-loader cn-theme-light">
|
303 |
+
<div class="cn-inner">
|
304 |
+
<div class="cn-header">
|
305 |
+
<div class="cn-top-bar">
|
306 |
+
<div class="cn-logo"><img src="' . $logo_url . '"></div>
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
<div class="cn-body">
|
310 |
+
<h2>' . __( 'Compliance Live Demo', 'cookie-notice' ) . '</h2>
|
311 |
+
<div class="cn-lead"><p>' . __( 'Simulate the upgraded Cookie Compliance™ design and compliance features through the options below. Click Save & Upgrade to create your Cookie Compliance™ account.', 'cookie-notice' ) . '</p></div>
|
312 |
+
<form id="cn-form-configure" class="cn-form" action="" data-action="configure">
|
313 |
+
<div class="cn-accordion">
|
314 |
+
<div class="cn-accordion-item cn-form-container">
|
315 |
+
<div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Banner Compliance', 'cookie-notice' ) . '</button></div>
|
316 |
+
<div class="cn-accordion-collapse cn-form">
|
317 |
+
<div class="cn-form-feedback cn-hidden"></div>' .
|
318 |
+
/*
|
319 |
+
<div class="cn-field cn-field-select">
|
320 |
+
<label for="cn_location">' . __( 'What is the location of your business/organization?', 'cookie-notice' ) . '</label>
|
321 |
+
<div class="cn-select-wrapper">
|
322 |
+
<select id="cn_location" name="cn_location">
|
323 |
+
<option value="0">' . __( 'Select location', 'cookie-notice' ) . '</option>';
|
324 |
+
|
325 |
+
foreach ( Cookie_Notice()->settings->countries as $country_code => $country_name ) {
|
326 |
+
$html .= '<option value="' . $country_code . '">' . $country_name . '</option>';
|
327 |
+
}
|
328 |
+
|
329 |
+
$html .= '
|
330 |
+
</select>
|
331 |
+
</div>
|
332 |
+
</div>
|
333 |
+
*/
|
334 |
+
'
|
335 |
+
<div id="cn_laws" class="cn-field cn-field-checkbox">
|
336 |
+
<label>' . __( 'Select the laws that apply to your business', 'cookie-notice' ) . ':</label>
|
337 |
+
<div class="cn-checkbox-image-wrapper">
|
338 |
+
<label for="cn_laws_gdpr"><input id="cn_laws_gdpr" type="checkbox" name="cn_laws" value="gdpr" title="' . __( 'GDPR', 'cookie-notice' ) . '" checked><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC/ElEQVRoge2ZzZGjMBCFmcMet4rjHjlsANQmsGRgZ7BkMGRgZ7DOYMhgnME4A08GdgZ2AujbA41HiD8JEOawXUWVXUjd73WLVqsVBB4F+OlTv3cBciB7Ng4nAV6ADHjnSz6A7bOxPQQIh94Dd43AaSFodgKkFmNOGoHEYvwySw1IgJtFFHJgC6RD4GTJnedF2jQSAUfNqzfgMFFnAnxqOi9CvNc5UwzG1CWaQede03f1Bl6MhZqxz5l0Jot97BKBRH5nc3hLCETyO52qr1LqL4wjxWm5Akd/UMaJfOzdjpUs8xvYyXp8k//RcjA7Mf01MMVdE3IjyxyfvZyMLIVEIuoarGcZJhqOgY14bJITqO8VSd/AqobZy6T2UPUbi5RSH0op9EeW5igiguVAWZ50YxKvhRoZJ4MC/maCr56iKN5GEgi139EYHVailDpqYHMgKYpir5S6a5FIvQGYIuL9B3jjXapFYnUpOgiCIAC2mpcT872+lJ4Ab1hkqfQRuHslIB9wNHa+BYHrHAToOprKJuacJSgPLH+M1HmRtLkDdkqp95aU+tqb09tthcC5No/moeLcybKpMO5KmZbPydLON3HwzagSflQD9BIid/BI4gD2OpaA2DIbBan+8qC9sD5cOxD4FADZWAJir72kkAjE8sxN4FEGF0WRT4xAVtl1/X6sCQCZlpH6wDtHYHbpIFDVUskA+HUSUEqd9eKrB/xqCVQkNmb+X4SAy8fhmEYnEbDGJanKavDCBPoPWJSnsIvk2BvlAbr3RAaEssZPYx6blN2BK2obGFGX/bBf/EsLrm7SlL3J5k73ZMGmVS9MT5Qt8T0rulGhLHViyso3sZ20uvbif1kiKl5tuFSqI/WH+Gq78HUR4dytc7CRS86fLwo078YQQ5HFXKtLEOq3NMP53lVaNpPIcs4Fy0YB9S70LNdXpgGqjW5g3AvNlvgd+DUwb6vZmHT72aY8rtY+WgN4YI5+fh3cFPUNynqz8inUt//V7OpWAnwHNuZvH/IPPeDD9c6V9FUAAAAASUVORK5CYII=" width="24" height="24"><span>' . __( 'GDPR', 'cookie-notice' ) . '</span></label>
|
339 |
+
<label for="cn_laws_ccpa"><input id="cn_laws_ccpa" type="checkbox" name="cn_laws" value="ccpa" title="' . __( 'CCPA', 'cookie-notice' ) . '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAACPElEQVRYheXYvXHbMBTAcY7AEbSA79Smskp30QiqkyLaQPQE8Qb2BtEG4QZil3Ry5ZZaAO/vAqANIwSJD1LmXXD3ToVE8sf3hEcQRVEUBXADfE+Mu2LOAVSkj/q/xj0sGVcvEgeUGTAvDlgBP4CD+Vyl4HaZuNa9WRH5JSK4oZT6CZQxuN+ZOBzYqQ9mxSkYmAuzcUqpyoE0InIUkWcng1UoLresWFlrOwCwczLa2EAispczWzvcxs5YzzXWDm4bistpwk1RfCypr2yppc3BVUvDXYAtsO7OsSRcbY5bAbfArYicrYu36Ob7Fj297wx8Ncf7JwewScGJSD3S00LjOJa9p0/E1SHlDQWm4rqmHI+LAKbgGsx/y23IMbiQVUos7g2G04yjcOYEObga2InIxQNrc3FjK2MvDtP7DOQYAIvGlcBzYub+WRKNwOJw5oRDvW8Ih4icImDxOHNiX3nHcF0GDwGwZJyvvCG4aZuwB9i31lsMbu/DAXsD9IZS6kEpVQ0FoQvPHlxfaU/jR15peGbuGf3mlhqHKYF95c0dj1MCY5ZV1wUy/uT4dOB2BtykwDmyNw0QOM6EyweS9547L/AKOID7VNwcLcUdf1Jxa3T27MjaDOoZL0m4AXRJ3uZ3Pg69p9fy/pxssVYW6GdxbrvJwjXoUnZh40oTFXrT53q4EXiNtYltkCkTaDoc71v734B9z/ex7WdSXHfxzcBvYsbfKXHlECwAd0H/JZ7MjX6ZDBcy0DPYBmyHbugVe8KbbhsHbZ0AAAAASUVORK5CYII=" width="24" height="24"><span>' . __( 'CCPA', 'cookie-notice' ) . '</span></label>
|
340 |
+
</div>
|
341 |
+
</div>
|
342 |
+
<div id="cn_purposes" class="cn-field cn-field-checkbox">
|
343 |
+
<label>' . __( 'What kind of services is your site using? Check all that apply', 'cookie-notice' ) . ':</label>
|
344 |
+
<div class="cn-checkbox-wrapper">
|
345 |
+
<label for="cn_purposes_functional"><input id="cn_purposes_functional" type="checkbox" name="cn_purposes" value="1" checked><span>' . __( 'I use personalization services on my site', 'cookie-notice' ) . '</span></label>
|
346 |
+
<label for="cn_purposes_analytics"><input id="cn_purposes_analytics" type="checkbox" name="cn_purposes" value="2"><span>' . __( 'I collect and analyse information about my website’s traffic', 'cookie-notice' ) . '</span></label>
|
347 |
+
<label for="cn_purposes_marketing"><input id="cn_purposes_marketing" type="checkbox" name="cn_purposes" value="3"><span>' . __( 'I run targeted ads on my site using, for example, Google Adsense', 'cookie-notice' ) . '</span></label>
|
348 |
+
</div>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
</div>
|
352 |
+
<div class="cn-accordion-item cn-form-container cn-collapsed">
|
353 |
+
<div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Banner Design', 'cookie-notice' ) . '</button></div>
|
354 |
+
<div class="cn-accordion-collapse cn-form">
|
355 |
+
<div class="cn-form-feedback cn-hidden"></div>
|
356 |
+
<div class="cn-field cn-field-radio-image">
|
357 |
+
<label>' . __( 'Select your preferred display position', 'cookie-notice' ) . ':</label>
|
358 |
+
<div class="cn-radio-image-wrapper">
|
359 |
+
<label for="cn_position_bottom"><input id="cn_position_bottom" type="radio" name="cn_position" value="bottom" title="' . __( 'Bottom', 'cookie-notice' ) . '" checked><img src="' . plugins_url( '../img/layout-bottom.png', __FILE__ ) . '" width="24" height="24"></label>
|
360 |
+
<label for="cn_position_top"><input id="cn_position_top" type="radio" name="cn_position" value="top" title="' . __( 'Top', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-top.png', __FILE__ ) . '" width="24" height="24"></label>
|
361 |
+
<label for="cn_position_left"><input id="cn_position_left" type="radio" name="cn_position" value="left" title="' . __( 'Left', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-left.png', __FILE__ ) . '" width="24" height="24"></label>
|
362 |
+
<label for="cn_position_right"><input id="cn_position_right" type="radio" name="cn_position" value="right" title="' . __( 'Right', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-right.png', __FILE__ ) . '" width="24" height="24"></label>
|
363 |
+
<label for="cn_position_center"><input id="cn_position_center" type="radio" name="cn_position" value="center" title="' . __( 'Center', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-center.png', __FILE__ ) . '" width="24" height="24"></label>
|
364 |
+
</div>
|
365 |
+
</div>
|
366 |
+
<div class="cn-field cn-fieldset">
|
367 |
+
<label>' . __( 'Adjust the banner color scheme', 'cookie-notice' ) . ':</label>
|
368 |
+
<div class="cn-checkbox-wrapper cn-color-picker-wrapper">
|
369 |
+
<label for="cn_color_primary"><input id="cn_color_primary" class="cn-color-picker" type="checkbox" name="cn_color_primary" value="#20c19e"><span>' . __( 'Color of the buttons and interactive elements.', 'cookie-notice' ) . '</span></label>
|
370 |
+
<label for="cn_color_background"><input id="cn_color_background" class="cn-color-picker" type="checkbox" name="cn_color_background" value="#32323a"><span>' . __( 'Color of the banner background.', 'cookie-notice' ) . '</span></label>
|
371 |
+
<label for="cn_color_border"><input id="cn_color_border" class="cn-color-picker" type="checkbox" name="cn_color_border" value="#86858b"><span>' . __( 'Color of the borders and inactive elements.', 'cookie-notice' ) . '</span></label>
|
372 |
+
<label for="cn_color_text"><input id="cn_color_text" class="cn-color-picker" type="checkbox" name="cn_color_text" value="#ffffff"><span>' . __( 'Color of the body text.', 'cookie-notice' ) . '</span></label>
|
373 |
+
<label for="cn_color_heading"><input id="cn_color_heading" class="cn-color-picker" type="checkbox" name="cn_color_heading" value="#86858b"><span>' . __( 'Color of the heading text.', 'cookie-notice' ) . '</span></label>
|
374 |
+
<label for="cn_color_button_text"><input id="cn_color_button_text" class="cn-color-picker" type="checkbox" name="cn_color_button_text" value="#ffffff"><span>' . __( 'Color of the button text.', 'cookie-notice' ) . '</span></label>
|
375 |
+
</div>
|
376 |
+
</div>
|
377 |
+
</div>
|
378 |
+
</div>
|
379 |
+
</div>
|
380 |
+
<div class="cn-field cn-field-submit cn-nav">
|
381 |
+
<button type="button" class="cn-btn cn-screen-button" data-screen="3"><span class="cn-spinner"></span>' . __( 'Add Compliance', 'cookie-notice' ) . '</button>
|
382 |
+
</div>';
|
383 |
+
|
384 |
+
$html .= wp_nonce_field( 'cn_api_configure', 'cn_nonce', true, false );
|
385 |
+
|
386 |
+
$html .= '
|
387 |
+
</form>
|
388 |
+
</div>';
|
389 |
+
} elseif ( $screen === 'register' ) {
|
390 |
+
$html .= '
|
391 |
+
<div class="cn-sidebar cn-sidebar-left has-loader">
|
392 |
+
<div class="cn-inner">
|
393 |
+
<div class="cn-header">
|
394 |
+
<div class="cn-top-bar">
|
395 |
+
<div class="cn-logo"><img src="' . $logo_url . '"></div>
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
<div class="cn-body">
|
399 |
+
<h2>' . __( 'GDPR & CCPA Upgrade Ready', 'cookie-notice' ) . '</h2>
|
400 |
+
<div class="cn-lead">
|
401 |
+
<p>' . __( 'Create an account to start using Cooking Compliance™ - The next generation of Cookie Notice.', 'cookie-notice' ) . '</p>
|
402 |
+
</div>
|
403 |
+
<div class="cn-accordion">
|
404 |
+
<div id="cn-accordion-account" class="cn-accordion-item cn-form-container">
|
405 |
+
<div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Compliance Account', 'cookie-notice' ) . '</button></div>
|
406 |
+
<div class="cn-accordion-collapse">
|
407 |
+
<form class="cn-form" action="" data-action="register">
|
408 |
+
<div class="cn-form-feedback cn-hidden"></div>
|
409 |
+
<div class="cn-field cn-field-text">
|
410 |
+
<input type="text" name="email" value="" tabindex="1" placeholder="' . __( 'Email address', 'cookie-notice' ) . '">
|
411 |
+
</div>
|
412 |
+
<div class="cn-field cn-field-text">
|
413 |
+
<input type="password" name="pass" value="" tabindex="2" autocomplete="off" placeholder="' . __( 'Password', 'cookie-notice' ) . '">
|
414 |
+
</div>
|
415 |
+
<div class="cn-field cn-field-text">
|
416 |
+
<input type="password" name="pass2" value="" tabindex="3" autocomplete="off" placeholder="' . __( 'Confirm Password', 'cookie-notice' ) . '">
|
417 |
+
</div>
|
418 |
+
<div class="cn-field cn-field-checkbox">
|
419 |
+
<div class="cn-checkbox-wrapper">
|
420 |
+
<label for="cn_terms"><input id="cn_terms" type="checkbox" name="terms" value="1"><span>' . __( 'I have read and agree to the', 'cookie-notice' ) . ' <a href="https://hu-manity.co/cookiecompliance-terms/" target="_blank">' . __( 'Terms of Service', 'cookie-notice' ) . '</a></span></label>
|
421 |
+
</div>
|
422 |
+
</div>
|
423 |
+
<div class="cn-field cn-field-submit cn-nav">
|
424 |
+
<button type="submit" class="cn-btn cn-screen-button" tabindex="4" ' . /* data-screen="3" */ '><span class="cn-spinner"></span>' . __( 'Sign Up', 'cookie-notice' ) . '</button>
|
425 |
+
</div>';
|
426 |
+
|
427 |
+
// get site language
|
428 |
+
$locale = get_locale();
|
429 |
+
$locale_code = explode( '_', $locale );
|
430 |
+
|
431 |
+
$html .= '
|
432 |
+
<input type="hidden" name="language" value="' . $locale_code[0] . '" />';
|
433 |
+
|
434 |
+
$html .= wp_nonce_field( 'cn_api_register', 'cn_nonce', true, false );
|
435 |
+
|
436 |
+
$html .= '
|
437 |
+
</form>
|
438 |
+
<p>' . __( 'Already have an account? <a href="#" class="cn-screen-button" data-screen="login">Sign in</a>', 'cookie-notice' ) . '</p>
|
439 |
+
</div>
|
440 |
+
</div>
|
441 |
+
<div id="cn-accordion-billing" class="cn-accordion-item cn-form-container cn-collapsed cn-disabled">
|
442 |
+
<div class="cn-accordion-header cn-form-header">
|
443 |
+
<button class="cn-accordion-button" type="button">' . __( 'Compliance Plan', 'cookie-notice' ) . '</button>
|
444 |
+
</div>
|
445 |
+
<form class="cn-accordion-collapse cn-form" action="" data-action="payment">
|
446 |
+
<div class="cn-form-feedback cn-hidden"></div>
|
447 |
+
<div class="cn-field cn-field-radio">
|
448 |
+
<div class="cn-radio-wrapper cn-plan-wrapper">
|
449 |
+
<label for="cn_field_plan_monthly"><input id="cn_field_plan_monthly" type="radio" name="plan" value="compliance_monthly" checked><span><span class="cn-plan-description">Bill monthly</span><span class="cn-plan-price">$14.95<span class="cn-plan-period">' . __( '/mo', 'cookie-notice' ) . '</span></span><span class="cn-plan-overlay"></span></span></label>
|
450 |
+
<label for="cn_field_plan_yearly"><input id="cn_field_plan_yearly" type="radio" name="plan" value="compliance_yearly"><span><span class="cn-plan-description">Bill yearly <span class="cn-price-off">(15% off)</span></span><span class="cn-plan-price">$149.50<span class="cn-plan-period">' . __( '/yr', 'cookie-notice' ) . '</span></span><span class="cn-plan-overlay"></span></span></label>
|
451 |
+
</div>
|
452 |
+
</div>
|
453 |
+
<div class="cn-field cn-field-radio">
|
454 |
+
<label>' . __( 'Payment Method', 'cookie-notice' ) . '</label>
|
455 |
+
<div class="cn-radio-wrapper cn-horizontal-wrapper">
|
456 |
+
<label for="cn_field_method_credit_card"><input id="cn_field_method_credit_card" type="radio" name="method" value="credit_card" checked><span>' . __( 'Credit Card', 'cookie-notice' ) . '</span></label>
|
457 |
+
<label for="cn_field_method_paypal"><input id="cn_field_method_paypal" type="radio" name="method" value="paypal"><span>' . __( 'PayPal', 'cookie-notice' ) . '</span></label>
|
458 |
+
</div>
|
459 |
+
</div>
|
460 |
+
<div class="cn-fieldset" id="cn_payment_method_credit_card">
|
461 |
+
<input type="hidden" name="payment_nonce" value="" />
|
462 |
+
<div class="cn-field cn-field-text">
|
463 |
+
<label for="cn_card_number">' . __( 'Card Number', 'cookie-notice' ) . '</label>
|
464 |
+
<div id="cn_card_number"></div>
|
465 |
+
</div>
|
466 |
+
<div class="cn-field cn-field-text cn-field-half cn-field-first">
|
467 |
+
<label for="cn_expiration_date">' . __( 'Expiration Date', 'cookie-notice' ) . '</label>
|
468 |
+
<div id="cn_expiration_date"></div>
|
469 |
+
</div>
|
470 |
+
<div class="cn-field cn-field-text cn-field-half cn-field-last">
|
471 |
+
<label for="cn_cvv">' . __( 'CVC/CVV', 'cookie-notice' ) . '</label>
|
472 |
+
<div id="cn_cvv"></div>
|
473 |
+
</div>
|
474 |
+
<div class="cn-field cn-field-submit cn-nav">
|
475 |
+
<button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Subscribe', 'cookie-notice' ) . '</button>
|
476 |
+
</div>
|
477 |
+
</div>
|
478 |
+
<div class="cn-fieldset" id="cn_payment_method_paypal" style="display: none;">
|
479 |
+
<div id="cn_paypal_button"></div>
|
480 |
+
</div>';
|
481 |
+
|
482 |
+
$html .= wp_nonce_field( 'cn_api_payment', 'cn_payment_nonce', true, false );
|
483 |
+
|
484 |
+
$html .= '
|
485 |
+
</form>
|
486 |
+
</div>
|
487 |
+
</div>
|
488 |
+
</div>';
|
489 |
+
} elseif ( $screen === 'login' ) {
|
490 |
+
$html .= '
|
491 |
+
<div class="cn-sidebar cn-sidebar-left has-loader">
|
492 |
+
<div class="cn-inner">
|
493 |
+
<div class="cn-header">
|
494 |
+
<div class="cn-top-bar">
|
495 |
+
<div class="cn-logo"><img src="' . $logo_url . '"></div>
|
496 |
+
</div>
|
497 |
+
</div>
|
498 |
+
<div class="cn-body">
|
499 |
+
<h2>' . __( 'Compliance Sign in', 'cookie-notice' ) . '</h2>
|
500 |
+
<div class="cn-lead">
|
501 |
+
<p>' . __( 'Sign in to your existing Cooking Compliance™ account to upgrade this website.', 'cookie-notice' ) . '</p>
|
502 |
+
</div>
|
503 |
+
<div class="cn-accordion">
|
504 |
+
<div id="cn-accordion-account" class="cn-accordion-item cn-form-container">
|
505 |
+
<div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Compliance Account', 'cookie-notice' ) . '</button></div>
|
506 |
+
<div class="cn-accordion-collapse">
|
507 |
+
<form class="cn-form" action="" data-action="login">
|
508 |
+
<div class="cn-form-feedback cn-hidden"></div>
|
509 |
+
<div class="cn-field cn-field-text">
|
510 |
+
<input type="text" name="email" value="" tabindex="1" placeholder="' . __( 'Email address', 'cookie-notice' ) . '">
|
511 |
+
</div>
|
512 |
+
<div class="cn-field cn-field-text">
|
513 |
+
<input type="password" name="pass" value="" tabindex="2" autocomplete="off" placeholder="' . __( 'Password', 'cookie-notice' ) . '">
|
514 |
+
</div>
|
515 |
+
<div class="cn-field cn-field-submit cn-nav">
|
516 |
+
<button type="submit" class="cn-btn cn-screen-button" tabindex="4" ' . /* data-screen="4" */ '><span class="cn-spinner"></span>' . __( 'Sign in', 'cookie-notice' ) . '</button>
|
517 |
+
</div>';
|
518 |
+
|
519 |
+
// get site language
|
520 |
+
$locale = get_locale();
|
521 |
+
$locale_code = explode( '_', $locale );
|
522 |
+
|
523 |
+
$html .= '
|
524 |
+
<input type="hidden" name="language" value="' . $locale_code[0] . '" />';
|
525 |
+
|
526 |
+
$html .= wp_nonce_field( 'cn_api_login', 'cn_nonce', true, false );
|
527 |
+
|
528 |
+
$html .= '
|
529 |
+
</form>
|
530 |
+
<p>' . __( 'Don\'t have an account yet? <a href="#" class="cn-screen-button" data-screen="register">Sign up</a>', 'cookie-notice' ) . '</p>
|
531 |
+
</div>
|
532 |
+
</div>
|
533 |
+
<div id="cn-accordion-billing" class="cn-accordion-item cn-form-container cn-collapsed cn-disabled">
|
534 |
+
<div class="cn-accordion-header cn-form-header">
|
535 |
+
<button class="cn-accordion-button" type="button">' . __( 'Compliance Plan', 'cookie-notice' ) . '</button>
|
536 |
+
</div>
|
537 |
+
<form class="cn-accordion-collapse cn-form" action="" data-action="payment">
|
538 |
+
<div class="cn-form-feedback cn-hidden"></div>
|
539 |
+
<div class="cn-field cn-field-radio">
|
540 |
+
<div class="cn-radio-wrapper cn-plan-wrapper">
|
541 |
+
<label for="cn_field_plan_monthly"><input id="cn_field_plan_monthly" type="radio" name="plan" value="compliance_monthly" checked><span><span class="cn-plan-description">Bill monthly</span><span class="cn-plan-price">$14.95<span class="cn-plan-period">' . __( '/mo', 'cookie-notice' ) . '</span></span><span class="cn-plan-overlay"></span></span></label>
|
542 |
+
<label for="cn_field_plan_yearly"><input id="cn_field_plan_yearly" type="radio" name="plan" value="compliance_yearly"><span><span class="cn-plan-description">Bill yearly <span class="cn-price-off">-(15% off)</span></span><span class="cn-plan-price">$149.50<span class="cn-plan-period">' . __( '/yr', 'cookie-notice' ) . '</span></span><span class="cn-plan-overlay"></span></span></label>
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
+
<div class="cn-field cn-field-radio">
|
546 |
+
<label>' . __( 'Payment Method', 'cookie-notice' ) . '</label>
|
547 |
+
<div class="cn-radio-wrapper cn-horizontal-wrapper">
|
548 |
+
<label for="cn_field_method_credit_card"><input id="cn_field_method_credit_card" type="radio" name="method" value="credit_card" checked><span>' . __( 'Credit Card', 'cookie-notice' ) . '</span></label>
|
549 |
+
<label for="cn_field_method_paypal"><input id="cn_field_method_paypal" type="radio" name="method" value="paypal"><span>' . __( 'PayPal', 'cookie-notice' ) . '</span></label>
|
550 |
+
</div>
|
551 |
+
</div>
|
552 |
+
<div class="cn-fieldset" id="cn_payment_method_credit_card">
|
553 |
+
<input type="hidden" name="payment_nonce" value="" />
|
554 |
+
<div class="cn-field cn-field-text">
|
555 |
+
<label for="cn_card_number">' . __( 'Card Number', 'cookie-notice' ) . '</label>
|
556 |
+
<div id="cn_card_number"></div>
|
557 |
+
</div>
|
558 |
+
<div class="cn-field cn-field-text cn-field-half cn-field-first">
|
559 |
+
<label for="cn_expiration_date">' . __( 'Expiration Date', 'cookie-notice' ) . '</label>
|
560 |
+
<div id="cn_expiration_date"></div>
|
561 |
+
</div>
|
562 |
+
<div class="cn-field cn-field-text cn-field-half cn-field-last">
|
563 |
+
<label for="cn_cvv">' . __( 'CVC/CVV', 'cookie-notice' ) . '</label>
|
564 |
+
<div id="cn_cvv"></div>
|
565 |
+
</div>
|
566 |
+
<div class="cn-field cn-field-submit cn-nav">
|
567 |
+
<button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Subscribe', 'cookie-notice' ) . '</button>
|
568 |
+
</div>
|
569 |
+
</div>
|
570 |
+
<div class="cn-fieldset" id="cn_payment_method_paypal" style="display: none;">
|
571 |
+
<div id="cn_paypal_button"></div>
|
572 |
+
</div>';
|
573 |
+
|
574 |
+
$html .= wp_nonce_field( 'cn_api_payment', 'cn_payment_nonce', true, false );
|
575 |
+
|
576 |
+
$html .= '
|
577 |
+
</form>
|
578 |
+
</div>
|
579 |
+
</div>
|
580 |
+
</div>';
|
581 |
+
} elseif ( $screen === 'success' ) {
|
582 |
+
$html .= '
|
583 |
+
<div class="cn-sidebar cn-sidebar-left has-loader">
|
584 |
+
<div class="cn-inner">
|
585 |
+
<div class="cn-header">
|
586 |
+
<div class="cn-top-bar">
|
587 |
+
<div class="cn-logo"><img src="' . $logo_url . '"></div>
|
588 |
+
</div>
|
589 |
+
</div>
|
590 |
+
<div class="cn-body">
|
591 |
+
<h2>' . __( 'Success!', 'cookie-notice' ) . '</h2>
|
592 |
+
<div class="cn-lead"><p><b>' . __( 'You have successfully upgraded your website to Cookie Compliance™', 'cookie-notice' ) . '</b></p><p>' . sprintf( __( 'Go to Cookie Compliance™ application now. Or access it anytime from your <a href="%s">Cookie Notice settings page</a>.', 'cookie-notice' ), esc_url( admin_url( 'options-general.php?page=cookie-notice' ) ) ) . '</p></div>
|
593 |
+
</div>';
|
594 |
+
}
|
595 |
+
|
596 |
+
$html .= '
|
597 |
+
<div class="cn-footer">';
|
598 |
+
|
599 |
+
switch ( $screen ) {
|
600 |
+
case 'about':
|
601 |
+
$html .= '<a href="' . esc_url( admin_url( 'options-general.php?page=cookie-notice' ) ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'Remind me later', 'cookie-notice' ) . '</a>';
|
602 |
+
break;
|
603 |
+
case 'success':
|
604 |
+
$html .= '<a href="' . esc_url( get_dashboard_url() ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'WordPress Dashboard', 'cookie-notice' ) . '</a>';
|
605 |
+
break;
|
606 |
+
default:
|
607 |
+
$html .= '<a href="' . esc_url( admin_url( 'options-general.php?page=cookie-notice' ) ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'Skip for now', 'cookie-notice' ) . '</a>';
|
608 |
+
break;
|
609 |
+
}
|
610 |
+
|
611 |
+
$html .= '
|
612 |
+
</div>
|
613 |
+
</div>
|
614 |
+
</div>';
|
615 |
+
|
616 |
+
}
|
617 |
+
|
618 |
+
if ( $echo )
|
619 |
+
echo $html;
|
620 |
+
else
|
621 |
+
return $html;
|
622 |
+
|
623 |
+
if ( $is_ajax )
|
624 |
+
exit();
|
625 |
+
}
|
626 |
+
}
|
js/admin-notice.js
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
-
( function
|
2 |
-
|
|
|
|
|
3 |
// Save dismiss state
|
4 |
-
$( '.cn-notice.is-dismissible' ).on( 'click', '.notice-dismiss, .cn-notice-dismiss', function
|
5 |
-
if ( $( e.currentTarget ).hasClass( 'cn-approve' ) )
|
6 |
var notice_action = 'approve';
|
7 |
-
|
8 |
var notice_action = 'delay';
|
9 |
-
|
10 |
var notice_action = 'dismiss';
|
11 |
-
}
|
12 |
|
13 |
$.ajax( {
|
14 |
url: cnArgsNotice.ajaxUrl,
|
@@ -24,4 +25,5 @@
|
|
24 |
$( e.delegateTarget ).slideUp( 'fast' );
|
25 |
} );
|
26 |
} );
|
|
|
27 |
} )( jQuery );
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
// ready event
|
4 |
+
$( function() {
|
5 |
// Save dismiss state
|
6 |
+
$( '.cn-notice.is-dismissible' ).on( 'click', '.notice-dismiss, .cn-notice-dismiss', function( e ) {
|
7 |
+
if ( $( e.currentTarget ).hasClass( 'cn-approve' ) )
|
8 |
var notice_action = 'approve';
|
9 |
+
else if ( $( e.currentTarget ).hasClass( 'cn-delay' ) )
|
10 |
var notice_action = 'delay';
|
11 |
+
else
|
12 |
var notice_action = 'dismiss';
|
|
|
13 |
|
14 |
$.ajax( {
|
15 |
url: cnArgsNotice.ajaxUrl,
|
25 |
$( e.delegateTarget ).slideUp( 'fast' );
|
26 |
} );
|
27 |
} );
|
28 |
+
|
29 |
} )( jQuery );
|
js/admin-welcome.js
ADDED
@@ -0,0 +1,521 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
// ready event
|
4 |
+
$( function() {
|
5 |
+
var btClient = false;
|
6 |
+
var btCreditCardsInitialized = false;
|
7 |
+
var btPayPalInitialized = false;
|
8 |
+
|
9 |
+
var btInit = function() {
|
10 |
+
var result = btInitToken();
|
11 |
+
|
12 |
+
if ( result !== false && btCreditCardsInitialized === false ) {
|
13 |
+
// AJAX was successful
|
14 |
+
result.done( function( response ) {
|
15 |
+
// token received
|
16 |
+
try {
|
17 |
+
// parse response
|
18 |
+
data = JSON.parse( response );
|
19 |
+
|
20 |
+
// first step, init braintree client
|
21 |
+
btClient = braintree.client.create( {
|
22 |
+
authorization: data.token
|
23 |
+
} );
|
24 |
+
|
25 |
+
btInitPaymentMethod( 'credit_card' );
|
26 |
+
// token failed
|
27 |
+
} catch( e ) {
|
28 |
+
btGatewayFail( 'btInit catch' );
|
29 |
+
}
|
30 |
+
// AJAX failed
|
31 |
+
} ).fail( function() {
|
32 |
+
btGatewayFail( 'btInit AJAX failed' );
|
33 |
+
} );
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
var btInitToken = function() {
|
38 |
+
// payment screen?
|
39 |
+
var payment = $( '.cn-sidebar form[data-action="payment"]' );
|
40 |
+
|
41 |
+
// init braintree
|
42 |
+
if ( payment.length ) {
|
43 |
+
payment.addClass( 'cn-form-disabled' );
|
44 |
+
|
45 |
+
if ( typeof braintree !== 'undefined' ) {
|
46 |
+
return $.ajax( {
|
47 |
+
url: cnArgs.ajaxURL,
|
48 |
+
type: 'POST',
|
49 |
+
dataType: 'html',
|
50 |
+
data: {
|
51 |
+
action: 'cn_api_request',
|
52 |
+
request: 'get_bt_init_token',
|
53 |
+
nonce: cnArgs.nonce
|
54 |
+
}
|
55 |
+
} );
|
56 |
+
} else
|
57 |
+
return false;
|
58 |
+
} else
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
|
62 |
+
var btInitPaymentMethod = function( type ) {
|
63 |
+
console.log( 'btInitPaymentMethod' );
|
64 |
+
|
65 |
+
if ( btClient !== false ) {
|
66 |
+
if ( type === 'credit_card' && btCreditCardsInitialized === false ) {
|
67 |
+
$( 'form.cn-form[data-action="payment"]' ).addClass( 'cn-form-disabled' );
|
68 |
+
|
69 |
+
btClient.then( btCreditCardsInit ).then( btHostedFieldsInstance ).catch( btGatewayFail );
|
70 |
+
} else if ( type === 'paypal' && btPayPalInitialized === false ) {
|
71 |
+
$( 'form.cn-form[data-action="payment"]' ).addClass( 'cn-form-disabled' );
|
72 |
+
|
73 |
+
btClient.then( btPaypalCheckoutInit ).then( btPaypalCheckoutSDK ).then( btPaypalCheckoutInstance ).then( btPaypalCheckoutButton ).catch( btGatewayFail );
|
74 |
+
}
|
75 |
+
} else
|
76 |
+
btGatewayFail( 'btInitPaymentMethod btClient is false' );
|
77 |
+
}
|
78 |
+
|
79 |
+
var btCreditCardsInit = function( clientInstance ) {
|
80 |
+
console.log( 'btCreditCardsInit' );
|
81 |
+
return braintree.hostedFields.create( {
|
82 |
+
client: clientInstance,
|
83 |
+
styles: {
|
84 |
+
'input': {
|
85 |
+
'font-size': '14px',
|
86 |
+
'font-family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
|
87 |
+
'color': '#fff'
|
88 |
+
},
|
89 |
+
':focus': {
|
90 |
+
'color': '#fff'
|
91 |
+
},
|
92 |
+
"::placeholder": {
|
93 |
+
'color': '#aaa'
|
94 |
+
}
|
95 |
+
},
|
96 |
+
fields: {
|
97 |
+
number: {
|
98 |
+
'selector': '#cn_card_number',
|
99 |
+
'placeholder': '0000 0000 0000 0000'
|
100 |
+
},
|
101 |
+
expirationDate: {
|
102 |
+
'selector': '#cn_expiration_date',
|
103 |
+
'placeholder': 'MM / YY'
|
104 |
+
},
|
105 |
+
cvv: {
|
106 |
+
'selector': '#cn_cvv',
|
107 |
+
'placeholder': '123'
|
108 |
+
}
|
109 |
+
}
|
110 |
+
} );
|
111 |
+
}
|
112 |
+
|
113 |
+
var btHostedFieldsInstance = function( hostedFieldsInstance ) {
|
114 |
+
console.log( 'btHostedFieldsInstance' );
|
115 |
+
btCreditCardsInitialized = true;
|
116 |
+
|
117 |
+
var form = $( 'form.cn-form[data-action="payment"]' );
|
118 |
+
|
119 |
+
form.removeClass( 'cn-form-disabled' );
|
120 |
+
|
121 |
+
form.on( 'submit', function() {
|
122 |
+
if ( form.hasClass( 'cn-payment-in-progress' ) )
|
123 |
+
return false;
|
124 |
+
|
125 |
+
form.find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
|
126 |
+
|
127 |
+
// spin the spinner, if exists
|
128 |
+
if ( form.find( '.cn-spinner' ).length )
|
129 |
+
form.find( '.cn-spinner' ).addClass( 'spin' );
|
130 |
+
|
131 |
+
var invalidForm = false;
|
132 |
+
var state = hostedFieldsInstance.getState();
|
133 |
+
|
134 |
+
// check hosted fields
|
135 |
+
Object.keys( state.fields ).forEach( function( field ) {
|
136 |
+
if ( ! state.fields[field].isValid ) {
|
137 |
+
$( state.fields[field].container ).addClass( 'braintree-hosted-fields-invalid' );
|
138 |
+
|
139 |
+
invalidForm = true;
|
140 |
+
}
|
141 |
+
} );
|
142 |
+
|
143 |
+
if ( invalidForm ) {
|
144 |
+
setTimeout( function() {
|
145 |
+
cnDisplayError( cnArgs.invalidFields, form );
|
146 |
+
|
147 |
+
// spin the spinner, if exists
|
148 |
+
if ( form.find( '.cn-spinner' ).length )
|
149 |
+
form.find( '.cn-spinner' ).removeClass( 'spin' );
|
150 |
+
}, 500 );
|
151 |
+
|
152 |
+
return false;
|
153 |
+
}
|
154 |
+
|
155 |
+
hostedFieldsInstance.tokenize( function( err, payload ) {
|
156 |
+
if ( err ) {
|
157 |
+
cnDisplayError( cnArgs.error );
|
158 |
+
|
159 |
+
return false;
|
160 |
+
} else {
|
161 |
+
form.addClass( 'cn-payment-in-progress' );
|
162 |
+
form.find( 'input[name="payment_nonce"]' ).val( payload.nonce );
|
163 |
+
|
164 |
+
$( document ).find( '.cn-screen-button[data-screen="4"]' ).trigger( 'click' );
|
165 |
+
}
|
166 |
+
} );
|
167 |
+
|
168 |
+
return false;
|
169 |
+
} );
|
170 |
+
}
|
171 |
+
|
172 |
+
var btPaypalCheckoutInit = function( clientInstance ) {
|
173 |
+
console.log( 'btPaypalCheckoutInit' );
|
174 |
+
return braintree.paypalCheckout.create( {
|
175 |
+
client: clientInstance
|
176 |
+
} );
|
177 |
+
}
|
178 |
+
|
179 |
+
var btPaypalCheckoutSDK = function( paypalCheckoutInstance ) {
|
180 |
+
console.log( 'btPaypalCheckoutSDK' );
|
181 |
+
return paypalCheckoutInstance.loadPayPalSDK( {
|
182 |
+
vault: true,
|
183 |
+
intent: 'tokenize'
|
184 |
+
} );
|
185 |
+
}
|
186 |
+
|
187 |
+
var btPaypalCheckoutInstance = function( paypalCheckoutInstance ) {
|
188 |
+
console.log( 'btPaypalCheckoutInstance' );
|
189 |
+
var form = $( 'form.cn-form[data-action="payment"]' );
|
190 |
+
|
191 |
+
return paypal.Buttons( {
|
192 |
+
fundingSource: paypal.FUNDING.PAYPAL,
|
193 |
+
createBillingAgreement: function() {
|
194 |
+
console.log( 'createBillingAgreement' );
|
195 |
+
form.addClass( 'cn-form-disabled' );
|
196 |
+
|
197 |
+
return paypalCheckoutInstance.createPayment( {
|
198 |
+
flow: 'vault',
|
199 |
+
intent: 'tokenize',
|
200 |
+
currency: 'EUR'
|
201 |
+
} );
|
202 |
+
},
|
203 |
+
onApprove: function( data, actions ) {
|
204 |
+
console.log( 'onApprove' );
|
205 |
+
return paypalCheckoutInstance.tokenizePayment( data ).then( function( payload ) {
|
206 |
+
form.addClass( 'cn-payment-in-progress' );
|
207 |
+
form.find( 'input[name="payment_nonce"]' ).val( payload.nonce );
|
208 |
+
|
209 |
+
$( document ).find( '.cn-screen-button[data-screen="4"]' ).trigger( 'click' );
|
210 |
+
} );
|
211 |
+
},
|
212 |
+
onCancel: function( data ) {
|
213 |
+
console.log( 'onCancel' );
|
214 |
+
form.removeClass( 'cn-form-disabled' );
|
215 |
+
},
|
216 |
+
onError: function( err ) {
|
217 |
+
console.log( 'onError' );
|
218 |
+
form.removeClass( 'cn-form-disabled' );
|
219 |
+
}
|
220 |
+
} ).render( '#cn_paypal_button' );
|
221 |
+
}
|
222 |
+
|
223 |
+
var btPaypalCheckoutButton = function() {
|
224 |
+
console.log( 'btPaypalCheckoutButton' );
|
225 |
+
btPayPalInitialized = true;
|
226 |
+
|
227 |
+
$( 'form.cn-form[data-action="payment"]' ).removeClass( 'cn-form-disabled' );
|
228 |
+
}
|
229 |
+
|
230 |
+
var btGatewayFail = function( error ) {
|
231 |
+
console.log( 'btGatewayFail' );
|
232 |
+
|
233 |
+
if ( typeof error !== 'undefined' )
|
234 |
+
console.log( error );
|
235 |
+
|
236 |
+
cnDisplayError( cnArgs.error );
|
237 |
+
}
|
238 |
+
|
239 |
+
var cnDisplayError = function( message, form ) {
|
240 |
+
if ( typeof form === 'undefined' )
|
241 |
+
form = $( 'form.cn-form[data-action="payment"]' );
|
242 |
+
|
243 |
+
form.find( '.cn-form-feedback' ).html( '<p class="cn-error">' + message + '</p>' ).removeClass( 'cn-hidden' );
|
244 |
+
}
|
245 |
+
|
246 |
+
var cnWelcomeScreen = function( e ) {
|
247 |
+
var screen = $( e.target ).data( 'screen' );
|
248 |
+
var steps = [1,2,3,4];
|
249 |
+
var sidebars = ['login', 'register', 'configure', 'payment'];
|
250 |
+
|
251 |
+
// continue with screen loading
|
252 |
+
var requestData = {
|
253 |
+
action: 'cn_welcome_screen',
|
254 |
+
nonce: cnArgs.nonce
|
255 |
+
};
|
256 |
+
|
257 |
+
if ( $.inArray( screen, steps ) != -1 ) {
|
258 |
+
var container = $( '.cn-welcome-wrap' );
|
259 |
+
|
260 |
+
requestData.screen = screen;
|
261 |
+
} else if ( $.inArray( screen, sidebars ) != -1 ) {
|
262 |
+
var container = $( '.cn-sidebar' );
|
263 |
+
|
264 |
+
requestData.screen = screen;
|
265 |
+
} else
|
266 |
+
return false;
|
267 |
+
|
268 |
+
// add loading overlay
|
269 |
+
$( container ).addClass( 'cn-loading' );
|
270 |
+
|
271 |
+
$.ajax( {
|
272 |
+
url: cnArgs.ajaxURL,
|
273 |
+
type: 'POST',
|
274 |
+
dataType: 'html',
|
275 |
+
data: requestData
|
276 |
+
} ).done( function( response ) {
|
277 |
+
$( container ).replaceWith( response );
|
278 |
+
} ).fail( function( jqXHR, textStatus, errorThrown ) {
|
279 |
+
//
|
280 |
+
} ).always( function( response ) {
|
281 |
+
// remove spinner
|
282 |
+
$( container ).removeClass( 'cn-loading' );
|
283 |
+
|
284 |
+
// trigger event
|
285 |
+
var event = $.Event( 'screen-loaded' );
|
286 |
+
|
287 |
+
$( document ).trigger( event );
|
288 |
+
} );
|
289 |
+
|
290 |
+
return this;
|
291 |
+
};
|
292 |
+
|
293 |
+
var cnWelcomeForm = function( form ) {
|
294 |
+
var formAction = $( form[0] ).data( 'action' );
|
295 |
+
var formResult = null;
|
296 |
+
var formData = {
|
297 |
+
action: 'cn_api_request',
|
298 |
+
nonce: cnArgs.nonce
|
299 |
+
};
|
300 |
+
|
301 |
+
// clear feedback
|
302 |
+
$( form[0] ).find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
|
303 |
+
|
304 |
+
// build request data
|
305 |
+
formData.request = formAction;
|
306 |
+
|
307 |
+
// convert form data to object
|
308 |
+
$( form[0] ).serializeArray().map( function( x ) {
|
309 |
+
// exception for checkboxes
|
310 |
+
if ( x.name === 'cn_laws' ) {
|
311 |
+
var arrayVal = typeof formData[x.name] !== 'undefined' ? formData[x.name] : [];
|
312 |
+
|
313 |
+
arrayVal.push( x.value );
|
314 |
+
|
315 |
+
formData[x.name] = arrayVal;
|
316 |
+
} else {
|
317 |
+
formData[x.name] = x.value;
|
318 |
+
}
|
319 |
+
} );
|
320 |
+
|
321 |
+
formResult = $.ajax( {
|
322 |
+
url: cnArgs.ajaxURL,
|
323 |
+
type: 'POST',
|
324 |
+
dataType: 'json',
|
325 |
+
data: formData
|
326 |
+
} );
|
327 |
+
|
328 |
+
return formResult;
|
329 |
+
};
|
330 |
+
|
331 |
+
// handle screen loading
|
332 |
+
$( document ).on( 'click', '.cn-screen-button', function( e ) {
|
333 |
+
var form = $( e.target ).closest( 'form' );
|
334 |
+
var result = false;
|
335 |
+
|
336 |
+
// payment?
|
337 |
+
if ( form.data( 'action' ) === 'payment' && form.find( 'input[name="payment_nonce"]' ).val() === '' )
|
338 |
+
return true;
|
339 |
+
else
|
340 |
+
e.preventDefault();
|
341 |
+
|
342 |
+
// spin the spinner, if exists
|
343 |
+
if ( $( e.target ).find( '.cn-spinner' ).length )
|
344 |
+
$( e.target ).find( '.cn-spinner' ).addClass( 'spin' );
|
345 |
+
|
346 |
+
// get form and process it if exists
|
347 |
+
if ( form.length === 1 ) {
|
348 |
+
result = cnWelcomeForm( form );
|
349 |
+
|
350 |
+
result.done( function( response ) {
|
351 |
+
// error
|
352 |
+
if ( response.hasOwnProperty( 'error' ) ) {
|
353 |
+
cnDisplayError( response.error, $( form[0] ) );
|
354 |
+
// message
|
355 |
+
} else if ( response.hasOwnProperty( 'message' ) ) {
|
356 |
+
cnDisplayError( response.message, $( form[0] ) );
|
357 |
+
// all good
|
358 |
+
} else {
|
359 |
+
// register complete, go to billing
|
360 |
+
if ( form.data( 'action' ) === 'register' || form.data( 'action' ) === 'login' ) {
|
361 |
+
var accordionItem = $( form[0] ).closest( '.cn-accordion-item' );
|
362 |
+
|
363 |
+
// collapse account
|
364 |
+
$( accordionItem ).addClass( 'cn-collapsed cn-disabled' );
|
365 |
+
|
366 |
+
// show billing
|
367 |
+
$( accordionItem ).next().removeClass( 'cn-collapsed cn-disabled' );
|
368 |
+
|
369 |
+
// init braintree after payment screen is loaded via AJAX
|
370 |
+
btInit();
|
371 |
+
}
|
372 |
+
|
373 |
+
cnWelcomeScreen( e );
|
374 |
+
}
|
375 |
+
} );
|
376 |
+
|
377 |
+
result.always( function( response ) {
|
378 |
+
if ( $( e.target ).find( '.cn-spinner' ).length )
|
379 |
+
$( e.target ).find( '.cn-spinner' ).removeClass( 'spin' );
|
380 |
+
|
381 |
+
// after invalid payment?
|
382 |
+
if ( form.data( 'action' ) === 'payment' ) {
|
383 |
+
form.removeClass( 'cn-payment-in-progress' );
|
384 |
+
form.find( 'input[name="payment_nonce"]' ).val( '' );
|
385 |
+
}
|
386 |
+
} );
|
387 |
+
} else
|
388 |
+
result = cnWelcomeScreen( e );
|
389 |
+
|
390 |
+
return result;
|
391 |
+
} );
|
392 |
+
|
393 |
+
//
|
394 |
+
$( document ).on( 'screen-loaded', function() {
|
395 |
+
var configureFields = $( '#cn-form-configure' ).serializeArray() || [];
|
396 |
+
var frame = window.frames[ 'cn_iframe_id' ];
|
397 |
+
|
398 |
+
if ( configureFields.length > 0 ) {
|
399 |
+
$( configureFields ).each( function( index, field ) {
|
400 |
+
} );
|
401 |
+
}
|
402 |
+
} );
|
403 |
+
|
404 |
+
// change payment method
|
405 |
+
$( document ).on( 'change', 'input[name="method"]', function() {
|
406 |
+
var input = $( this );
|
407 |
+
|
408 |
+
$( '#cn_payment_method_credit_card, #cn_payment_method_paypal' ).toggle();
|
409 |
+
|
410 |
+
input.closest( 'form' ).find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
|
411 |
+
|
412 |
+
// init payment method if needed
|
413 |
+
btInitPaymentMethod( input.val() );
|
414 |
+
} );
|
415 |
+
|
416 |
+
//
|
417 |
+
$( document ).on( 'click', '.cn-accordion > .cn-accordion-item .cn-accordion-button', function() {
|
418 |
+
var accordionItem = $( this ).closest( '.cn-accordion-item' );
|
419 |
+
var activeItem = $( this ).closest( '.cn-accordion' ).find( '.cn-accordion-item:not(.cn-collapsed)' );
|
420 |
+
|
421 |
+
if ( $( accordionItem ).hasClass( 'cn-collapsed' ) ) {
|
422 |
+
$( activeItem ).addClass( 'cn-collapsed' );
|
423 |
+
$( accordionItem ).removeClass( 'cn-collapsed' );
|
424 |
+
}
|
425 |
+
|
426 |
+
return false;
|
427 |
+
} );
|
428 |
+
|
429 |
+
// live preview
|
430 |
+
$( document ).on( 'change', 'input[name="cn_position"]', function() {
|
431 |
+
var val = $( this ).val();
|
432 |
+
var frame = window.frames['cn_iframe_id'];
|
433 |
+
|
434 |
+
frame.contentWindow.postMessage( { call: 'position', value: val } );
|
435 |
+
} );
|
436 |
+
|
437 |
+
$( document ).on( 'change', 'input[name="cn_purposes"]', function() {
|
438 |
+
var val = [];
|
439 |
+
|
440 |
+
$( 'input[name="cn_purposes"]:checked' ).each( function() {
|
441 |
+
val.push( $( this ).val() );
|
442 |
+
} );
|
443 |
+
|
444 |
+
var frame = window.frames['cn_iframe_id'];
|
445 |
+
|
446 |
+
frame.contentWindow.postMessage( { call: 'purposes', value: val } );
|
447 |
+
} );
|
448 |
+
|
449 |
+
$( document ).on( 'change', 'input[name="cn_laws"]', function() {
|
450 |
+
var val = [];
|
451 |
+
|
452 |
+
$( 'input[name="cn_laws"]:checked' ).each( function() {
|
453 |
+
val.push( $( this ).val() );
|
454 |
+
} );
|
455 |
+
|
456 |
+
var frame = window.frames['cn_iframe_id'];
|
457 |
+
|
458 |
+
frame.contentWindow.postMessage( { call: 'laws', value: val } );
|
459 |
+
} );
|
460 |
+
|
461 |
+
$( document ).on( 'change', 'input[name="cn_color_primary"]', function() {
|
462 |
+
var val = $( this ).val();
|
463 |
+
var frame = window.frames['cn_iframe_id'];
|
464 |
+
|
465 |
+
frame.contentWindow.postMessage( { call: 'color_primary', value: val } );
|
466 |
+
} );
|
467 |
+
|
468 |
+
$( document ).on( 'change', 'input[name="cn_color_background"]', function() {
|
469 |
+
var val = $( this ).val();
|
470 |
+
var frame = window.frames['cn_iframe_id'];
|
471 |
+
|
472 |
+
frame.contentWindow.postMessage( { call: 'color_background', value: val } );
|
473 |
+
} );
|
474 |
+
|
475 |
+
$( document ).on( 'change', 'input[name="cn_color_border"]', function() {
|
476 |
+
var val = $( this ).val();
|
477 |
+
var frame = window.frames['cn_iframe_id'];
|
478 |
+
|
479 |
+
frame.contentWindow.postMessage( { call: 'color_border', value: val } );
|
480 |
+
} );
|
481 |
+
|
482 |
+
$( document ).on( 'change', 'input[name="cn_color_text"]', function() {
|
483 |
+
var val = $( this ).val();
|
484 |
+
var frame = window.frames['cn_iframe_id'];
|
485 |
+
|
486 |
+
frame.contentWindow.postMessage( { call: 'color_text', value: val } );
|
487 |
+
} );
|
488 |
+
|
489 |
+
$( document ).on( 'change', 'input[name="cn_color_heading"]', function() {
|
490 |
+
var val = $( this ).val();
|
491 |
+
var frame = window.frames['cn_iframe_id'];
|
492 |
+
|
493 |
+
frame.contentWindow.postMessage( { call: 'color_heading', value: val } );
|
494 |
+
} );
|
495 |
+
|
496 |
+
$( document ).on( 'change', 'input[name="cn_color_button_text"]', function() {
|
497 |
+
var val = $( this ).val();
|
498 |
+
var frame = window.frames['cn_iframe_id'];
|
499 |
+
|
500 |
+
frame.contentWindow.postMessage( { call: 'color_button_text', value: val } );
|
501 |
+
} );
|
502 |
+
|
503 |
+
// color picker
|
504 |
+
initSpectrum();
|
505 |
+
} );
|
506 |
+
|
507 |
+
$( document ).on( 'ajaxComplete', function() {
|
508 |
+
// color picker
|
509 |
+
initSpectrum();
|
510 |
+
} );
|
511 |
+
|
512 |
+
function initSpectrum() {
|
513 |
+
$( '.cn-color-picker' ).spectrum( {
|
514 |
+
showInput: true,
|
515 |
+
showInitial: true,
|
516 |
+
allowEmpty: false,
|
517 |
+
showAlpha: false
|
518 |
+
} );
|
519 |
+
}
|
520 |
+
|
521 |
+
} )( jQuery );
|
js/admin.js
CHANGED
@@ -1,11 +1,36 @@
|
|
1 |
-
( function
|
2 |
|
3 |
-
|
|
|
4 |
// initialize color picker
|
5 |
$( '.cn_color' ).wpColorPicker();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
// refuse option
|
8 |
-
$( '#cn_refuse_opt' ).
|
9 |
if ( $( this ).is( ':checked' ) )
|
10 |
$( '#cn_refuse_opt_container' ).slideDown( 'fast' );
|
11 |
else
|
@@ -13,7 +38,7 @@
|
|
13 |
} );
|
14 |
|
15 |
// revoke option
|
16 |
-
$( '#cn_revoke_cookies' ).
|
17 |
if ( $( this ).is( ':checked' ) )
|
18 |
$( '#cn_revoke_opt_container' ).slideDown( 'fast' );
|
19 |
else
|
@@ -21,7 +46,7 @@
|
|
21 |
} );
|
22 |
|
23 |
// privacy policy option
|
24 |
-
$( '#cn_see_more' ).
|
25 |
if ( $( this ).is( ':checked' ) )
|
26 |
$( '#cn_see_more_opt' ).slideDown( 'fast' );
|
27 |
else
|
@@ -29,35 +54,27 @@
|
|
29 |
} );
|
30 |
|
31 |
// on scroll option
|
32 |
-
$( '#cn_on_scroll' ).
|
33 |
if ( $( this ).is( ':checked' ) )
|
34 |
$( '#cn_on_scroll_offset' ).slideDown( 'fast' );
|
35 |
else
|
36 |
$( '#cn_on_scroll_offset' ).slideUp( 'fast' );
|
37 |
} );
|
38 |
-
|
39 |
-
// coronabar text string option
|
40 |
-
$( '#cn_coronabar_texts' ).change( function () {
|
41 |
-
if ( $( this ).is( ':checked' ) )
|
42 |
-
$( '#cn_coronabar_text_strings' ).slideDown( 'fast' );
|
43 |
-
else
|
44 |
-
$( '#cn_coronabar_text_strings' ).slideUp( 'fast' );
|
45 |
-
} );
|
46 |
|
47 |
// privacy policy link
|
48 |
-
$( '#cn_see_more_link-custom, #cn_see_more_link-page' ).
|
49 |
if ( $( '#cn_see_more_link-custom:checked' ).val() === 'custom' ) {
|
50 |
-
$( '#cn_see_more_opt_page' ).slideUp( 'fast', function
|
51 |
$( '#cn_see_more_opt_link' ).slideDown( 'fast' );
|
52 |
} );
|
53 |
} else if ( $( '#cn_see_more_link-page:checked' ).val() === 'page' ) {
|
54 |
-
$( '#cn_see_more_opt_link' ).slideUp( 'fast', function
|
55 |
$( '#cn_see_more_opt_page' ).slideDown( 'fast' );
|
56 |
} );
|
57 |
}
|
58 |
} );
|
59 |
|
60 |
-
$( '#cn_refuse_code_fields' ).find( 'a' ).
|
61 |
e.preventDefault();
|
62 |
|
63 |
$( '#cn_refuse_code_fields' ).find( 'a' ).removeClass( 'nav-tab-active' );
|
@@ -70,7 +87,7 @@
|
|
70 |
} );
|
71 |
} );
|
72 |
|
73 |
-
$( document ).on( 'click', 'input#reset_cookie_notice_options', function
|
74 |
return confirm( cnArgs.resetToDefaults );
|
75 |
} );
|
76 |
|
1 |
+
( function( $ ) {
|
2 |
|
3 |
+
// ready event
|
4 |
+
$( function() {
|
5 |
// initialize color picker
|
6 |
$( '.cn_color' ).wpColorPicker();
|
7 |
+
|
8 |
+
$( '#cn_app_purge_cache a' ).on( 'click', function( e ) {
|
9 |
+
e.preventDefault();
|
10 |
+
|
11 |
+
var el = this;
|
12 |
+
|
13 |
+
$( el ).parent().addClass( 'loading' ).append( '<span class="spinner is-active" style="float: none;"></span>' );
|
14 |
+
|
15 |
+
$.ajax( {
|
16 |
+
url: cnArgs.ajaxUrl,
|
17 |
+
type: 'POST',
|
18 |
+
dataType: 'json',
|
19 |
+
data: {
|
20 |
+
action: 'cn_purge_cache',
|
21 |
+
nonce: cnArgs.nonce
|
22 |
+
}
|
23 |
+
} )
|
24 |
+
.done ( function ( result ) {
|
25 |
+
console.log( result );
|
26 |
+
} )
|
27 |
+
.always ( function ( result ) {
|
28 |
+
$( el ).parent().find( '.spinner' ).remove();
|
29 |
+
} );
|
30 |
+
} );
|
31 |
|
32 |
// refuse option
|
33 |
+
$( '#cn_refuse_opt' ).on( 'change', function() {
|
34 |
if ( $( this ).is( ':checked' ) )
|
35 |
$( '#cn_refuse_opt_container' ).slideDown( 'fast' );
|
36 |
else
|
38 |
} );
|
39 |
|
40 |
// revoke option
|
41 |
+
$( '#cn_revoke_cookies' ).on( 'change', function() {
|
42 |
if ( $( this ).is( ':checked' ) )
|
43 |
$( '#cn_revoke_opt_container' ).slideDown( 'fast' );
|
44 |
else
|
46 |
} );
|
47 |
|
48 |
// privacy policy option
|
49 |
+
$( '#cn_see_more' ).on( 'change', function() {
|
50 |
if ( $( this ).is( ':checked' ) )
|
51 |
$( '#cn_see_more_opt' ).slideDown( 'fast' );
|
52 |
else
|
54 |
} );
|
55 |
|
56 |
// on scroll option
|
57 |
+
$( '#cn_on_scroll' ).on( 'change', function() {
|
58 |
if ( $( this ).is( ':checked' ) )
|
59 |
$( '#cn_on_scroll_offset' ).slideDown( 'fast' );
|
60 |
else
|
61 |
$( '#cn_on_scroll_offset' ).slideUp( 'fast' );
|
62 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
// privacy policy link
|
65 |
+
$( '#cn_see_more_link-custom, #cn_see_more_link-page' ).on( 'change', function() {
|
66 |
if ( $( '#cn_see_more_link-custom:checked' ).val() === 'custom' ) {
|
67 |
+
$( '#cn_see_more_opt_page' ).slideUp( 'fast', function() {
|
68 |
$( '#cn_see_more_opt_link' ).slideDown( 'fast' );
|
69 |
} );
|
70 |
} else if ( $( '#cn_see_more_link-page:checked' ).val() === 'page' ) {
|
71 |
+
$( '#cn_see_more_opt_link' ).slideUp( 'fast', function() {
|
72 |
$( '#cn_see_more_opt_page' ).slideDown( 'fast' );
|
73 |
} );
|
74 |
}
|
75 |
} );
|
76 |
|
77 |
+
$( '#cn_refuse_code_fields' ).find( 'a' ).on( 'click', function( e ) {
|
78 |
e.preventDefault();
|
79 |
|
80 |
$( '#cn_refuse_code_fields' ).find( 'a' ).removeClass( 'nav-tab-active' );
|
87 |
} );
|
88 |
} );
|
89 |
|
90 |
+
$( document ).on( 'click', 'input#reset_cookie_notice_options', function() {
|
91 |
return confirm( cnArgs.resetToDefaults );
|
92 |
} );
|
93 |
|
js/admin.min.js
CHANGED
@@ -1 +1,94 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
// ready event
|
4 |
+
$( function() {
|
5 |
+
// initialize color picker
|
6 |
+
$( '.cn_color' ).wpColorPicker();
|
7 |
+
|
8 |
+
$( '#cn_app_purge_cache a' ).on( 'click', function( e ) {
|
9 |
+
e.preventDefault();
|
10 |
+
|
11 |
+
var el = this;
|
12 |
+
|
13 |
+
$( el ).parent().addClass( 'loading' ).append( '<span class="spinner is-active" style="float: none;"></span>' );
|
14 |
+
|
15 |
+
$.ajax( {
|
16 |
+
url: cnArgs.ajaxUrl,
|
17 |
+
type: 'POST',
|
18 |
+
dataType: 'json',
|
19 |
+
data: {
|
20 |
+
action: 'cn_purge_cache',
|
21 |
+
nonce: cnArgs.nonce
|
22 |
+
}
|
23 |
+
} )
|
24 |
+
.done ( function ( result ) {
|
25 |
+
console.log( result );
|
26 |
+
} )
|
27 |
+
.always ( function ( result ) {
|
28 |
+
$( el ).parent().find( '.spinner' ).remove();
|
29 |
+
} );
|
30 |
+
} );
|
31 |
+
|
32 |
+
// refuse option
|
33 |
+
$( '#cn_refuse_opt' ).on( 'change', function() {
|
34 |
+
if ( $( this ).is( ':checked' ) )
|
35 |
+
$( '#cn_refuse_opt_container' ).slideDown( 'fast' );
|
36 |
+
else
|
37 |
+
$( '#cn_refuse_opt_container' ).slideUp( 'fast' );
|
38 |
+
} );
|
39 |
+
|
40 |
+
// revoke option
|
41 |
+
$( '#cn_revoke_cookies' ).on( 'change', function() {
|
42 |
+
if ( $( this ).is( ':checked' ) )
|
43 |
+
$( '#cn_revoke_opt_container' ).slideDown( 'fast' );
|
44 |
+
else
|
45 |
+
$( '#cn_revoke_opt_container' ).slideUp( 'fast' );
|
46 |
+
} );
|
47 |
+
|
48 |
+
// privacy policy option
|
49 |
+
$( '#cn_see_more' ).on( 'change', function() {
|
50 |
+
if ( $( this ).is( ':checked' ) )
|
51 |
+
$( '#cn_see_more_opt' ).slideDown( 'fast' );
|
52 |
+
else
|
53 |
+
$( '#cn_see_more_opt' ).slideUp( 'fast' );
|
54 |
+
} );
|
55 |
+
|
56 |
+
// on scroll option
|
57 |
+
$( '#cn_on_scroll' ).on( 'change', function() {
|
58 |
+
if ( $( this ).is( ':checked' ) )
|
59 |
+
$( '#cn_on_scroll_offset' ).slideDown( 'fast' );
|
60 |
+
else
|
61 |
+
$( '#cn_on_scroll_offset' ).slideUp( 'fast' );
|
62 |
+
} );
|
63 |
+
|
64 |
+
// privacy policy link
|
65 |
+
$( '#cn_see_more_link-custom, #cn_see_more_link-page' ).on( 'change', function() {
|
66 |
+
if ( $( '#cn_see_more_link-custom:checked' ).val() === 'custom' ) {
|
67 |
+
$( '#cn_see_more_opt_page' ).slideUp( 'fast', function() {
|
68 |
+
$( '#cn_see_more_opt_link' ).slideDown( 'fast' );
|
69 |
+
} );
|
70 |
+
} else if ( $( '#cn_see_more_link-page:checked' ).val() === 'page' ) {
|
71 |
+
$( '#cn_see_more_opt_link' ).slideUp( 'fast', function() {
|
72 |
+
$( '#cn_see_more_opt_page' ).slideDown( 'fast' );
|
73 |
+
} );
|
74 |
+
}
|
75 |
+
} );
|
76 |
+
|
77 |
+
$( '#cn_refuse_code_fields' ).find( 'a' ).on( 'click', function( e ) {
|
78 |
+
e.preventDefault();
|
79 |
+
|
80 |
+
$( '#cn_refuse_code_fields' ).find( 'a' ).removeClass( 'nav-tab-active' );
|
81 |
+
$( '.refuse-code-tab' ).removeClass( 'active' );
|
82 |
+
|
83 |
+
var id = $( this ).attr( 'id' ).replace( '-tab', '' );
|
84 |
+
|
85 |
+
$( '#' + id ).addClass( 'active' );
|
86 |
+
$( this ).addClass( 'nav-tab-active' );
|
87 |
+
} );
|
88 |
+
} );
|
89 |
+
|
90 |
+
$( document ).on( 'click', 'input#reset_cookie_notice_options', function() {
|
91 |
+
return confirm( cnArgs.resetToDefaults );
|
92 |
+
} );
|
93 |
+
|
94 |
+
} )( jQuery );
|
js/front-compliance.js
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// cookieNotice
|
2 |
+
( function ( window, document, undefined ) {
|
3 |
+
|
4 |
+
var cookieCompliance = new function () {
|
5 |
+
|
6 |
+
// initialize
|
7 |
+
this.init = function () {
|
8 |
+
var _this = this;
|
9 |
+
|
10 |
+
// on save data
|
11 |
+
document.addEventListener( 'load-config.hu', function( event ) {
|
12 |
+
|
13 |
+
// console.log( event );
|
14 |
+
|
15 |
+
var config = event.detail;
|
16 |
+
|
17 |
+
if ( config !== null ) {
|
18 |
+
// alpha JS request // no jQuery
|
19 |
+
var request = new XMLHttpRequest();
|
20 |
+
|
21 |
+
request.open( 'POST', cnComplianceArgs.ajaxUrl, true );
|
22 |
+
request.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded;' );
|
23 |
+
request.onload = function () {
|
24 |
+
if ( this.status >= 200 && this.status < 400 ) {
|
25 |
+
// ff successful
|
26 |
+
} else {
|
27 |
+
// if fail
|
28 |
+
}
|
29 |
+
};
|
30 |
+
request.onerror = function () {
|
31 |
+
// connection error
|
32 |
+
};
|
33 |
+
request.send( 'action=cn_save_config&nonce=' + cnComplianceArgs.nonce + '&data=' + JSON.stringify( config ) );
|
34 |
+
}
|
35 |
+
|
36 |
+
} );
|
37 |
+
};
|
38 |
+
}
|
39 |
+
|
40 |
+
// initialize plugin
|
41 |
+
window.addEventListener( 'load', function () {
|
42 |
+
cookieCompliance.init();
|
43 |
+
}, false );
|
44 |
+
|
45 |
+
} )( window, document, undefined );
|
js/front-welcome.js
ADDED
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
// ready event
|
4 |
+
$( function() {
|
5 |
+
// listen for the reload
|
6 |
+
document.addEventListener( 'reload.hu', function( e ) {
|
7 |
+
var customOptions = { config: { dontSellLink: true, privacyPolicyLink: true } };
|
8 |
+
|
9 |
+
// set widget options
|
10 |
+
hu.setOptions( customOptions );
|
11 |
+
} );
|
12 |
+
|
13 |
+
// listen for the display
|
14 |
+
document.addEventListener( 'display.hu', function( e ) {
|
15 |
+
var val = [],
|
16 |
+
container = $( '#hu' ),
|
17 |
+
customOptions = { config: {} };
|
18 |
+
|
19 |
+
$( parent.document ).find( 'input[name="cn_laws"]:checked' ).each( function() {
|
20 |
+
val.push( $( this ).val() );
|
21 |
+
} );
|
22 |
+
|
23 |
+
if ( $.inArray( 'ccpa', val ) !== -1 ) {
|
24 |
+
$( container ).find( '#hu-notice-dontsell-container' ).css( 'display', 'block' );
|
25 |
+
|
26 |
+
$.extend( customOptions.config, { dontSellLink: true } );
|
27 |
+
} else {
|
28 |
+
$( container ).find( '#hu-notice-dontsell-container' ).css( 'display', 'none' );
|
29 |
+
|
30 |
+
$.extend( customOptions.config, { dontSellLink: false } );
|
31 |
+
}
|
32 |
+
if ( $.inArray( 'gdpr', val ) !== -1 ) {
|
33 |
+
$( container ).find( '#hu-notice-privacy-container' ).css( 'display', 'block' );
|
34 |
+
|
35 |
+
$.extend( customOptions.config, { privacyPolicyLink: true } );
|
36 |
+
} else {
|
37 |
+
$( container ).find( '#hu-notice-privacy-container' ).css( 'display', 'none' );
|
38 |
+
|
39 |
+
$.extend( customOptions.config, { privacyPolicyLink: false } );
|
40 |
+
}
|
41 |
+
|
42 |
+
// console.log( customOptions );
|
43 |
+
|
44 |
+
// set widget options
|
45 |
+
hu.setOptions( customOptions );
|
46 |
+
|
47 |
+
// console.log( hu.options );
|
48 |
+
} );
|
49 |
+
|
50 |
+
// listen for the parent
|
51 |
+
window.addEventListener( 'message', function( event ) {
|
52 |
+
var iframe = $( parent.document ).find( '#cn_iframe_id' ),
|
53 |
+
form = $( parent.document ).find( '#cn-form-configure' );
|
54 |
+
|
55 |
+
// console.log( iframe );
|
56 |
+
|
57 |
+
// add spinner
|
58 |
+
$( iframe ).closest( '.has-loader' ).addClass( 'cn-loading' ).append( '<span class="cn-spinner"></span>' );
|
59 |
+
// lock options
|
60 |
+
$( form ).addClass( 'cn-form-disabled' );
|
61 |
+
|
62 |
+
// emit loader
|
63 |
+
window.setTimeout( function() {
|
64 |
+
if ( typeof event.data == 'object' ) {
|
65 |
+
var container = $( '#hu' ),
|
66 |
+
option = event.data.call,
|
67 |
+
customOptions = {},
|
68 |
+
customTexts = {};
|
69 |
+
|
70 |
+
switch ( option ) {
|
71 |
+
case 'position':
|
72 |
+
$( container ).removeClass( 'hu-position-bottom hu-position-top hu-position-left hu-position-right hu-position-center' );
|
73 |
+
$( container ).addClass( 'hu-position-' + event.data.value );
|
74 |
+
|
75 |
+
customOptions = { design: { position: event.data.value } }
|
76 |
+
break;
|
77 |
+
case 'purposes':
|
78 |
+
// get last array item
|
79 |
+
var last = event.data.value.slice( -1 )[0],
|
80 |
+
message = cnFrontWelcome.cookieMessage[0];
|
81 |
+
|
82 |
+
if ( typeof last !== 'undefined' ) {
|
83 |
+
message = cnFrontWelcome.cookieMessage[parseInt( last )];
|
84 |
+
}
|
85 |
+
|
86 |
+
message += ' ' + cnFrontWelcome.preferencesMessage[0];
|
87 |
+
|
88 |
+
customTexts = { bodyText: message }
|
89 |
+
|
90 |
+
$( container ).find( '#hu-notice-message-container .hu-text-body' ).text( message );
|
91 |
+
break;
|
92 |
+
case 'laws':
|
93 |
+
customOptions.config = {}
|
94 |
+
|
95 |
+
if ( $.inArray( 'ccpa', event.data.value ) !== -1 ) {
|
96 |
+
$( container ).find( '#hu-notice-dontsell-container' ).css( 'display', 'block' );
|
97 |
+
|
98 |
+
$.extend( customOptions.config, { dontSellLink: true } );
|
99 |
+
} else {
|
100 |
+
$( container ).find( '#hu-notice-dontsell-container' ).css( 'display', 'none' );
|
101 |
+
|
102 |
+
$.extend( customOptions.config, { dontSellLink: false } );
|
103 |
+
}
|
104 |
+
if ( $.inArray( 'gdpr', event.data.value ) !== -1 ) {
|
105 |
+
$( container ).find( '#hu-notice-privacy-container' ).css( 'display', 'block' );
|
106 |
+
|
107 |
+
$.extend( customOptions.config, { privacyPolicyLink: true } );
|
108 |
+
} else {
|
109 |
+
$( container ).find( '#hu-notice-privacy-container' ).css( 'display', 'none' );
|
110 |
+
|
111 |
+
$.extend( customOptions.config, { privacyPolicyLink: false } );
|
112 |
+
}
|
113 |
+
|
114 |
+
// console.log( customOptions );
|
115 |
+
break;
|
116 |
+
case 'color_primary':
|
117 |
+
var iframeContents = $( iframe ).contents()[0];
|
118 |
+
iframeContents.documentElement.style.setProperty( '--hu-primaryColor', event.data.value );
|
119 |
+
customOptions = { design: { primaryColor: event.data.value } }
|
120 |
+
break;
|
121 |
+
|
122 |
+
case 'color_background':
|
123 |
+
var iframeContents = $( iframe ).contents()[0];
|
124 |
+
iframeContents.documentElement.style.setProperty( '--hu-bannerColor', event.data.value );
|
125 |
+
customOptions = { design: { bannerColor: event.data.value } }
|
126 |
+
break;
|
127 |
+
|
128 |
+
case 'color_border':
|
129 |
+
var iframeContents = $( iframe ).contents()[0];
|
130 |
+
iframeContents.documentElement.style.setProperty( '--hu-borderColor', event.data.value );
|
131 |
+
customOptions = { design: { borderColor: event.data.value } }
|
132 |
+
break;
|
133 |
+
|
134 |
+
case 'color_text':
|
135 |
+
var iframeContents = $( iframe ).contents()[0];
|
136 |
+
iframeContents.documentElement.style.setProperty( '--hu-textColor', event.data.value );
|
137 |
+
customOptions = { design: { textColor: event.data.value } }
|
138 |
+
break;
|
139 |
+
|
140 |
+
case 'color_heading':
|
141 |
+
var iframeContents = $( iframe ).contents()[0];
|
142 |
+
iframeContents.documentElement.style.setProperty( '--hu-headingColor', event.data.value );
|
143 |
+
customOptions = { design: { headingColor: event.data.value } }
|
144 |
+
break;
|
145 |
+
|
146 |
+
case 'color_button_text':
|
147 |
+
var iframeContents = $( iframe ).contents()[0];
|
148 |
+
iframeContents.documentElement.style.setProperty( '--hu-btnTextColor', event.data.value );
|
149 |
+
customOptions = { design: { btnTextColor: event.data.value } }
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
|
153 |
+
// set widget options
|
154 |
+
hu.setOptions( customOptions );
|
155 |
+
// set widget texts
|
156 |
+
hu.setTexts( customTexts );
|
157 |
+
|
158 |
+
// console.log( hu.options );
|
159 |
+
}
|
160 |
+
// remove spinner
|
161 |
+
$( iframe ).closest( '.has-loader' ).find( '.cn-spinner' ).remove();
|
162 |
+
$( iframe ).closest( '.has-loader' ).removeClass( 'cn-loading' );
|
163 |
+
// unlock options
|
164 |
+
$( form ).removeClass( 'cn-form-disabled' );
|
165 |
+
}, 500 );
|
166 |
+
|
167 |
+
}, false );
|
168 |
+
|
169 |
+
// is it iframe?
|
170 |
+
if ( document !== parent.document && typeof cnFrontWelcome !== 'undefined' && cnFrontWelcome.previewMode ) {
|
171 |
+
// $( parent.document ).find( '#cn_test' ).val( $( document ).find( '.site-title' ).text() );
|
172 |
+
var iframe = $( parent.document ).find( '#cn_iframe_id' );
|
173 |
+
|
174 |
+
// inject links into initial document
|
175 |
+
$( document.body ).find( 'a[href], area[href]' ).each( function() {
|
176 |
+
cnAddPreviewModeToLink( this, iframe );
|
177 |
+
} );
|
178 |
+
|
179 |
+
// inject links into initial document
|
180 |
+
$( document.body ).find( 'form' ).each( function() {
|
181 |
+
cnAddPreviewModeToForm( this, iframe );
|
182 |
+
} );
|
183 |
+
|
184 |
+
// inject links for new elements added to the page
|
185 |
+
if ( typeof MutationObserver !== 'undefined' ) {
|
186 |
+
var observer = new MutationObserver( function( mutations ) {
|
187 |
+
_.each( mutations, function( mutation ) {
|
188 |
+
$( mutation.target ).find( 'a[href], area[href]' ).each( function() {
|
189 |
+
cnAddPreviewModeToLink( this, iframe );
|
190 |
+
} );
|
191 |
+
|
192 |
+
$( mutation.target ).find( 'form' ).each( function() {
|
193 |
+
cnAddPreviewModeToForm( this, iframe );
|
194 |
+
} );
|
195 |
+
} );
|
196 |
+
} );
|
197 |
+
|
198 |
+
observer.observe( document.documentElement, {
|
199 |
+
childList: true,
|
200 |
+
subtree: true
|
201 |
+
} );
|
202 |
+
} else {
|
203 |
+
// If mutation observers aren't available, fallback to just-in-time injection.
|
204 |
+
$( document.documentElement ).on( 'click focus mouseover', 'a[href], area[href]', function() {
|
205 |
+
cnAddPreviewModeToLink( this, iframe );
|
206 |
+
} );
|
207 |
+
}
|
208 |
+
|
209 |
+
// remove spinner
|
210 |
+
$( iframe ).closest( '.has-loader' ).find( '.cn-spinner' ).remove();
|
211 |
+
$( iframe ).closest( '.has-loader' ).removeClass( 'cn-loading' );
|
212 |
+
}
|
213 |
+
} );
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Inject preview mode parameter into specific links on the frontend.
|
217 |
+
*/
|
218 |
+
function cnAddPreviewModeToLink( element, iframe ) {
|
219 |
+
var params, $element = $( element );
|
220 |
+
|
221 |
+
// skip elements with no href attribute
|
222 |
+
if ( ! element.hasAttribute( 'href' ) )
|
223 |
+
return;
|
224 |
+
|
225 |
+
// skip links in admin bar
|
226 |
+
if ( $element.closest( '#wpadminbar' ).length )
|
227 |
+
return;
|
228 |
+
|
229 |
+
// ignore links with href="#", href="#id", or non-HTTP protocols (e.g. javascript: and mailto:)
|
230 |
+
if ( '#' === $element.attr( 'href' ).substr( 0, 1 ) || ! /^https?:$/.test( element.protocol ) )
|
231 |
+
return;
|
232 |
+
|
233 |
+
// make sure links in preview use HTTPS if parent frame uses HTTPS.
|
234 |
+
// if ( api.settings.channel && 'https' === api.preview.scheme.get() && 'http:' === element.protocol && -1 !== api.settings.url.allowedHosts.indexOf( element.host ) )
|
235 |
+
// element.protocol = 'https:';
|
236 |
+
|
237 |
+
// ignore links with special class
|
238 |
+
if ( $element.hasClass( 'wp-playlist-caption' ) )
|
239 |
+
return;
|
240 |
+
|
241 |
+
// check special links
|
242 |
+
if ( ! cnIsLinkPreviewable( element ) )
|
243 |
+
return;
|
244 |
+
|
245 |
+
$( element ).on( 'click', function() {
|
246 |
+
$( iframe ).closest( '.has-loader' ).addClass( 'cn-loading' );
|
247 |
+
} );
|
248 |
+
|
249 |
+
// parse query string
|
250 |
+
params = cnParseQueryString( element.search.substring( 1 ) );
|
251 |
+
|
252 |
+
// set preview mode
|
253 |
+
params.cn_preview_mode = 1;
|
254 |
+
|
255 |
+
element.search = $.param( params );
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Inject preview mode parameter into specific forms on the frontend.
|
260 |
+
*/
|
261 |
+
function cnAddPreviewModeToForm( element, iframe ) {
|
262 |
+
var input = document.createElement( 'input' );
|
263 |
+
|
264 |
+
input.setAttribute( 'type', 'hidden' );
|
265 |
+
input.setAttribute( 'name', 'cn_preview_mode' );
|
266 |
+
input.setAttribute( 'value', 1 );
|
267 |
+
|
268 |
+
element.appendChild( input );
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Parse query string.
|
273 |
+
*/
|
274 |
+
function cnParseQueryString( string ) {
|
275 |
+
var params = {};
|
276 |
+
|
277 |
+
_.each( string.split( '&' ), function( pair ) {
|
278 |
+
var parts, key, value;
|
279 |
+
|
280 |
+
parts = pair.split( '=', 2 );
|
281 |
+
|
282 |
+
if ( ! parts[0] )
|
283 |
+
return;
|
284 |
+
|
285 |
+
key = decodeURIComponent( parts[0].replace( /\+/g, ' ' ) );
|
286 |
+
key = key.replace( / /g, '_' );
|
287 |
+
|
288 |
+
if ( _.isUndefined( parts[1] ) )
|
289 |
+
value = null;
|
290 |
+
else
|
291 |
+
value = decodeURIComponent( parts[1].replace( /\+/g, ' ' ) );
|
292 |
+
|
293 |
+
params[ key ] = value;
|
294 |
+
} );
|
295 |
+
|
296 |
+
return params;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Whether the supplied link is previewable.
|
301 |
+
*/
|
302 |
+
function cnIsLinkPreviewable( element ) {
|
303 |
+
var matchesAllowedUrl, parsedAllowedUrl, elementHost;
|
304 |
+
|
305 |
+
if ( 'javascript:' === element.protocol )
|
306 |
+
return true;
|
307 |
+
|
308 |
+
// only web URLs can be previewed
|
309 |
+
if ( element.protocol !== 'https:' && element.protocol !== 'http:' )
|
310 |
+
return false;
|
311 |
+
|
312 |
+
elementHost = element.host.replace( /:(80|443)$/, '' );
|
313 |
+
parsedAllowedUrl = document.createElement( 'a' );
|
314 |
+
matchesAllowedUrl = ! _.isUndefined( _.find( cnFrontWelcome.allowedURLs, function( allowedUrl ) {
|
315 |
+
parsedAllowedUrl.href = allowedUrl;
|
316 |
+
|
317 |
+
return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host.replace( /:(80|443)$/, '' ) === elementHost && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) );
|
318 |
+
} ) );
|
319 |
+
|
320 |
+
if ( ! matchesAllowedUrl )
|
321 |
+
return false;
|
322 |
+
|
323 |
+
// skip wp login and signup pages
|
324 |
+
if ( /\/wp-(login|signup)\.php$/.test( element.pathname ) )
|
325 |
+
return false;
|
326 |
+
|
327 |
+
// allow links to admin ajax as faux frontend URLs
|
328 |
+
if ( /\/wp-admin\/admin-ajax\.php$/.test( element.pathname ) )
|
329 |
+
return false;
|
330 |
+
|
331 |
+
// disallow links to admin, includes, and content
|
332 |
+
if ( /\/wp-(admin|includes|content)(\/|$)/.test( element.pathname ) )
|
333 |
+
return false;
|
334 |
+
|
335 |
+
return true;
|
336 |
+
};
|
337 |
+
|
338 |
+
} )( jQuery );
|
js/front.js
CHANGED
@@ -328,34 +328,6 @@
|
|
328 |
if ( scrollTop > parseInt( cnArgs.onScrollOffset ) )
|
329 |
this.setStatus( 'accept' );
|
330 |
};
|
331 |
-
|
332 |
-
// adjust the notice offset
|
333 |
-
this.adjustOffset = function() {
|
334 |
-
var coronabarContainer = document.getElementById( 'coronabar' ),
|
335 |
-
adminbarContainer = document.getElementById( 'wpadminbar' ),
|
336 |
-
coronabarOffset = 0,
|
337 |
-
adminbarOffset = 0;
|
338 |
-
|
339 |
-
// adjust when admin bar is visible
|
340 |
-
if ( cnArgs.position === 'top' && adminbarContainer !== null ) {
|
341 |
-
adminbarOffset = adminbarContainer.offsetHeight;
|
342 |
-
|
343 |
-
this.noticeContainer.style.top = adminbarOffset + 'px';
|
344 |
-
}
|
345 |
-
|
346 |
-
// adjust when coronabar is visible
|
347 |
-
if ( coronabarContainer !== null ) {
|
348 |
-
coronabarOffset = coronabarContainer.offsetHeight - 1;
|
349 |
-
|
350 |
-
if ( cnArgs.position === 'top' ) {
|
351 |
-
coronabarContainer.style.top = adminbarOffset + 'px';
|
352 |
-
|
353 |
-
this.noticeContainer.style.top = coronabarOffset + adminbarOffset + 'px';
|
354 |
-
} else {
|
355 |
-
this.noticeContainer.style.bottom = coronabarOffset + 'px';
|
356 |
-
}
|
357 |
-
}
|
358 |
-
}
|
359 |
|
360 |
// cross browser compatible closest function
|
361 |
this.getClosest = function ( elem, selector ) {
|
@@ -398,64 +370,6 @@
|
|
398 |
|
399 |
// add effect class
|
400 |
this.noticeContainer.classList.add( 'cn-effect-' + cnArgs.hideEffect );
|
401 |
-
|
402 |
-
// adjust on init
|
403 |
-
_this.adjustOffset();
|
404 |
-
|
405 |
-
// adjust on resize
|
406 |
-
window.addEventListener( 'resize', function( event ) {
|
407 |
-
_this.adjustOffset();
|
408 |
-
} );
|
409 |
-
|
410 |
-
// adjust when coronabar is active
|
411 |
-
if ( cnArgs.coronabarActive === '1' ) {
|
412 |
-
// on display
|
413 |
-
document.addEventListener( 'display.coronabar', function( event ) {
|
414 |
-
_this.adjustOffset();
|
415 |
-
} );
|
416 |
-
// on hide
|
417 |
-
document.addEventListener( 'hide.coronabar', function( event ) {
|
418 |
-
_this.adjustOffset();
|
419 |
-
} );
|
420 |
-
// on save data
|
421 |
-
document.addEventListener( 'saveData.coronabar', function( event ) {
|
422 |
-
var casesData = event.detail;
|
423 |
-
|
424 |
-
if ( casesData !== null ) {
|
425 |
-
// alpha JS request // no jQuery
|
426 |
-
var request = new XMLHttpRequest();
|
427 |
-
|
428 |
-
request.open( 'POST', cnArgs.ajaxUrl, true );
|
429 |
-
request.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded;' );
|
430 |
-
request.onload = function () {
|
431 |
-
if ( this.status >= 200 && this.status < 400 ) {
|
432 |
-
// ff successful
|
433 |
-
} else {
|
434 |
-
// if fail
|
435 |
-
}
|
436 |
-
};
|
437 |
-
request.onerror = function () {
|
438 |
-
// connection error
|
439 |
-
};
|
440 |
-
request.send( 'action=cn_save_cases&nonce=' + cnArgs.nonce + '&data=' + JSON.stringify( casesData ) );
|
441 |
-
}
|
442 |
-
} );
|
443 |
-
}
|
444 |
-
|
445 |
-
/*
|
446 |
-
// add refuse class
|
447 |
-
this.noticeContainer.classList.add( cnArgs.refuse === '1' ? 'cn-refuse-active' : 'cn-refuse-inactive' );
|
448 |
-
|
449 |
-
// add revoke class
|
450 |
-
if ( cnArgs.revokeCookies === '1' ) {
|
451 |
-
this.noticeContainer.classList.add( 'cn-revoke-active' );
|
452 |
-
|
453 |
-
// add revoke type class (manual or automatic)
|
454 |
-
this.noticeContainer.classList.add( 'cn-revoke-' + cnArgs.revokeCookiesOpt );
|
455 |
-
} else {
|
456 |
-
this.noticeContainer.classList.add( 'cn-revoke-inactive' );
|
457 |
-
}
|
458 |
-
*/
|
459 |
|
460 |
// check cookies status
|
461 |
if ( this.cookiesAccepted === null ) {
|
@@ -536,7 +450,7 @@
|
|
536 |
};
|
537 |
}
|
538 |
|
539 |
-
//
|
540 |
window.addEventListener( 'load', function () {
|
541 |
cookieNotice.init();
|
542 |
}, false );
|
328 |
if ( scrollTop > parseInt( cnArgs.onScrollOffset ) )
|
329 |
this.setStatus( 'accept' );
|
330 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
// cross browser compatible closest function
|
333 |
this.getClosest = function ( elem, selector ) {
|
370 |
|
371 |
// add effect class
|
372 |
this.noticeContainer.classList.add( 'cn-effect-' + cnArgs.hideEffect );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
|
374 |
// check cookies status
|
375 |
if ( this.cookiesAccepted === null ) {
|
450 |
};
|
451 |
}
|
452 |
|
453 |
+
// initialize plugin
|
454 |
window.addEventListener( 'load', function () {
|
455 |
cookieNotice.init();
|
456 |
}, false );
|
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,514 +10,1829 @@ msgstr ""
|
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.
|
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 |
-
#: ../
|
24 |
-
msgid "Bottom"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: ../
|
28 |
-
msgid "
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ../
|
32 |
-
msgid "
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../
|
36 |
-
msgid "
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../
|
40 |
-
msgid "
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ../
|
44 |
-
msgid "
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: ../
|
48 |
-
msgid "
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../
|
52 |
-
msgid "
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ../
|
56 |
-
msgid "
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: ../
|
60 |
-
msgid "
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: ../
|
64 |
-
msgid "
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: ../
|
68 |
-
msgid "
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../
|
72 |
-
msgid "
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ../
|
76 |
-
msgid "
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ../
|
80 |
-
msgid "
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ../
|
84 |
-
msgid "
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: ../
|
88 |
-
msgid "
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: ../
|
92 |
-
msgid "
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ../
|
96 |
-
msgid "
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../
|
100 |
-
msgid "
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: ../
|
104 |
-
msgid "
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: ../
|
108 |
-
msgid "
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: ../
|
112 |
-
msgid "
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: ../
|
116 |
-
msgid "
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: ../
|
120 |
-
msgid "
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: ../
|
124 |
-
msgid "
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: ../
|
128 |
-
msgid "
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: ../
|
132 |
-
msgid "
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: ../
|
136 |
-
msgid "
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: ../
|
140 |
-
msgid "
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: ../
|
144 |
-
msgid "
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: ../
|
148 |
-
msgid "
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: ../
|
152 |
-
msgid "
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: ../
|
156 |
-
msgid "
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: ../
|
160 |
-
msgid "
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: ../
|
164 |
-
msgid "
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: ../
|
168 |
-
msgid "
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: ../
|
172 |
-
msgid "
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: ../
|
176 |
-
msgid "
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: ../
|
180 |
-
msgid "
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: ../
|
184 |
-
msgid "
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: ../
|
188 |
-
msgid "
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: ../
|
192 |
-
msgid "
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: ../
|
196 |
-
msgid "
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: ../
|
200 |
-
|
201 |
-
msgid "Feel free to customize or disable it anytime in the <a href=\"%s\">Cookie Notice settings</a>."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: ../
|
205 |
-
|
206 |
-
msgid "Cookie Notice"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: ../
|
210 |
-
msgid "
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: ../
|
214 |
-
|
215 |
-
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>"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: ../
|
219 |
-
msgid "
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: ../
|
223 |
-
|
224 |
-
msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: ../
|
228 |
-
|
229 |
-
msgid "Blog about it & link to the <a href=\"%s\" target=\"_blank\">plugin page</a>."
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: ../
|
233 |
-
|
234 |
-
msgid "Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: ../
|
238 |
-
|
|
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: ../
|
242 |
-
msgid "
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: ../
|
246 |
-
msgid "
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: ../
|
250 |
-
msgid "
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: ../
|
254 |
-
msgid "
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: ../
|
258 |
-
msgid "
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: ../
|
262 |
-
msgid "
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: ../
|
266 |
-
msgid "
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: ../
|
270 |
-
msgid "
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: ../
|
274 |
-
msgid "
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: ../
|
278 |
msgid "Script placement"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: ../
|
282 |
msgid "Deactivation"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: ../
|
286 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: ../
|
290 |
-
msgid "
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: ../
|
294 |
-
msgid "
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: ../
|
298 |
-
msgid "
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: ../
|
302 |
-
msgid "Design"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: ../
|
306 |
msgid "Position"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: ../
|
310 |
msgid "Animation"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: ../
|
314 |
msgid "Button style"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: ../
|
318 |
msgid "Button class"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: ../
|
322 |
msgid "Colors"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: ../
|
326 |
-
msgid "
|
|
|
|
|
|
|
|
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: ../
|
330 |
-
msgid "
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: ../
|
334 |
-
msgid "
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: ../
|
338 |
-
msgid "
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: ../
|
342 |
-
msgid "
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: ../
|
346 |
-
msgid "
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: ../
|
350 |
-
msgid "
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: ../
|
354 |
-
msgid "
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: ../
|
358 |
-
msgid "
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: ../
|
362 |
-
msgid "
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: ../
|
366 |
-
msgid "
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: ../
|
370 |
-
msgid "
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: ../
|
374 |
msgid "Enter the cookie notice message."
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: ../
|
378 |
msgid "The text of the option to accept the notice and make it disappear."
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: ../
|
382 |
msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: ../
|
386 |
msgid "The text of the button to refuse the consent."
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: ../
|
390 |
msgid "Head"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: ../
|
394 |
msgid "Body"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: ../
|
398 |
msgid "The code to be used in your site header, before the closing head tag."
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: ../
|
402 |
msgid "The code to be used in your site footer, before the closing body tag."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: ../
|
406 |
msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted."
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: ../
|
410 |
msgid "To get the user consent status use the <code>cn_cookies_accepted()</code> function."
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: ../
|
414 |
msgid "Enable to give to the user the possibility to revoke their consent <i>(requires \"Refuse consent\" option enabled)</i>."
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: ../
|
418 |
msgid "Enter the revoke message."
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: ../
|
422 |
msgid "The text of the button to revoke the consent."
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: ../
|
426 |
msgid "Select the method for displaying the revoke button - automatic (in the banner) or manual using <code>[cookies_revoke]</code> shortcode."
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: ../
|
430 |
msgid "Enable to reload the page after the notice is accepted."
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: ../
|
434 |
msgid "Enable privacy policy link."
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: ../
|
438 |
msgid "The text of the privacy policy button."
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: ../
|
442 |
msgid "Select where to redirect user for more information."
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: ../
|
446 |
msgid "-- select page --"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: ../
|
450 |
msgid "Select from one of your site's pages."
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: ../
|
454 |
msgid "Synchronize with WordPress Privacy Policy page."
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: ../
|
458 |
msgid "Enter the full URL starting with http(s)://"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: ../
|
462 |
msgid "The amount of time that the cookie should be stored for when user accepts the notice."
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: ../
|
466 |
msgid "The amount of time that the cookie should be stored for when the user doesn't accept the notice."
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: ../
|
470 |
msgid "Select where all the plugin scripts should be placed."
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: ../
|
474 |
msgid "Select location for the notice."
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: ../
|
478 |
msgid "Select the animation style."
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: ../
|
482 |
msgid "Enable to accept the notice when user scrolls."
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: ../
|
486 |
msgid "Number of pixels user has to scroll to accept the notice and make it disappear."
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: ../
|
490 |
msgid "Enable to accept the notice on any click on the page."
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: ../
|
494 |
msgid "Enable if you want all plugin data to be deleted on deactivation."
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: ../
|
498 |
msgid "Select the buttons style."
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: ../
|
502 |
msgid "Enter additional button CSS classes separated by spaces."
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: ../
|
506 |
msgid "Bar opacity"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: ../
|
510 |
msgid "Settings restored to defaults."
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: ../
|
514 |
-
msgid "
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: ../
|
518 |
-
|
|
|
|
|
|
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: ../
|
522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Cookie Notice\n"
|
5 |
+
"POT-Creation-Date: 2021-02-01 12:34+0100\n"
|
6 |
"PO-Revision-Date: 2015-03-24 11:30+0100\n"
|
7 |
"Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
|
8 |
"Language-Team: dFactory <info@dfactory.eu>\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.4.2\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:499
|
20 |
+
msgid "Settings"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: ../includes/frontend.php:177 ../includes/settings.php:405
|
24 |
+
msgid "Cookie Notice"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: ../includes/settings.php:46 ../includes/welcome.php:360
|
28 |
msgid "Top"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../includes/settings.php:47 ../includes/welcome.php:359
|
32 |
+
msgid "Bottom"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: ../includes/settings.php:51 ../includes/settings.php:96
|
36 |
+
msgid "None"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: ../includes/settings.php:52
|
40 |
+
msgid "Light"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: ../includes/settings.php:53
|
44 |
+
msgid "Dark"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../includes/settings.php:57
|
48 |
+
msgid "Automatic"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: ../includes/settings.php:58
|
52 |
+
msgid "Manual"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../includes/settings.php:62
|
56 |
+
msgid "Page link"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: ../includes/settings.php:63
|
60 |
+
msgid "Custom link"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: ../includes/settings.php:72
|
64 |
+
msgid "Banner"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../includes/settings.php:73 ../includes/settings.php:486
|
68 |
+
msgid "Message"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../includes/settings.php:77
|
72 |
+
msgid "Text color"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../includes/settings.php:78
|
76 |
+
msgid "Bar color"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: ../includes/settings.php:84
|
80 |
+
msgid "An hour"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: ../includes/settings.php:85
|
84 |
+
msgid "1 day"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: ../includes/settings.php:86
|
88 |
+
msgid "1 week"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: ../includes/settings.php:87
|
92 |
+
msgid "1 month"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: ../includes/settings.php:88
|
96 |
+
msgid "3 months"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: ../includes/settings.php:89
|
100 |
+
msgid "6 months"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: ../includes/settings.php:90
|
104 |
+
msgid "1 year"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: ../includes/settings.php:91
|
108 |
+
msgid "infinity"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../includes/settings.php:97
|
112 |
+
msgid "Fade"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: ../includes/settings.php:98
|
116 |
+
msgid "Slide"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: ../includes/settings.php:102
|
120 |
+
msgid "Header"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: ../includes/settings.php:103
|
124 |
+
msgid "Footer"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: ../includes/settings.php:107
|
128 |
+
msgid "Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly."
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: ../includes/settings.php:108
|
132 |
+
msgid "Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, and to personalize your browsing experience."
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: ../includes/settings.php:109
|
136 |
+
msgid "Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, personalize your browsing experience, and analyze how you use our website. For these reasons, we may share your site usage data with our analytics partners."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: ../includes/settings.php:110
|
140 |
+
msgid "Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, personalize your browsing experience, analyze how you use our website, and deliver relevant ads to you. For these reasons, we may share your site usage data with our social media, advertising and analytics partners."
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: ../includes/settings.php:113
|
144 |
+
msgid "You can choose whether or not you want to consent to our use of cookies through the options below."
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: ../includes/settings.php:114
|
148 |
+
msgid "You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time."
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: ../includes/settings.php:118
|
152 |
+
msgid "Afghanistan"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: ../includes/settings.php:119
|
156 |
+
msgid "Åland Islands"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: ../includes/settings.php:120
|
160 |
+
msgid "Albania"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: ../includes/settings.php:121
|
164 |
+
msgid "Algeria"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: ../includes/settings.php:122
|
168 |
+
msgid "Andorra"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: ../includes/settings.php:123
|
172 |
+
msgid "Angola"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: ../includes/settings.php:124
|
176 |
+
msgid "Anguilla"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: ../includes/settings.php:125
|
180 |
+
msgid "Antarctica"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: ../includes/settings.php:126
|
184 |
+
msgid "Antigua and Barbuda"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: ../includes/settings.php:127
|
188 |
+
msgid "Argentina"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: ../includes/settings.php:128
|
192 |
+
msgid "Armenia"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: ../includes/settings.php:129
|
196 |
+
msgid "Aruba"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: ../includes/settings.php:130
|
200 |
+
msgid "Australia"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: ../includes/settings.php:131
|
204 |
+
msgid "Austria"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: ../includes/settings.php:132
|
208 |
+
msgid "Azerbaijan"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: ../includes/settings.php:133
|
212 |
+
msgid "Bahamas"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: ../includes/settings.php:134
|
216 |
+
msgid "Bahrain"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: ../includes/settings.php:135
|
220 |
+
msgid "Bangladesh"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: ../includes/settings.php:136
|
224 |
+
msgid "Barbados"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: ../includes/settings.php:137
|
228 |
+
msgid "Belarus"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: ../includes/settings.php:138
|
232 |
+
msgid "Belgium"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: ../includes/settings.php:139
|
236 |
+
msgid "Belau"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: ../includes/settings.php:140
|
240 |
+
msgid "Belize"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: ../includes/settings.php:141
|
244 |
+
msgid "Benin"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: ../includes/settings.php:142
|
248 |
+
msgid "Bermuda"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: ../includes/settings.php:143
|
252 |
+
msgid "Bhutan"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: ../includes/settings.php:144
|
256 |
+
msgid "Bolivia"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: ../includes/settings.php:145
|
260 |
+
msgid "Bonaire, Saint Eustatius and Saba"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: ../includes/settings.php:146
|
264 |
+
msgid "Bosnia and Herzegovina"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: ../includes/settings.php:147
|
268 |
+
msgid "Botswana"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: ../includes/settings.php:148
|
272 |
+
msgid "Bouvet Island"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: ../includes/settings.php:149
|
276 |
+
msgid "Brazil"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: ../includes/settings.php:150
|
280 |
+
msgid "British Indian Ocean Territory"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: ../includes/settings.php:151
|
284 |
+
msgid "British Virgin Islands"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: ../includes/settings.php:152
|
288 |
+
msgid "Brunei"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: ../includes/settings.php:153
|
292 |
+
msgid "Bulgaria"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: ../includes/settings.php:154
|
296 |
+
msgid "Burkina Faso"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: ../includes/settings.php:155
|
300 |
+
msgid "Burundi"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: ../includes/settings.php:156
|
304 |
+
msgid "Cambodia"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: ../includes/settings.php:157
|
308 |
+
msgid "Cameroon"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: ../includes/settings.php:158
|
312 |
+
msgid "Canada"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: ../includes/settings.php:159
|
316 |
+
msgid "Cape Verde"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: ../includes/settings.php:160
|
320 |
+
msgid "Cayman Islands"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: ../includes/settings.php:161
|
324 |
+
msgid "Central African Republic"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: ../includes/settings.php:162
|
328 |
+
msgid "Chad"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: ../includes/settings.php:163
|
332 |
+
msgid "Chile"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: ../includes/settings.php:164
|
336 |
+
msgid "China"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: ../includes/settings.php:165
|
340 |
+
msgid "Christmas Island"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: ../includes/settings.php:166
|
344 |
+
msgid "Cocos (Keeling) Islands"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: ../includes/settings.php:167
|
348 |
+
msgid "Colombia"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: ../includes/settings.php:168
|
352 |
+
msgid "Comoros"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: ../includes/settings.php:169
|
356 |
+
msgid "Congo (Brazzaville)"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: ../includes/settings.php:170
|
360 |
+
msgid "Congo (Kinshasa)"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: ../includes/settings.php:171
|
364 |
+
msgid "Cook Islands"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: ../includes/settings.php:172
|
368 |
+
msgid "Costa Rica"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: ../includes/settings.php:173
|
372 |
+
msgid "Croatia"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: ../includes/settings.php:174
|
376 |
+
msgid "Cuba"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: ../includes/settings.php:175
|
380 |
+
msgid "CuraÇao"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: ../includes/settings.php:176
|
384 |
+
msgid "Cyprus"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: ../includes/settings.php:177
|
388 |
+
msgid "Czech Republic"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: ../includes/settings.php:178
|
392 |
+
msgid "Denmark"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: ../includes/settings.php:179
|
396 |
+
msgid "Djibouti"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: ../includes/settings.php:180
|
400 |
+
msgid "Dominica"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: ../includes/settings.php:181
|
404 |
+
msgid "Dominican Republic"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: ../includes/settings.php:182
|
408 |
+
msgid "Ecuador"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: ../includes/settings.php:183
|
412 |
+
msgid "Egypt"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: ../includes/settings.php:184
|
416 |
+
msgid "El Salvador"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: ../includes/settings.php:185
|
420 |
+
msgid "Equatorial Guinea"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: ../includes/settings.php:186
|
424 |
+
msgid "Eritrea"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: ../includes/settings.php:187
|
428 |
+
msgid "Estonia"
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: ../includes/settings.php:188
|
432 |
+
msgid "Ethiopia"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: ../includes/settings.php:189
|
436 |
+
msgid "Falkland Islands"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: ../includes/settings.php:190
|
440 |
+
msgid "Faroe Islands"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: ../includes/settings.php:191
|
444 |
+
msgid "Fiji"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: ../includes/settings.php:192
|
448 |
+
msgid "Finland"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: ../includes/settings.php:193
|
452 |
+
msgid "France"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: ../includes/settings.php:194
|
456 |
+
msgid "French Guiana"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: ../includes/settings.php:195
|
460 |
+
msgid "French Polynesia"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: ../includes/settings.php:196
|
464 |
+
msgid "French Southern Territories"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: ../includes/settings.php:197
|
468 |
+
msgid "Gabon"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: ../includes/settings.php:198
|
472 |
+
msgid "Gambia"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: ../includes/settings.php:199
|
476 |
+
msgid "Georgia"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: ../includes/settings.php:200
|
480 |
+
msgid "Germany"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: ../includes/settings.php:201
|
484 |
+
msgid "Ghana"
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: ../includes/settings.php:202
|
488 |
+
msgid "Gibraltar"
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: ../includes/settings.php:203
|
492 |
+
msgid "Greece"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: ../includes/settings.php:204
|
496 |
+
msgid "Greenland"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: ../includes/settings.php:205
|
500 |
+
msgid "Grenada"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: ../includes/settings.php:206
|
504 |
+
msgid "Guadeloupe"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: ../includes/settings.php:207
|
508 |
+
msgid "Guatemala"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: ../includes/settings.php:208
|
512 |
+
msgid "Guernsey"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: ../includes/settings.php:209
|
516 |
+
msgid "Guinea"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: ../includes/settings.php:210
|
520 |
+
msgid "Guinea-Bissau"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: ../includes/settings.php:211
|
524 |
+
msgid "Guyana"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: ../includes/settings.php:212
|
528 |
+
msgid "Haiti"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: ../includes/settings.php:213
|
532 |
+
msgid "Heard Island and McDonald Islands"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: ../includes/settings.php:214
|
536 |
+
msgid "Honduras"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: ../includes/settings.php:215
|
540 |
+
msgid "Hong Kong"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: ../includes/settings.php:216
|
544 |
+
msgid "Hungary"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: ../includes/settings.php:217
|
548 |
+
msgid "Iceland"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: ../includes/settings.php:218
|
552 |
+
msgid "India"
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: ../includes/settings.php:219
|
556 |
+
msgid "Indonesia"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: ../includes/settings.php:220
|
560 |
+
msgid "Iran"
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: ../includes/settings.php:221
|
564 |
+
msgid "Iraq"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: ../includes/settings.php:222
|
568 |
+
msgid "Republic of Ireland"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: ../includes/settings.php:223
|
572 |
+
msgid "Isle of Man"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: ../includes/settings.php:224
|
576 |
+
msgid "Israel"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: ../includes/settings.php:225
|
580 |
+
msgid "Italy"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: ../includes/settings.php:226
|
584 |
+
msgid "Ivory Coast"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: ../includes/settings.php:227
|
588 |
+
msgid "Jamaica"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: ../includes/settings.php:228
|
592 |
+
msgid "Japan"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: ../includes/settings.php:229
|
596 |
+
msgid "Jersey"
|
597 |
+
msgstr ""
|
598 |
+
|
599 |
+
#: ../includes/settings.php:230
|
600 |
+
msgid "Jordan"
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: ../includes/settings.php:231
|
604 |
+
msgid "Kazakhstan"
|
605 |
+
msgstr ""
|
606 |
+
|
607 |
+
#: ../includes/settings.php:232
|
608 |
+
msgid "Kenya"
|
609 |
+
msgstr ""
|
610 |
+
|
611 |
+
#: ../includes/settings.php:233
|
612 |
+
msgid "Kiribati"
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: ../includes/settings.php:234
|
616 |
+
msgid "Kuwait"
|
617 |
+
msgstr ""
|
618 |
+
|
619 |
+
#: ../includes/settings.php:235
|
620 |
+
msgid "Kyrgyzstan"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: ../includes/settings.php:236
|
624 |
+
msgid "Laos"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: ../includes/settings.php:237
|
628 |
+
msgid "Latvia"
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: ../includes/settings.php:238
|
632 |
+
msgid "Lebanon"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: ../includes/settings.php:239
|
636 |
+
msgid "Lesotho"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: ../includes/settings.php:240
|
640 |
+
msgid "Liberia"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: ../includes/settings.php:241
|
644 |
+
msgid "Libya"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: ../includes/settings.php:242
|
648 |
+
msgid "Liechtenstein"
|
649 |
+
msgstr ""
|
650 |
+
|
651 |
+
#: ../includes/settings.php:243
|
652 |
+
msgid "Lithuania"
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: ../includes/settings.php:244
|
656 |
+
msgid "Luxembourg"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: ../includes/settings.php:245
|
660 |
+
msgid "Macao S.A.R., China"
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#: ../includes/settings.php:246
|
664 |
+
msgid "Macedonia"
|
665 |
+
msgstr ""
|
666 |
+
|
667 |
+
#: ../includes/settings.php:247
|
668 |
+
msgid "Madagascar"
|
669 |
+
msgstr ""
|
670 |
+
|
671 |
+
#: ../includes/settings.php:248
|
672 |
+
msgid "Malawi"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: ../includes/settings.php:249
|
676 |
+
msgid "Malaysia"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: ../includes/settings.php:250
|
680 |
+
msgid "Maldives"
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: ../includes/settings.php:251
|
684 |
+
msgid "Mali"
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
+
#: ../includes/settings.php:252
|
688 |
+
msgid "Malta"
|
689 |
+
msgstr ""
|
690 |
+
|
691 |
+
#: ../includes/settings.php:253
|
692 |
+
msgid "Marshall Islands"
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: ../includes/settings.php:254
|
696 |
+
msgid "Martinique"
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: ../includes/settings.php:255
|
700 |
+
msgid "Mauritania"
|
701 |
+
msgstr ""
|
702 |
+
|
703 |
+
#: ../includes/settings.php:256
|
704 |
+
msgid "Mauritius"
|
705 |
+
msgstr ""
|
706 |
+
|
707 |
+
#: ../includes/settings.php:257
|
708 |
+
msgid "Mayotte"
|
709 |
+
msgstr ""
|
710 |
+
|
711 |
+
#: ../includes/settings.php:258
|
712 |
+
msgid "Mexico"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: ../includes/settings.php:259
|
716 |
+
msgid "Micronesia"
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: ../includes/settings.php:260
|
720 |
+
msgid "Moldova"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: ../includes/settings.php:261
|
724 |
+
msgid "Monaco"
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: ../includes/settings.php:262
|
728 |
+
msgid "Mongolia"
|
729 |
+
msgstr ""
|
730 |
+
|
731 |
+
#: ../includes/settings.php:263
|
732 |
+
msgid "Montenegro"
|
733 |
+
msgstr ""
|
734 |
+
|
735 |
+
#: ../includes/settings.php:264
|
736 |
+
msgid "Montserrat"
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: ../includes/settings.php:265
|
740 |
+
msgid "Morocco"
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: ../includes/settings.php:266
|
744 |
+
msgid "Mozambique"
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: ../includes/settings.php:267
|
748 |
+
msgid "Myanmar"
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: ../includes/settings.php:268
|
752 |
+
msgid "Namibia"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: ../includes/settings.php:269
|
756 |
+
msgid "Nauru"
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: ../includes/settings.php:270
|
760 |
+
msgid "Nepal"
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: ../includes/settings.php:271
|
764 |
+
msgid "Netherlands"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: ../includes/settings.php:272
|
768 |
+
msgid "Netherlands Antilles"
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: ../includes/settings.php:273
|
772 |
+
msgid "New Caledonia"
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: ../includes/settings.php:274
|
776 |
+
msgid "New Zealand"
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: ../includes/settings.php:275
|
780 |
+
msgid "Nicaragua"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: ../includes/settings.php:276
|
784 |
+
msgid "Niger"
|
785 |
+
msgstr ""
|
786 |
+
|
787 |
+
#: ../includes/settings.php:277
|
788 |
+
msgid "Nigeria"
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: ../includes/settings.php:278
|
792 |
+
msgid "Niue"
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: ../includes/settings.php:279
|
796 |
+
msgid "Norfolk Island"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: ../includes/settings.php:280
|
800 |
+
msgid "North Korea"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: ../includes/settings.php:281
|
804 |
+
msgid "Norway"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: ../includes/settings.php:282
|
808 |
+
msgid "Oman"
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#: ../includes/settings.php:283
|
812 |
+
msgid "Pakistan"
|
813 |
+
msgstr ""
|
814 |
+
|
815 |
+
#: ../includes/settings.php:284
|
816 |
+
msgid "Palestinian Territory"
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: ../includes/settings.php:285
|
820 |
+
msgid "Panama"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: ../includes/settings.php:286
|
824 |
+
msgid "Papua New Guinea"
|
825 |
+
msgstr ""
|
826 |
+
|
827 |
+
#: ../includes/settings.php:287
|
828 |
+
msgid "Paraguay"
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: ../includes/settings.php:288
|
832 |
+
msgid "Peru"
|
833 |
+
msgstr ""
|
834 |
+
|
835 |
+
#: ../includes/settings.php:289
|
836 |
+
msgid "Philippines"
|
837 |
+
msgstr ""
|
838 |
+
|
839 |
+
#: ../includes/settings.php:290
|
840 |
+
msgid "Pitcairn"
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#: ../includes/settings.php:291
|
844 |
+
msgid "Poland"
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: ../includes/settings.php:292
|
848 |
+
msgid "Portugal"
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: ../includes/settings.php:293
|
852 |
+
msgid "Qatar"
|
853 |
+
msgstr ""
|
854 |
+
|
855 |
+
#: ../includes/settings.php:294
|
856 |
+
msgid "Reunion"
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
+
#: ../includes/settings.php:295
|
860 |
+
msgid "Romania"
|
861 |
+
msgstr ""
|
862 |
+
|
863 |
+
#: ../includes/settings.php:296
|
864 |
+
msgid "Russia"
|
865 |
+
msgstr ""
|
866 |
+
|
867 |
+
#: ../includes/settings.php:297
|
868 |
+
msgid "Rwanda"
|
869 |
+
msgstr ""
|
870 |
+
|
871 |
+
#: ../includes/settings.php:298
|
872 |
+
msgid "Saint Barthélemy"
|
873 |
+
msgstr ""
|
874 |
+
|
875 |
+
#: ../includes/settings.php:299
|
876 |
+
msgid "Saint Helena"
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: ../includes/settings.php:300
|
880 |
+
msgid "Saint Kitts and Nevis"
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: ../includes/settings.php:301
|
884 |
+
msgid "Saint Lucia"
|
885 |
+
msgstr ""
|
886 |
+
|
887 |
+
#: ../includes/settings.php:302
|
888 |
+
msgid "Saint Martin (French part)"
|
889 |
+
msgstr ""
|
890 |
+
|
891 |
+
#: ../includes/settings.php:303
|
892 |
+
msgid "Saint Martin (Dutch part)"
|
893 |
+
msgstr ""
|
894 |
+
|
895 |
+
#: ../includes/settings.php:304
|
896 |
+
msgid "Saint Pierre and Miquelon"
|
897 |
+
msgstr ""
|
898 |
+
|
899 |
+
#: ../includes/settings.php:305
|
900 |
+
msgid "Saint Vincent and the Grenadines"
|
901 |
+
msgstr ""
|
902 |
+
|
903 |
+
#: ../includes/settings.php:306
|
904 |
+
msgid "San Marino"
|
905 |
+
msgstr ""
|
906 |
+
|
907 |
+
#: ../includes/settings.php:307
|
908 |
+
msgid "São Tomé and Príncipe"
|
909 |
+
msgstr ""
|
910 |
+
|
911 |
+
#: ../includes/settings.php:308
|
912 |
+
msgid "Saudi Arabia"
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: ../includes/settings.php:309
|
916 |
+
msgid "Senegal"
|
917 |
+
msgstr ""
|
918 |
+
|
919 |
+
#: ../includes/settings.php:310
|
920 |
+
msgid "Serbia"
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: ../includes/settings.php:311
|
924 |
+
msgid "Seychelles"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: ../includes/settings.php:312
|
928 |
+
msgid "Sierra Leone"
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: ../includes/settings.php:313
|
932 |
+
msgid "Singapore"
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: ../includes/settings.php:314
|
936 |
+
msgid "Slovakia"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: ../includes/settings.php:315
|
940 |
+
msgid "Slovenia"
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#: ../includes/settings.php:316
|
944 |
+
msgid "Solomon Islands"
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: ../includes/settings.php:317
|
948 |
+
msgid "Somalia"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: ../includes/settings.php:318
|
952 |
+
msgid "South Africa"
|
953 |
+
msgstr ""
|
954 |
+
|
955 |
+
#: ../includes/settings.php:319
|
956 |
+
msgid "South Georgia/Sandwich Islands"
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: ../includes/settings.php:320
|
960 |
+
msgid "South Korea"
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: ../includes/settings.php:321
|
964 |
+
msgid "South Sudan"
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: ../includes/settings.php:322
|
968 |
+
msgid "Spain"
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: ../includes/settings.php:323
|
972 |
+
msgid "Sri Lanka"
|
973 |
msgstr ""
|
974 |
|
975 |
+
#: ../includes/settings.php:324
|
976 |
+
msgid "Sudan"
|
977 |
msgstr ""
|
978 |
|
979 |
+
#: ../includes/settings.php:325
|
980 |
+
msgid "Suriname"
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: ../includes/settings.php:326
|
984 |
+
msgid "Svalbard and Jan Mayen"
|
985 |
msgstr ""
|
986 |
|
987 |
+
#: ../includes/settings.php:327
|
988 |
+
msgid "Swaziland"
|
989 |
msgstr ""
|
990 |
|
991 |
+
#: ../includes/settings.php:328
|
992 |
+
msgid "Sweden"
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: ../includes/settings.php:329
|
996 |
+
msgid "Switzerland"
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: ../includes/settings.php:330
|
1000 |
+
msgid "Syria"
|
1001 |
msgstr ""
|
1002 |
|
1003 |
+
#: ../includes/settings.php:331
|
1004 |
+
msgid "Taiwan"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: ../includes/settings.php:332
|
1008 |
+
msgid "Tajikistan"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: ../includes/settings.php:333
|
1012 |
+
msgid "Tanzania"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: ../includes/settings.php:334
|
1016 |
+
msgid "Thailand"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
+
#: ../includes/settings.php:335
|
1020 |
+
msgid "Timor-Leste"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: ../includes/settings.php:336
|
1024 |
+
msgid "Togo"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: ../includes/settings.php:337
|
1028 |
+
msgid "Tokelau"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
+
#: ../includes/settings.php:338
|
1032 |
+
msgid "Tonga"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
+
#: ../includes/settings.php:339
|
1036 |
+
msgid "Trinidad and Tobago"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: ../includes/settings.php:340
|
1040 |
+
msgid "Tunisia"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: ../includes/settings.php:341
|
1044 |
+
msgid "Turkey"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: ../includes/settings.php:342
|
1048 |
+
msgid "Turkmenistan"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: ../includes/settings.php:343
|
1052 |
+
msgid "Turks and Caicos Islands"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: ../includes/settings.php:344
|
1056 |
+
msgid "Tuvalu"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: ../includes/settings.php:345
|
1060 |
+
msgid "Uganda"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: ../includes/settings.php:346
|
1064 |
+
msgid "Ukraine"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: ../includes/settings.php:347
|
1068 |
+
msgid "United Arab Emirates"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: ../includes/settings.php:348
|
1072 |
+
msgid "United Kingdom"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: ../includes/settings.php:349
|
1076 |
+
msgid "United States"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: ../includes/settings.php:350
|
1080 |
+
msgid "Uruguay"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: ../includes/settings.php:351
|
1084 |
+
msgid "Uzbekistan"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: ../includes/settings.php:352
|
1088 |
+
msgid "Vanuatu"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: ../includes/settings.php:353
|
1092 |
+
msgid "Vatican"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: ../includes/settings.php:354
|
1096 |
+
msgid "Venezuela"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: ../includes/settings.php:355
|
1100 |
+
msgid "Vietnam"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
+
#: ../includes/settings.php:356
|
1104 |
+
msgid "Wallis and Futuna"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
+
#: ../includes/settings.php:357
|
1108 |
+
msgid "Western Sahara"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
+
#: ../includes/settings.php:358
|
1112 |
+
msgid "Western Samoa"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
+
#: ../includes/settings.php:359
|
1116 |
+
msgid "Yemen"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
+
#: ../includes/settings.php:360
|
1120 |
+
msgid "Zambia"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
+
#: ../includes/settings.php:361
|
1124 |
+
msgid "Zimbabwe"
|
1125 |
msgstr ""
|
1126 |
|
1127 |
+
#: ../includes/settings.php:365
|
1128 |
+
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."
|
1129 |
msgstr ""
|
1130 |
|
1131 |
+
#: ../includes/settings.php:366
|
1132 |
+
msgid "Ok"
|
|
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: ../includes/settings.php:367
|
1136 |
+
msgid "No"
|
|
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: ../includes/settings.php:368
|
1140 |
+
msgid "You can revoke your consent any time using the Revoke consent button."
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: ../includes/settings.php:369 ../includes/settings.php:490
|
1144 |
+
msgid "Revoke consent"
|
|
|
1145 |
msgstr ""
|
1146 |
|
1147 |
+
#: ../includes/settings.php:370 ../includes/settings.php:488
|
1148 |
+
msgid "Privacy policy"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
+
#: ../includes/settings.php:416
|
1152 |
+
msgid "Cookie Notice & Compliance for GDPR/CCPA"
|
|
|
1153 |
msgstr ""
|
1154 |
|
1155 |
+
#: ../includes/settings.php:425
|
1156 |
+
msgid "Promote the privacy of your website visitors without affecting how you do your business."
|
|
|
1157 |
msgstr ""
|
1158 |
|
1159 |
+
#: ../includes/settings.php:427
|
1160 |
+
msgid "Cookie Compliance™"
|
|
|
1161 |
msgstr ""
|
1162 |
|
1163 |
+
#: ../includes/settings.php:428 ../includes/welcome.php:173
|
1164 |
+
#: ../includes/welcome.php:206
|
1165 |
+
msgid "The next generation of Cookie Notice"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: ../includes/settings.php:430 ../includes/welcome.php:175
|
1169 |
+
msgid "An all new web application to help you deliver better consent experiences and comply with GDPR and CCPA more effectively."
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: ../includes/settings.php:433
|
1173 |
+
msgid "Upgrade"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: ../includes/settings.php:449
|
1177 |
+
msgid "Reset to defaults"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: ../includes/settings.php:468 ../includes/settings.php:480
|
1181 |
+
msgid "Cookie Compliance Settings"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: ../includes/settings.php:469 ../includes/settings.php:481
|
1185 |
+
msgid "Compliance status"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: ../includes/settings.php:470 ../includes/settings.php:482
|
1189 |
+
msgid "App ID"
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: ../includes/settings.php:471 ../includes/settings.php:483
|
1193 |
+
msgid "App Key"
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: ../includes/settings.php:473
|
1197 |
+
msgid "Miscellaneous Settings"
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: ../includes/settings.php:474
|
1201 |
+
msgid "Cache"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: ../includes/settings.php:475 ../includes/settings.php:497
|
1205 |
msgid "Script placement"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
+
#: ../includes/settings.php:476 ../includes/settings.php:498
|
1209 |
msgid "Deactivation"
|
1210 |
msgstr ""
|
1211 |
|
1212 |
+
#: ../includes/settings.php:485
|
1213 |
+
msgid "Cookie Notice Settings"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: ../includes/settings.php:487
|
1217 |
+
msgid "Button text"
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: ../includes/settings.php:489
|
1221 |
+
msgid "Refuse consent"
|
1222 |
+
msgstr ""
|
1223 |
+
|
1224 |
+
#: ../includes/settings.php:491
|
1225 |
+
msgid "Script blocking"
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: ../includes/settings.php:492
|
1229 |
+
msgid "Reloading"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: ../includes/settings.php:493
|
1233 |
+
msgid "On scroll"
|
1234 |
msgstr ""
|
1235 |
|
1236 |
+
#: ../includes/settings.php:494
|
1237 |
+
msgid "On click"
|
1238 |
msgstr ""
|
1239 |
|
1240 |
+
#: ../includes/settings.php:495
|
1241 |
+
msgid "Accepted expiry"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: ../includes/settings.php:496
|
1245 |
+
msgid "Rejected expiry"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: ../includes/settings.php:501
|
1249 |
+
msgid "Cookie Notice Design"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: ../includes/settings.php:502
|
1253 |
msgid "Position"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: ../includes/settings.php:503
|
1257 |
msgid "Animation"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
+
#: ../includes/settings.php:504
|
1261 |
msgid "Button style"
|
1262 |
msgstr ""
|
1263 |
|
1264 |
+
#: ../includes/settings.php:505
|
1265 |
msgid "Button class"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: ../includes/settings.php:506
|
1269 |
msgid "Colors"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: ../includes/settings.php:528
|
1273 |
+
msgid "Active"
|
1274 |
+
msgstr ""
|
1275 |
+
|
1276 |
+
#: ../includes/settings.php:531
|
1277 |
+
msgid "Log in & Configure"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
+
#: ../includes/settings.php:532
|
1281 |
+
msgid "Log into the Cookie Compliance™ web application and configure your Privacy Experience."
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: ../includes/settings.php:540
|
1285 |
+
msgid "Pending"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
+
#: ../includes/settings.php:543
|
1289 |
+
msgid "Log in & Complete setup"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
+
#: ../includes/settings.php:544
|
1293 |
+
msgid "Log into the Cookie Compliance™ web application and complete the setup process."
|
1294 |
msgstr ""
|
1295 |
|
1296 |
+
#: ../includes/settings.php:552
|
1297 |
+
msgid "Inactive"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
+
#: ../includes/settings.php:555
|
1301 |
+
msgid "Add GDPR/CCPA Compliance"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: ../includes/settings.php:556
|
1305 |
+
msgid "Launch Cookie Compliance™ and add GDPR & CCPA compliance features."
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: ../includes/settings.php:571
|
1309 |
+
msgid "Enter your Cooking Compliance™ application ID."
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: ../includes/settings.php:583
|
1313 |
+
msgid "Enter your Cooking Compliance™ application secret key."
|
1314 |
msgstr ""
|
1315 |
|
1316 |
+
#: ../includes/settings.php:594
|
1317 |
+
msgid "Purge Cache"
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: ../includes/settings.php:596
|
1321 |
+
msgid "Click the Purge Cache button to refresh the app configuration."
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: ../includes/settings.php:607
|
1325 |
msgid "Enter the cookie notice message."
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: ../includes/settings.php:618
|
1329 |
msgid "The text of the option to accept the notice and make it disappear."
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: ../includes/settings.php:628
|
1333 |
msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: ../includes/settings.php:632
|
1337 |
msgid "The text of the button to refuse the consent."
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: ../includes/settings.php:650
|
1341 |
msgid "Head"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: ../includes/settings.php:651
|
1345 |
msgid "Body"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: ../includes/settings.php:654
|
1349 |
msgid "The code to be used in your site header, before the closing head tag."
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: ../includes/settings.php:658
|
1353 |
msgid "The code to be used in your site footer, before the closing body tag."
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: ../includes/settings.php:662
|
1357 |
msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted."
|
1358 |
msgstr ""
|
1359 |
|
1360 |
+
#: ../includes/settings.php:662
|
1361 |
msgid "To get the user consent status use the <code>cn_cookies_accepted()</code> function."
|
1362 |
msgstr ""
|
1363 |
|
1364 |
+
#: ../includes/settings.php:673
|
1365 |
msgid "Enable to give to the user the possibility to revoke their consent <i>(requires \"Refuse consent\" option enabled)</i>."
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: ../includes/settings.php:676
|
1369 |
msgid "Enter the revoke message."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: ../includes/settings.php:678
|
1373 |
msgid "The text of the button to revoke the consent."
|
1374 |
msgstr ""
|
1375 |
|
1376 |
+
#: ../includes/settings.php:686
|
1377 |
msgid "Select the method for displaying the revoke button - automatic (in the banner) or manual using <code>[cookies_revoke]</code> shortcode."
|
1378 |
msgstr ""
|
1379 |
|
1380 |
+
#: ../includes/settings.php:697
|
1381 |
msgid "Enable to reload the page after the notice is accepted."
|
1382 |
msgstr ""
|
1383 |
|
1384 |
+
#: ../includes/settings.php:720
|
1385 |
msgid "Enable privacy policy link."
|
1386 |
msgstr ""
|
1387 |
|
1388 |
+
#: ../includes/settings.php:723
|
1389 |
msgid "The text of the privacy policy button."
|
1390 |
msgstr ""
|
1391 |
|
1392 |
+
#: ../includes/settings.php:735
|
1393 |
msgid "Select where to redirect user for more information."
|
1394 |
msgstr ""
|
1395 |
|
1396 |
+
#: ../includes/settings.php:738
|
1397 |
msgid "-- select page --"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
+
#: ../includes/settings.php:749
|
1401 |
msgid "Select from one of your site's pages."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: ../includes/settings.php:755
|
1405 |
msgid "Synchronize with WordPress Privacy Policy page."
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: ../includes/settings.php:762
|
1409 |
msgid "Enter the full URL starting with http(s)://"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
+
#: ../includes/settings.php:805
|
1413 |
msgid "The amount of time that the cookie should be stored for when user accepts the notice."
|
1414 |
msgstr ""
|
1415 |
|
1416 |
+
#: ../includes/settings.php:828
|
1417 |
msgid "The amount of time that the cookie should be stored for when the user doesn't accept the notice."
|
1418 |
msgstr ""
|
1419 |
|
1420 |
+
#: ../includes/settings.php:846
|
1421 |
msgid "Select where all the plugin scripts should be placed."
|
1422 |
msgstr ""
|
1423 |
|
1424 |
+
#: ../includes/settings.php:866
|
1425 |
msgid "Select location for the notice."
|
1426 |
msgstr ""
|
1427 |
|
1428 |
+
#: ../includes/settings.php:887
|
1429 |
msgid "Select the animation style."
|
1430 |
msgstr ""
|
1431 |
|
1432 |
+
#: ../includes/settings.php:898
|
1433 |
msgid "Enable to accept the notice when user scrolls."
|
1434 |
msgstr ""
|
1435 |
|
1436 |
+
#: ../includes/settings.php:901
|
1437 |
msgid "Number of pixels user has to scroll to accept the notice and make it disappear."
|
1438 |
msgstr ""
|
1439 |
|
1440 |
+
#: ../includes/settings.php:912
|
1441 |
msgid "Enable to accept the notice on any click on the page."
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: ../includes/settings.php:922
|
1445 |
msgid "Enable if you want all plugin data to be deleted on deactivation."
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: ../includes/settings.php:942
|
1449 |
msgid "Select the buttons style."
|
1450 |
msgstr ""
|
1451 |
|
1452 |
+
#: ../includes/settings.php:955
|
1453 |
msgid "Enter additional button CSS classes separated by spaces."
|
1454 |
msgstr ""
|
1455 |
|
1456 |
+
#: ../includes/settings.php:979
|
1457 |
msgid "Bar opacity"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
+
#: ../includes/settings.php:1121
|
1461 |
msgid "Settings restored to defaults."
|
1462 |
msgstr ""
|
1463 |
|
1464 |
+
#: ../includes/settings.php:1148
|
1465 |
+
msgid "Are you sure you want to reset these settings to defaults?"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
+
#: ../includes/welcome-api.php:35 ../includes/welcome-api.php:38
|
1469 |
+
#: ../includes/welcome-api.php:41 ../includes/welcome-api.php:44
|
1470 |
+
#: ../includes/welcome.php:140 ../includes/welcome.php:150
|
1471 |
+
#: ../includes/welcome.php:153
|
1472 |
+
msgid "You do not have permission to access this page."
|
1473 |
msgstr ""
|
1474 |
|
1475 |
+
#: ../includes/welcome-api.php:71 ../includes/welcome-api.php:267
|
1476 |
+
#: ../includes/welcome-api.php:306 ../includes/welcome-api.php:354
|
1477 |
+
#: ../includes/welcome-api.php:427 ../includes/welcome-api.php:697
|
1478 |
+
#: ../includes/welcome.php:74
|
1479 |
+
msgid "Unexpected error occurred. Please try again later."
|
1480 |
+
msgstr ""
|
1481 |
+
|
1482 |
+
#: ../includes/welcome-api.php:85
|
1483 |
+
msgid "Empty plan or payment method data."
|
1484 |
+
msgstr ""
|
1485 |
+
|
1486 |
+
#: ../includes/welcome-api.php:116
|
1487 |
+
msgid "Unable to create customer data."
|
1488 |
+
msgstr ""
|
1489 |
+
|
1490 |
+
#: ../includes/welcome-api.php:209
|
1491 |
+
msgid "Please accept the Terms of Service to proceed."
|
1492 |
+
msgstr ""
|
1493 |
+
|
1494 |
+
#: ../includes/welcome-api.php:214 ../includes/welcome-api.php:325
|
1495 |
+
msgid "Email is not allowed to be empty."
|
1496 |
+
msgstr ""
|
1497 |
+
|
1498 |
+
#: ../includes/welcome-api.php:219 ../includes/welcome-api.php:330
|
1499 |
+
msgid "Password is not allowed to be empty."
|
1500 |
+
msgstr ""
|
1501 |
+
|
1502 |
+
#: ../includes/welcome-api.php:224
|
1503 |
+
msgid "Passwords do not match."
|
1504 |
+
msgstr ""
|
1505 |
+
|
1506 |
+
#: ../includes/welcome-api.php:441
|
1507 |
+
#, php-format
|
1508 |
+
msgid "You have an active subscription for %s"
|
1509 |
+
msgstr ""
|
1510 |
+
|
1511 |
+
#: ../includes/welcome.php:36
|
1512 |
+
msgid "Welcome to Cookie Notice"
|
1513 |
+
msgstr ""
|
1514 |
+
|
1515 |
+
#: ../includes/welcome.php:75
|
1516 |
+
msgid "Please fill all the required fields."
|
1517 |
+
msgstr ""
|
1518 |
+
|
1519 |
+
#: ../includes/welcome.php:181
|
1520 |
+
msgid "Digital Factory - the original developers of Cookie Notice - has joined forces with <a href=\"https://hu-manity.co\" target=\"_blank\" class=\"cn-link\">Hu-manity.co</a>, the company known for introducing the 31st Human Right, to launch the Cookie Compliance™ web application."
|
1521 |
+
msgstr ""
|
1522 |
+
|
1523 |
+
#: ../includes/welcome.php:205
|
1524 |
+
msgid "Privacy Made Easy"
|
1525 |
+
msgstr ""
|
1526 |
+
|
1527 |
+
#: ../includes/welcome.php:208
|
1528 |
+
msgid "Cookie Compliance™ adds GDPR & CCPA compliance features, and a new Privacy Experience to Cookie Notice."
|
1529 |
+
msgstr ""
|
1530 |
+
|
1531 |
+
#: ../includes/welcome.php:214
|
1532 |
+
msgid "WP Plugin"
|
1533 |
+
msgstr ""
|
1534 |
+
|
1535 |
+
#: ../includes/welcome.php:218
|
1536 |
+
msgid "Customizable notice message"
|
1537 |
+
msgstr ""
|
1538 |
+
|
1539 |
+
#: ../includes/welcome.php:219
|
1540 |
+
msgid "Consent on click, scroll or close"
|
1541 |
+
msgstr ""
|
1542 |
+
|
1543 |
+
#: ../includes/welcome.php:220
|
1544 |
+
msgid "Multiple cookie expiry options"
|
1545 |
+
msgstr ""
|
1546 |
+
|
1547 |
+
#: ../includes/welcome.php:221
|
1548 |
+
msgid "Link to Privacy Policy page"
|
1549 |
+
msgstr ""
|
1550 |
+
|
1551 |
+
#: ../includes/welcome.php:230
|
1552 |
+
msgid "Web App"
|
1553 |
+
msgstr ""
|
1554 |
+
|
1555 |
+
#: ../includes/welcome.php:234
|
1556 |
+
msgid "Customizable <b>GDPR & CCPA</b> notice templates"
|
1557 |
+
msgstr ""
|
1558 |
+
|
1559 |
+
#: ../includes/welcome.php:235
|
1560 |
+
msgid "<b>Consent Analytics</b> Dashboard"
|
1561 |
+
msgstr ""
|
1562 |
+
|
1563 |
+
#: ../includes/welcome.php:236
|
1564 |
+
msgid "Cookie <b>Autoblocking</b> (complies with GDPR Art.7)"
|
1565 |
+
msgstr ""
|
1566 |
+
|
1567 |
+
#: ../includes/welcome.php:237
|
1568 |
+
msgid "<b>Cookie Categories</b> (complies with GDPR Art.32)"
|
1569 |
+
msgstr ""
|
1570 |
+
|
1571 |
+
#: ../includes/welcome.php:238
|
1572 |
+
msgid "<b>Proof-of-Consent</b> Storage (complies with GDPR Art.30)"
|
1573 |
+
msgstr ""
|
1574 |
+
|
1575 |
+
#: ../includes/welcome.php:239
|
1576 |
+
msgid "Link to <b>'Do Not Sell'</b> page (supports CCPA Sec.1798)"
|
1577 |
+
msgstr ""
|
1578 |
+
|
1579 |
+
#: ../includes/welcome.php:240
|
1580 |
+
msgid "Enhanced design controls and options"
|
1581 |
+
msgstr ""
|
1582 |
+
|
1583 |
+
#: ../includes/welcome.php:241
|
1584 |
+
msgid "Multiple new banner positions"
|
1585 |
+
msgstr ""
|
1586 |
+
|
1587 |
+
#: ../includes/welcome.php:242
|
1588 |
+
msgid "Custom language localization"
|
1589 |
+
msgstr ""
|
1590 |
+
|
1591 |
+
#: ../includes/welcome.php:256
|
1592 |
+
msgid "Welcome"
|
1593 |
+
msgstr ""
|
1594 |
+
|
1595 |
+
#: ../includes/welcome.php:257
|
1596 |
+
msgid "You are now Promoting Privacy"
|
1597 |
+
msgstr ""
|
1598 |
+
|
1599 |
+
#: ../includes/welcome.php:259
|
1600 |
+
msgid "Log into the Cookie Compliance™ web application and continue configuring your Privacy Experience."
|
1601 |
+
msgstr ""
|
1602 |
+
|
1603 |
+
#: ../includes/welcome.php:262
|
1604 |
+
msgid "Go to Application"
|
1605 |
+
msgstr ""
|
1606 |
+
|
1607 |
+
#: ../includes/welcome.php:288 ../includes/welcome.php:399
|
1608 |
+
msgid "GDPR & CCPA Upgrade Ready"
|
1609 |
+
msgstr ""
|
1610 |
+
|
1611 |
+
#: ../includes/welcome.php:289
|
1612 |
+
msgid "Simulate Cookie Compliance™ on your site."
|
1613 |
+
msgstr ""
|
1614 |
+
|
1615 |
+
#: ../includes/welcome.php:289
|
1616 |
+
msgid "Click below to see what the next generation of Cookie Notice looks like running on your website."
|
1617 |
+
msgstr ""
|
1618 |
+
|
1619 |
+
#: ../includes/welcome.php:291
|
1620 |
+
msgid "Site URL"
|
1621 |
+
msgstr ""
|
1622 |
+
|
1623 |
+
#: ../includes/welcome.php:292
|
1624 |
+
msgid "Site Name"
|
1625 |
+
msgstr ""
|
1626 |
+
|
1627 |
+
#: ../includes/welcome.php:297
|
1628 |
+
msgid "Launch Live Demo"
|
1629 |
+
msgstr ""
|
1630 |
+
|
1631 |
+
#: ../includes/welcome.php:310
|
1632 |
+
msgid "Compliance Live Demo"
|
1633 |
+
msgstr ""
|
1634 |
+
|
1635 |
+
#: ../includes/welcome.php:311
|
1636 |
+
msgid "Simulate the upgraded Cookie Compliance™ design and compliance features through the options below. Click Save & Upgrade to create your Cookie Compliance™ account."
|
1637 |
+
msgstr ""
|
1638 |
+
|
1639 |
+
#: ../includes/welcome.php:315
|
1640 |
+
msgid "Banner Compliance"
|
1641 |
+
msgstr ""
|
1642 |
+
|
1643 |
+
#: ../includes/welcome.php:336
|
1644 |
+
msgid "Select the laws that apply to your business"
|
1645 |
+
msgstr ""
|
1646 |
+
|
1647 |
+
#: ../includes/welcome.php:338
|
1648 |
+
msgid "GDPR"
|
1649 |
+
msgstr ""
|
1650 |
+
|
1651 |
+
#: ../includes/welcome.php:339
|
1652 |
+
msgid "CCPA"
|
1653 |
+
msgstr ""
|
1654 |
+
|
1655 |
+
#: ../includes/welcome.php:343
|
1656 |
+
msgid "What kind of services is your site using? Check all that apply"
|
1657 |
+
msgstr ""
|
1658 |
+
|
1659 |
+
#: ../includes/welcome.php:345
|
1660 |
+
msgid "I use personalization services on my site"
|
1661 |
+
msgstr ""
|
1662 |
+
|
1663 |
+
#: ../includes/welcome.php:346
|
1664 |
+
msgid "I collect and analyse information about my website’s traffic"
|
1665 |
+
msgstr ""
|
1666 |
+
|
1667 |
+
#: ../includes/welcome.php:347
|
1668 |
+
msgid "I run targeted ads on my site using, for example, Google Adsense"
|
1669 |
+
msgstr ""
|
1670 |
+
|
1671 |
+
#: ../includes/welcome.php:353
|
1672 |
+
msgid "Banner Design"
|
1673 |
+
msgstr ""
|
1674 |
+
|
1675 |
+
#: ../includes/welcome.php:357
|
1676 |
+
msgid "Select your preferred display position"
|
1677 |
+
msgstr ""
|
1678 |
+
|
1679 |
+
#: ../includes/welcome.php:361
|
1680 |
+
msgid "Left"
|
1681 |
+
msgstr ""
|
1682 |
+
|
1683 |
+
#: ../includes/welcome.php:362
|
1684 |
+
msgid "Right"
|
1685 |
+
msgstr ""
|
1686 |
+
|
1687 |
+
#: ../includes/welcome.php:363
|
1688 |
+
msgid "Center"
|
1689 |
+
msgstr ""
|
1690 |
+
|
1691 |
+
#: ../includes/welcome.php:367
|
1692 |
+
msgid "Adjust the banner color scheme"
|
1693 |
+
msgstr ""
|
1694 |
+
|
1695 |
+
#: ../includes/welcome.php:369
|
1696 |
+
msgid "Color of the buttons and interactive elements."
|
1697 |
+
msgstr ""
|
1698 |
+
|
1699 |
+
#: ../includes/welcome.php:370
|
1700 |
+
msgid "Color of the banner background."
|
1701 |
+
msgstr ""
|
1702 |
+
|
1703 |
+
#: ../includes/welcome.php:371
|
1704 |
+
msgid "Color of the borders and inactive elements."
|
1705 |
+
msgstr ""
|
1706 |
+
|
1707 |
+
#: ../includes/welcome.php:372
|
1708 |
+
msgid "Color of the body text."
|
1709 |
+
msgstr ""
|
1710 |
+
|
1711 |
+
#: ../includes/welcome.php:373
|
1712 |
+
msgid "Color of the heading text."
|
1713 |
+
msgstr ""
|
1714 |
+
|
1715 |
+
#: ../includes/welcome.php:374
|
1716 |
+
msgid "Color of the button text."
|
1717 |
+
msgstr ""
|
1718 |
+
|
1719 |
+
#: ../includes/welcome.php:381
|
1720 |
+
msgid "Add Compliance"
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: ../includes/welcome.php:401
|
1724 |
+
msgid "Create an account to start using Cooking Compliance™ - The next generation of Cookie Notice."
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: ../includes/welcome.php:405 ../includes/welcome.php:505
|
1728 |
+
msgid "Compliance Account"
|
1729 |
+
msgstr ""
|
1730 |
+
|
1731 |
+
#: ../includes/welcome.php:410 ../includes/welcome.php:510
|
1732 |
+
msgid "Email address"
|
1733 |
+
msgstr ""
|
1734 |
+
|
1735 |
+
#: ../includes/welcome.php:413 ../includes/welcome.php:513
|
1736 |
+
msgid "Password"
|
1737 |
+
msgstr ""
|
1738 |
+
|
1739 |
+
#: ../includes/welcome.php:416
|
1740 |
+
msgid "Confirm Password"
|
1741 |
+
msgstr ""
|
1742 |
+
|
1743 |
+
#: ../includes/welcome.php:420
|
1744 |
+
msgid "I have read and agree to the"
|
1745 |
+
msgstr ""
|
1746 |
+
|
1747 |
+
#: ../includes/welcome.php:420
|
1748 |
+
msgid "Terms of Service"
|
1749 |
+
msgstr ""
|
1750 |
+
|
1751 |
+
#: ../includes/welcome.php:424
|
1752 |
+
msgid "Sign Up"
|
1753 |
+
msgstr ""
|
1754 |
+
|
1755 |
+
#: ../includes/welcome.php:438
|
1756 |
+
msgid "Already have an account? <a href=\"#\" class=\"cn-screen-button\" data-screen=\"login\">Sign in</a>"
|
1757 |
+
msgstr ""
|
1758 |
+
|
1759 |
+
#: ../includes/welcome.php:443 ../includes/welcome.php:535
|
1760 |
+
msgid "Compliance Plan"
|
1761 |
+
msgstr ""
|
1762 |
+
|
1763 |
+
#: ../includes/welcome.php:449 ../includes/welcome.php:541
|
1764 |
+
msgid "/mo"
|
1765 |
+
msgstr ""
|
1766 |
+
|
1767 |
+
#: ../includes/welcome.php:450 ../includes/welcome.php:542
|
1768 |
+
msgid "/yr"
|
1769 |
+
msgstr ""
|
1770 |
+
|
1771 |
+
#: ../includes/welcome.php:454 ../includes/welcome.php:546
|
1772 |
+
msgid "Payment Method"
|
1773 |
+
msgstr ""
|
1774 |
+
|
1775 |
+
#: ../includes/welcome.php:456 ../includes/welcome.php:548
|
1776 |
+
msgid "Credit Card"
|
1777 |
+
msgstr ""
|
1778 |
+
|
1779 |
+
#: ../includes/welcome.php:457 ../includes/welcome.php:549
|
1780 |
+
msgid "PayPal"
|
1781 |
+
msgstr ""
|
1782 |
+
|
1783 |
+
#: ../includes/welcome.php:463 ../includes/welcome.php:555
|
1784 |
+
msgid "Card Number"
|
1785 |
+
msgstr ""
|
1786 |
+
|
1787 |
+
#: ../includes/welcome.php:467 ../includes/welcome.php:559
|
1788 |
+
msgid "Expiration Date"
|
1789 |
+
msgstr ""
|
1790 |
+
|
1791 |
+
#: ../includes/welcome.php:471 ../includes/welcome.php:563
|
1792 |
+
msgid "CVC/CVV"
|
1793 |
+
msgstr ""
|
1794 |
+
|
1795 |
+
#: ../includes/welcome.php:475 ../includes/welcome.php:567
|
1796 |
+
msgid "Subscribe"
|
1797 |
+
msgstr ""
|
1798 |
+
|
1799 |
+
#: ../includes/welcome.php:499
|
1800 |
+
msgid "Compliance Sign in"
|
1801 |
+
msgstr ""
|
1802 |
+
|
1803 |
+
#: ../includes/welcome.php:501
|
1804 |
+
msgid "Sign in to your existing Cooking Compliance™ account to upgrade this website."
|
1805 |
+
msgstr ""
|
1806 |
+
|
1807 |
+
#: ../includes/welcome.php:516
|
1808 |
+
msgid "Sign in"
|
1809 |
+
msgstr ""
|
1810 |
+
|
1811 |
+
#: ../includes/welcome.php:530
|
1812 |
+
msgid "Don't have an account yet? <a href=\"#\" class=\"cn-screen-button\" data-screen=\"register\">Sign up</a>"
|
1813 |
+
msgstr ""
|
1814 |
+
|
1815 |
+
#: ../includes/welcome.php:591
|
1816 |
+
msgid "Success!"
|
1817 |
+
msgstr ""
|
1818 |
+
|
1819 |
+
#: ../includes/welcome.php:592
|
1820 |
+
msgid "You have successfully upgraded your website to Cookie Compliance™"
|
1821 |
+
msgstr ""
|
1822 |
+
|
1823 |
+
#: ../includes/welcome.php:592
|
1824 |
+
#, php-format
|
1825 |
+
msgid "Go to Cookie Compliance™ application now. Or access it anytime from your <a href=\"%s\">Cookie Notice settings page</a>."
|
1826 |
+
msgstr ""
|
1827 |
+
|
1828 |
+
#: ../includes/welcome.php:601
|
1829 |
+
msgid "Remind me later"
|
1830 |
+
msgstr ""
|
1831 |
+
|
1832 |
+
#: ../includes/welcome.php:604
|
1833 |
+
msgid "WordPress Dashboard"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: ../includes/welcome.php:607
|
1837 |
+
msgid "Skip for now"
|
1838 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,56 +1,46 @@
|
|
1 |
-
=== Cookie Notice for GDPR
|
2 |
-
Contributors:
|
3 |
-
|
4 |
-
|
5 |
-
Requires
|
6 |
-
|
7 |
-
|
8 |
-
Stable tag: 1.3.2
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
11 |
|
12 |
-
Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
|
20 |
-
|
|
|
21 |
|
22 |
-
|
23 |
-
|
|
|
|
|
24 |
* Multiple cookie expiry options
|
25 |
* Link to Privacy Policy page
|
26 |
* WordPress Privacy Policy page synchronization
|
27 |
-
* Option to accept the notice on scroll
|
28 |
-
* Option to set on scroll offset
|
29 |
-
* Option to accept the notice with any page click
|
30 |
-
* Option to refuse the consent
|
31 |
-
* Option to revoke the consent
|
32 |
-
* Option to manually block scripts
|
33 |
-
* Option to reload the page after accepting the notice
|
34 |
-
* Select the position of the notice container
|
35 |
-
* Select the position of the privacy policy link
|
36 |
-
* Animate the container after notice is accepted
|
37 |
-
* Select from 3 buttons style
|
38 |
-
* Set the text and bar background colors
|
39 |
* WPML and Polylang compatible
|
40 |
* SEO friendly
|
41 |
-
* .pot file for translations included
|
42 |
-
|
43 |
-
= Usage: =
|
44 |
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
-
= Get involved =
|
52 |
-
|
53 |
-
Feel free to contribute to the source code on the [dFactory GitHub Repository](https://github.com/dfactoryplugins).
|
54 |
|
55 |
== Installation ==
|
56 |
|
@@ -68,6 +58,9 @@ No questions yet.
|
|
68 |
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
71 |
= 1.3.2 =
|
72 |
* Tweak: Speed up Corona Banner loading by moving JS file to footer with async parameter
|
73 |
* Tweak: Improve buttons CSS padding
|
@@ -305,7 +298,5 @@ Initial release
|
|
305 |
|
306 |
== Upgrade Notice ==
|
307 |
|
308 |
-
=
|
309 |
-
*
|
310 |
-
* Tweak: Improve buttons CSS padding
|
311 |
-
* Tweak: Accessibility improvements on links
|
1 |
+
=== Cookie Notice & Compliance for GDPR / CCPA ===
|
2 |
+
Contributors: humanityco
|
3 |
+
Tags: gdpr, ccpa, cookies, consent, compliance
|
4 |
+
Requires at least: 4.3
|
5 |
+
Requires PHP: 5.3
|
6 |
+
Tested up to: 5.6
|
7 |
+
Stable tag: 2.0.0
|
|
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
11 |
+
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.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Cookie Notice provides a simple, customizable website banner that can be used to help your website comply with certain cookie consent requirements under the EU GDPR cookie law and CCPA regulations.
|
16 |
|
17 |
+
Cookie Compliance enhances the functionality of Cookie Notice by providing automated compliance features and better design controls in a state-of-the-art web application.
|
18 |
|
19 |
+
> Cookie Compliance was developed to help small, and medium-sized websites <strong>take the guesswork out of compliance</strong>. We have always taken pride in delivering value to our Cookie Notice users. Through our upgraded Cookie Compliance web application, we can continue to deliver value by helping web admins respect the privacy of their website visitors without affecting their ability to do business.<br>
|
20 |
+
> Bartosz Arendt - original developer of Cookie Notice + VP of Product & Technology @hu-manity.co
|
21 |
|
22 |
+
= Cookie Notice Features: =
|
23 |
+
|
24 |
+
* Customizable notice message
|
25 |
+
* Consent on click, scroll or close
|
26 |
* Multiple cookie expiry options
|
27 |
* Link to Privacy Policy page
|
28 |
* WordPress Privacy Policy page synchronization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
* WPML and Polylang compatible
|
30 |
* SEO friendly
|
|
|
|
|
|
|
31 |
|
32 |
+
= Cookie Compliance Features: =
|
33 |
|
34 |
+
* Customizable GDPR & CCPA notice templates
|
35 |
+
* Consent Analytics Dashboard
|
36 |
+
* Cookie Autoblocking (complies with GDPR Art.7)
|
37 |
+
* Cookie Categories (complies with GDPR Art.32)
|
38 |
+
* Proof-of-Consent Storage (complies with GDPR Art.30)
|
39 |
+
* Link to 'Do Not Sell' page (supports CCPA Sec.1798)
|
40 |
+
* Enhanced design controls and options
|
41 |
+
* Multiple new banner positions
|
42 |
+
* Custom language localization
|
43 |
|
|
|
|
|
|
|
44 |
|
45 |
== Installation ==
|
46 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 2.0.0 =
|
62 |
+
* New: Introducing Cookie Compliance for GDPR/CCPA
|
63 |
+
|
64 |
= 1.3.2 =
|
65 |
* Tweak: Speed up Corona Banner loading by moving JS file to footer with async parameter
|
66 |
* Tweak: Improve buttons CSS padding
|
298 |
|
299 |
== Upgrade Notice ==
|
300 |
|
301 |
+
= 2.0.0 =
|
302 |
+
* New: Introducing Cookie Compliance for GDPR/CCPA
|
|
|
|
templates/empty.html
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<!-- BLOCKED -->
|