Last active
December 9, 2022 14:10
-
-
Save webtoffee-git/6b2fa352a5207477091a674524c10412 to your computer and use it in GitHub Desktop.
Add more scripts to the default script blocker list using WebToffee GDPR Cookie Consent plugin
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
function scripts_list() { | |
$scripts = array( | |
array( | |
'id' => 'googletranslator', | |
'label' => 'GoogleTranslator', | |
'key' => array('translate.google.com/translate_a/element.js'), | |
'category' => 'analytics', | |
'status' => 'yes' | |
), | |
); | |
return $scripts; | |
} | |
add_filter('cli_extend_script_blocker', 'scripts_list', 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Isn't it better to wrap class_exists around it?