Skip to content

Instantly share code, notes, and snippets.

Last active October 12, 2021 11:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
To modify the functionality of shortcode [cookie_close] from 'Accept' to just 'Close' - CookieYes | GDPR Cookie Consent (Free & Pro)
<?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'))
jQuery(function ($) {
$('.cli_cookie_close_button').attr('title', 'Close');
$('.cli_cookie_close_button').off('click').on('click', function(e) {
if(CLI.settings.notify_animate_hide) {
CLI.bar_elm.slideUp( CLI.settings.animate_speed_hide );
}else {
if(CLI.settings.showagain_tab) {
CLI.showagain_elm.slideDown( CLI.settings.animate_speed_show );
return false;
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