Changeset 2706254
- Timestamp:
- 04/07/2022 09:50:35 AM (4 years ago)
- Location:
- consent-manager
- Files:
-
- 17 added
- 3 edited
-
tags/2.0.7 (added)
-
tags/2.0.7/ConsentManagerMain.php (added)
-
tags/2.0.7/assets (added)
-
tags/2.0.7/assets/css (added)
-
tags/2.0.7/assets/css/admin.css (added)
-
tags/2.0.7/assets/images (added)
-
tags/2.0.7/assets/images/cmpcdn.png (added)
-
tags/2.0.7/assets/images/cmpcodeid.png (added)
-
tags/2.0.7/assets/images/cmphost.png (added)
-
tags/2.0.7/assets/images/cmpid.png (added)
-
tags/2.0.7/assets/images/logo20.png (added)
-
tags/2.0.7/assets/images/logo_neu.jpg (added)
-
tags/2.0.7/assets/images/logo_neu.png (added)
-
tags/2.0.7/consentmanager.php (added)
-
tags/2.0.7/readme.txt (added)
-
tags/2.0.7/views (added)
-
tags/2.0.7/views/admin.php (added)
-
trunk/ConsentManagerMain.php (modified) (1 diff)
-
trunk/consentmanager.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
consent-manager/trunk/ConsentManagerMain.php
r2705892 r2706254 112 112 * @return string 113 113 */ 114 static function getSemiBlockingCode($id, $codeID, $host, $cdn)114 public static function getSemiBlockingCode($id, $codeID, $host, $cdn) 115 115 { 116 if((int)$id > 0 && $codeID != '') 117 { 116 if ((int)$id > 0 && $codeID != '') { 118 117 $id = 0; 119 118 } 120 119 return '<script>window.gdprAppliesGlobally=true;if(!("cmp_id" in window)||window.cmp_id<1){window.cmp_id=' . $id . '}if(!("cmp_cdid" in window)){window.cmp_cdid="' . $codeID . '"}if(!("cmp_params" in window)){window.cmp_params=""}if(!("cmp_host" in window)){window.cmp_host="' . $host . '"}if(!("cmp_cdn" in window)){window.cmp_cdn="' . $cdn . '"}if(!("cmp_proto" in window)){window.cmp_proto="https:"}if(!("cmp_codesrc" in window)){window.cmp_codesrc="10"}window.cmp_getsupportedLangs=function(){var b=["DE","EN","FR","IT","NO","DA","FI","ES","PT","RO","BG","ET","EL","GA","HR","LV","LT","MT","NL","PL","SV","SK","SL","CS","HU","RU","SR","ZH","TR","UK","AR","BS"];if("cmp_customlanguages" in window){for(var a=0;a<window.cmp_customlanguages.length;a++){b.push(window.cmp_customlanguages[a].l.toUpperCase())}}return b};window.cmp_getRTLLangs=function(){return["AR"]};window.cmp_getlang=function(j){if(typeof(j)!="boolean"){j=true}if(j&&typeof(cmp_getlang.usedlang)=="string"&&cmp_getlang.usedlang!==""){return cmp_getlang.usedlang}var g=window.cmp_getsupportedLangs();var c=[];var f=location.hash;var e=location.search;var a="languages" in navigator?navigator.languages:[];if(f.indexOf("cmplang=")!=-1){c.push(f.substr(f.indexOf("cmplang=")+8,2).toUpperCase())}else{if(e.indexOf("cmplang=")!=-1){c.push(e.substr(e.indexOf("cmplang=")+8,2).toUpperCase())}else{if("cmp_setlang" in window&&window.cmp_setlang!=""){c.push(window.cmp_setlang.toUpperCase())}else{if(a.length>0){for(var d=0;d<a.length;d++){c.push(a[d])}}}}}if("language" in navigator){c.push(navigator.language)}if("userLanguage" in navigator){c.push(navigator.userLanguage)}var h="";for(var d=0;d<c.length;d++){var b=c[d].toUpperCase();if(g.indexOf(b)!=-1){h=b;break}if(b.indexOf("-")!=-1){b=b.substr(0,2)}if(g.indexOf(b)!=-1){h=b;break}}if(h==""&&typeof(cmp_getlang.defaultlang)=="string"&&cmp_getlang.defaultlang!==""){return cmp_getlang.defaultlang}else{if(h==""){h="EN"}}h=h.toUpperCase();return h};(function(){var n=document;var p=window;var f="";var b="_en";if("cmp_getlang" in p){f=p.cmp_getlang().toLowerCase();if("cmp_customlanguages" in p){for(var h=0;h<p.cmp_customlanguages.length;h++){if(p.cmp_customlanguages[h].l.toUpperCase()==f.toUpperCase()){f="en";break}}}b="_"+f}function g(e,d){var l="";e+="=";var i=e.length;if(location.hash.indexOf(e)!=-1){l=location.hash.substr(location.hash.indexOf(e)+i,9999)}else{if(location.search.indexOf(e)!=-1){l=location.search.substr(location.search.indexOf(e)+i,9999)}else{return d}}if(l.indexOf("&")!=-1){l=l.substr(0,l.indexOf("&"))}return l}var j=("cmp_proto" in p)?p.cmp_proto:"https:";var o=["cmp_id","cmp_params","cmp_host","cmp_cdn","cmp_proto"];for(var h=0;h<o.length;h++){if(g(o[h],"%%%")!="%%%"){window[o[h]]=g(o[h],"")}}var k=("cmp_ref" in p)?p.cmp_ref:location.href;var q=n.createElement("script");q.setAttribute("data-cmp-ab","1");var c=g("cmpdesign","");var a=g("cmpregulationkey","");q.src=j+"//"+p.cmp_host+"/delivery/cmp.php?"+("cmp_id" in p&&p.cmp_id>0?"id="+p.cmp_id:"")+("cmp_cdid" in p?"cdid="+p.cmp_cdid:"")+"&h="+encodeURIComponent(k)+(c!=""?"&cmpdesign="+encodeURIComponent(c):"")+(a!=""?"&cmpregulationkey="+encodeURIComponent(a):"")+("cmp_params" in p?"&"+p.cmp_params:"")+(n.cookie.length>0?"&__cmpfcc=1":"")+"&l="+f.toLowerCase()+"&o="+(new Date()).getTime();q.type="text/javascript";q.async=true;if(n.currentScript){n.currentScript.parentElement.appendChild(q)}else{if(n.body){n.body.appendChild(q)}else{var m=n.getElementsByTagName("body");if(m.length==0){m=n.getElementsByTagName("div")}if(m.length==0){m=n.getElementsByTagName("span")}if(m.length==0){m=n.getElementsByTagName("ins")}if(m.length==0){m=n.getElementsByTagName("script")}if(m.length==0){m=n.getElementsByTagName("head")}if(m.length>0){m[0].appendChild(q)}}}var q=n.createElement("script");q.src=j+"//"+p.cmp_cdn+"/delivery/js/cmp"+b+".min.js";q.type="text/javascript";q.setAttribute("data-cmp-ab","1");q.async=true;if(n.currentScript){n.currentScript.parentElement.appendChild(q)}else{if(n.body){n.body.appendChild(q)}else{var m=n.getElementsByTagName("body");if(m.length==0){m=n.getElementsByTagName("div")}if(m.length==0){m=n.getElementsByTagName("span")}if(m.length==0){m=n.getElementsByTagName("ins")}if(m.length==0){m=n.getElementsByTagName("script")}if(m.length==0){m=n.getElementsByTagName("head")}if(m.length>0){m[0].appendChild(q)}}}})();window.cmp_addFrame=function(b){if(!window.frames[b]){if(document.body){var a=document.createElement("iframe");a.style.cssText="display:none";a.name=b;document.body.appendChild(a)}else{window.setTimeout(window.cmp_addFrame,10,b)}}};window.cmp_rc=function(h){var b=document.cookie;var f="";var d=0;while(b!=""&&d<100){d++;while(b.substr(0,1)==" "){b=b.substr(1,b.length)}var g=b.substring(0,b.indexOf("="));if(b.indexOf(";")!=-1){var c=b.substring(b.indexOf("=")+1,b.indexOf(";"))}else{var c=b.substr(b.indexOf("=")+1,b.length)}if(h==g){f=c}var e=b.indexOf(";")+1;if(e==0){e=b.length}b=b.substring(e,b.length)}return(f)};window.cmp_stub=function(){var a=arguments;__cmapi.a=__cmapi.a||[];if(!a.length){return __cmapi.a}else{if(a[0]==="ping"){if(a[1]===2){a[2]({gdprApplies:gdprAppliesGlobally,cmpLoaded:false,cmpStatus:"stub",displayStatus:"hidden",apiVersion:"2.0",cmpId:31},true)}else{a[2](false,true)}}else{if(a[0]==="getUSPData"){a[2]({version:1,uspString:window.cmp_rc("")},true)}else{if(a[0]==="getTCData"){__cmapi.a.push([].slice.apply(a))}else{if(a[0]==="addEventListener"||a[0]==="removeEventListener"){__cmapi.a.push([].slice.apply(a))}else{if(a.length==4&&a[3]===false){a[2]({},false)}else{__cmapi.a.push([].slice.apply(a))}}}}}}};window.cmp_msghandler=function(d){var a=typeof d.data==="string";try{var c=a?JSON.parse(d.data):d.data}catch(f){var c=null}if(typeof(c)==="object"&&c!==null&&"__cmpCall" in c){var b=c.__cmpCall;window.__cmp(b.command,b.parameter,function(h,g){var e={__cmpReturn:{returnValue:h,success:g,callId:b.callId}};d.source.postMessage(a?JSON.stringify(e):e,"*")})}if(typeof(c)==="object"&&c!==null&&"__cmapiCall" in c){var b=c.__cmapiCall;window.__cmapi(b.command,b.parameter,function(h,g){var e={__cmapiReturn:{returnValue:h,success:g,callId:b.callId}};d.source.postMessage(a?JSON.stringify(e):e,"*")})}if(typeof(c)==="object"&&c!==null&&"__uspapiCall" in c){var b=c.__uspapiCall;window.__uspapi(b.command,b.version,function(h,g){var e={__uspapiReturn:{returnValue:h,success:g,callId:b.callId}};d.source.postMessage(a?JSON.stringify(e):e,"*")})}if(typeof(c)==="object"&&c!==null&&"__tcfapiCall" in c){var b=c.__tcfapiCall;window.__tcfapi(b.command,b.version,function(h,g){var e={__tcfapiReturn:{returnValue:h,success:g,callId:b.callId}};d.source.postMessage(a?JSON.stringify(e):e,"*")},b.parameter)}};window.cmp_setStub=function(a){if(!(a in window)||(typeof(window[a])!=="function"&&typeof(window[a])!=="object"&&(typeof(window[a])==="undefined"||window[a]!==null))){window[a]=window.cmp_stub;window[a].msgHandler=window.cmp_msghandler;window.addEventListener("message",window.cmp_msghandler,false)}};window.cmp_addFrame("__cmapiLocator");window.cmp_addFrame("__cmpLocator");window.cmp_addFrame("__uspapiLocator");window.cmp_addFrame("__tcfapiLocator");window.cmp_setStub("__cmapi");window.cmp_setStub("__cmp");window.cmp_setStub("__tcfapi");window.cmp_setStub("__uspapi");</script>'; 121 120 } 121 122 /** 123 * @param $url 124 * @return array|string|string[] 125 */ 126 public static function removeProtocol($url) 127 { 128 $removeProtocol = array('http://', 'https://'); 129 return str_replace($removeProtocol, '', $url); 130 } 131 122 132 123 133 /** -
consent-manager/trunk/consentmanager.php
r2705892 r2706254 5 5 Plugin Name: consentmanager 6 6 Description: consentmanager is the easiest way to reach the new privacy standard | GDPR/CCPA/PIPEDA/LGPD/PIPA Cookie Solution | Consent Management Provider 7 Version: 2.0. 67 Version: 2.0.7 8 8 Author: consentmanager 9 9 Author URI: https://www.consentmanager.net … … 19 19 $cmpCodeID = esc_attr(get_option(ConsentManagerMain::getOptionCodeID(), '')); 20 20 21 $removeProtocol = ['http://', 'https://'];22 23 21 $host = esc_attr(get_option(ConsentManagerMain::getOptionHost(), '')); 24 22 if ($host == '') { 25 23 $host = esc_attr(get_option(ConsentManagerMain::getHost(), 'delivery.consentmanager.net')); 26 } else { 27 $host = str_replace($removeProtocol, '', $host); 28 } 24 } 25 $host = ConsentManagerMain::removeProtocol($host); 29 26 30 27 $cdn = esc_attr(get_option(ConsentManagerMain::getOptionCDN(), '')); 31 28 if ($cdn == '') { 32 29 $cdn = esc_attr(get_option(ConsentManagerMain::getCDN(), 'cdn.consentmanager.net')); 33 } else { 34 $cdn = str_replace($removeProtocol, '', $cdn); 35 } 30 } 31 $cdn = ConsentManagerMain::removeProtocol($cdn); 36 32 37 33 if ($cmpCodeID != '') { … … 112 108 $host = esc_attr(get_option(ConsentManagerMain::getHost(), 'delivery.consentmanager.net')); 113 109 } 110 $host = ConsentManagerMain::removeProtocol($host); 111 114 112 $cdn = esc_attr(get_option(ConsentManagerMain::getOptionCDN(), '')); 115 113 if ($cdn == '') { 116 114 $cdn = esc_attr(get_option(ConsentManagerMain::getCDN(), 'cdn.consentmanager.net')); 117 115 } 116 $cdn = ConsentManagerMain::removeProtocol($cdn); 118 117 119 118 if ($cmpID > 0 || $cmpCodeID != '') { … … 280 279 } 281 280 } 281 282 282 283 283 -
consent-manager/trunk/readme.txt
r2705892 r2706254 5 5 Requires at least: 3.0 6 6 Tested up to: 5.9 7 Stable tag: 2.0. 67 Stable tag: 2.0.7 8 8 Requires PHP: 5.4 9 9 License: GPLv2
Note: See TracChangeset
for help on using the changeset viewer.