Skip to content

Instantly share code, notes, and snippets.

@AertHulsebos
Last active May 21, 2021 13:25
Show Gist options
  • Save AertHulsebos/d0b84fe3c45230c6c62f64d7118bb435 to your computer and use it in GitHub Desktop.
Save AertHulsebos/d0b84fe3c45230c6c62f64d7118bb435 to your computer and use it in GitHub Desktop.
Whitelist inline script so Complianz' cookie blocker skips script.
<?php
// Whitelisting inline script for Complianz
add_filter ( 'cmplz_script_class',
function( $class, $total_match, $found ) {
if ( $found && false !== strpos( $total_match, 'YOUR-SCRIPT-ID' ) ) {
$class = 'cmplz-native'; // add cmplz-script for Marketing and cmplz-stats for Statistics
}
return $class;
}, 10 , 3
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment