-
-
Save Benunc/6eaa0d5aa685897fe14988e52de8b5aa to your computer and use it in GitHub Desktop.
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 | |
function my_give_comment_text_switcher( $translations, $text, $domain ) { | |
// changes the "Donations" text in multiple places | |
if ( $domain == 'give' && $text == 'Comment' ) { | |
$translations = __( 'TITLE', 'give' ); | |
} | |
// changes the "Make this Donation [monthly/weekly/daily]" | |
// text for a donor's choice recurring checkbox | |
if ( $domain == 'give' && $translations == 'Leave a comment' ) { | |
$translations = __( 'YOUR TEXT HERE', 'give' ); | |
} | |
return $translations; | |
} | |
add_filter( 'gettext', 'my_give_comment_text_switcher', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment