Skip to content

Instantly share code, notes, and snippets.

View AertHulsebos's full-sized avatar

Aert Hulsebos AertHulsebos

View GitHub Profile
/* New properties */
.cmplz-slider-checkbox{} /* styles for the checkboxes */
.cc-accept-all{} /* styles for the accept all button */
/* We need the following classes to achieve below customized banner:*/
.cc-window{} /* styles for the cookie banner window */
.cc-btn{} /*styles for the buttons*/
.cc-window {
border-bottom: 5px solid #000;
border-radius: 15px;
box-shadow:
0 1px 2px rgba(0,0,0,0.07),
0 2px 4px rgba(0,0,0,0.07),
0 4px 8px rgba(0,0,0,0.07),
0 8px 16px rgba(0,0,0,0.07),
0 16px 32px rgba(0,0,0,0.07),
0 32px 64px rgba(0,0,0,0.07);
<?php
add_filter("cmplz_region_for_country", "my_cmplz_override_region", 10, 2);
function my_cmplz_override_region($region, $country_code){
//if country code is not supported, return us as region, so banner will behave as for US
if (!$region) {
$region = 'us';
}
return $region;
}
<?php
add_filter("cmplz_region_for_country", "my_cmplz_override_region", 10, 2);
function my_cmplz_override_region($region, $country_code){
//if country code is 'CH'(Switzerland) , return us as region, so banner will behave as for EU
if ($country_code === 'CH'){
$region = 'eu';
}
return $region;
}
<?php
/* Force the Cookie Banner, although one is not required */
add_filter( 'cmplz_site_needs_cookiewarning', 'cmplz_force_banner' );
function cmplz_force_banner($required){
return true;
}
<?php defined( 'ABSPATH' ) or die( "you do not have acces to this page!" );
add_action( 'wp_footer', 'cmplz_consent_on_event_settings', 100);
function cmplz_consent_on_event_settings() {
// If you use the GEO IP Setting (Pro feature), you can select in which country this should be enabled.
// When the setting is disabled or you are using the free version of Complianz this will affect all regions.
$enable_for_regions = array ('au'); // select regions comma separated
$consent_on_scroll = true; // change to 'false' to disable
$consent_on_timeout = true; // change to 'false' to disable
$consent_timeout = 15; // time in seconds
@media only screen and (max-width: 600px) {
#cmplz-cookies-overview .cmplz-dropdown.cmplz-dropdown-cookiepolicy .cookies-per-purpose,
#cmplz-document .cmplz-dropdown.cmplz-dropdown-cookiepolicy .cookies-per-purpose {
grid-template-columns:unset!important;
}
#primary .post .entry-content h5, #primary .page .entry-content h5 {
font-size: 16px!important;
word-wrap: break-word;
}
#primary .post .entry-content h4, #primary .page .entry-content h4 {
/* Styling for Consent Area Placeholder - Icon by Flaticons (Free) */
.cmplz-consent-area {
-moz-border-radius: 1px;
-webkit-border-radius: 1px;
background-color: #f0f7fb;
background-image: url("your-image-address-here");
background-position: 9px 11px;
background-repeat: no-repeat;
border: solid 1px #3498db;
border-radius: 5px;
[cmplz-consent-area category="marketing" service="google-maps" text="Enable this content by clicking this link"]
/* add your snippet or iFrame that needs to be blocked before consent */
[/cmplz-consent-area]
[cmplz-consent-area text="Enable this content by clicking this link"
hubspot type=form portal=803322859 id=66ef920b-453fb5-4679-b444-53f1397d0a73
/cmplz-consent-area]