Created
January 17, 2022 20:55
-
-
Save cuxaro/fb9b2f0a12ef754c504410c0c19da301 to your computer and use it in GitHub Desktop.
hooks GDPR WordPress
This file contains hidden or 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 | |
add_action('init', function () { | |
if (function_exists('gdpr_cookie_is_accepted')) : | |
if (gdpr_cookie_is_accepted('thirdparty')) : | |
//Aquí va el código a ejecutar | |
endif; | |
endif; | |
}); | |
function ib_gdpr_prevent_script_cache() | |
{ | |
return array(); | |
} | |
add_filter('gdpr_cookie_script_cache', 'ib_gdpr_prevent_script_cache'); | |
add_action('gdpr_force_reload', '__return_true'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment