Last active
May 21, 2021 13:25
-
-
Save AertHulsebos/d0b84fe3c45230c6c62f64d7118bb435 to your computer and use it in GitHub Desktop.
Whitelist inline script so Complianz' cookie blocker skips script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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