Created
December 4, 2017 06:23
-
-
Save raftaar1191/ba9b8d901a56eb0f1ea25b9f03a1b27d to your computer and use it in GitHub Desktop.
Change Text Translation Text in WordPress
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
/** | |
* Change Give Text | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function give_change_text_callback( $translated_text, $text, $domain ) { | |
if ( 'give' === $domain ) { | |
$translated_text = str_replace( "Donation", "Customer", $translated_text ); | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'give_change_text_callback', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notes: This can slow down your sites performance