Created
February 9, 2022 08:59
-
-
Save webtoffee-git/51af930b56e4c350767a4ba86f2a87ec to your computer and use it in GitHub Desktop.
To change the text ‘Save & Accept’ - CookieYes | GDPR Cookie Consent (https://wordpress.org/plugins/cookie-law-info/)
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 change the text Save & Accept - GDPR Cookie Consent | |
function wt_cli_change_save_and_accept_text() { | |
if(!class_exists('Cookie_Law_Info')) | |
return; | |
$new_text = __('Confirm my choices', 'cookie-law-info'); | |
?> | |
<script> | |
jQuery(function() { | |
if( jQuery('.cli_setting_save_button').length > 0 ) { | |
jQuery('.cli_setting_save_button').text("<?php echo $new_text; ?>"); | |
} | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_footer','wt_cli_change_save_and_accept_text'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment