Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created February 9, 2022 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webtoffee-git/51af930b56e4c350767a4ba86f2a87ec to your computer and use it in GitHub Desktop.
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/)
<?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