Created
November 5, 2018 21:51
-
-
Save KaineLabs/b4d2e13ec5b5671cf691c204ade4824d to your computer and use it in GitHub Desktop.
Translate __x Words
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 | |
/** | |
* Translate __x Words. | |
*/ | |
function yzc_translate_x_words( $translated_text ) { | |
switch ( $translated_text ) { | |
case 'Friendships' : | |
$translated_text = 'Connections'; | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext_with_context', 'yzc_translate_x_words', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment