To modify the functionality of shortcode [cookie_close] from 'Accept' to just 'Close' - CookieYes | GDPR Cookie Consent (Free & Pro)
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 // do not copy this line | |
// To modify the [cookie_close] functionality - CookieYes | GDPR Cookie Consent | |
function wt_cli_custom_close_action () { | |
if (!class_exists('Cookie_Law_Info')) | |
return; | |
?> | |
<script> | |
jQuery(function ($) { | |
$('.cli_cookie_close_button').attr('title', 'Close'); | |
$('.cli_cookie_close_button').off('click').on('click', function(e) { | |
CLI.hidePopupOverlay(); | |
if(CLI.settings.notify_animate_hide) { | |
CLI.bar_elm.slideUp( CLI.settings.animate_speed_hide ); | |
}else { | |
CLI.bar_elm.hide(); | |
} | |
if(CLI.settings.showagain_tab) { | |
CLI.showagain_elm.slideDown( CLI.settings.animate_speed_show ); | |
} | |
return false; | |
}); | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_footer', 'wt_cli_custom_close_action'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment