Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Translate Like Button
<?php
/**
* Translate Like Button.
*/
function yzc_translate_text( $translated_text ) {
switch ( $translated_text ) {
case 'Like' :
$translated_text = __( 'Upvote', 'youzer' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'yzc_translate_text', 30 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment