Skip to content

Instantly share code, notes, and snippets.

@wtmujeebu
Created May 21, 2021 05:26
Show Gist options
  • Save wtmujeebu/bb9b67374b464307cef4eee8dacf1d0f to your computer and use it in GitHub Desktop.
Save wtmujeebu/bb9b67374b464307cef4eee8dacf1d0f to your computer and use it in GitHub Desktop.
To remove any conflicting click event from the accordion of settings popup - CookieYes GDPR Cookie Consent
<?php
add_action('wp_footer', 'wt_cli_remove_conflict_click_event');
function wt_cli_remove_conflict_click_event() {
if (class_exists('Cookie_Law_Info')) {
?>
<script>
jQuery(function() {
setTimeout(function() {
jQuery('.cli-modal-body a[data-target]').off('click');
}, 200);
});
</script>
<?php
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment