Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created January 9, 2019 22:03
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 KaineLabs/19bb482669f279cbee1148c6d53e4078 to your computer and use it in GitHub Desktop.
Save KaineLabs/19bb482669f279cbee1148c6d53e4078 to your computer and use it in GitHub Desktop.
Change "Follow" & "Unfollow" Text.
<?php
/**
* Change "Follow" & "Unfollow" Text.
*/
function yzc_follows_translate_text( $translated_text ) {
switch ( $translated_text ) {
case 'Follow' :
$translated_text = __( 'New Follow Text', 'youzer' );
break;
case 'Unfollow' :
$translated_text = __( 'New unFollow Text', 'youzer' );
break;
}
return $translated_text;
}
add_filter( 'gettext_with_context', 'yzc_translate_text', 99999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment