Created
December 10, 2019 22:52
-
-
Save joshfeck/d40061ce9f47b6295b6f31d57b59eeb3 to your computer and use it in GitHub Desktop.
Change "Not Approved" text to "Pending Approval" in Event Espresso 4
This file contains hidden or 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
function im_custom_filter_gettext( | |
$translated, | |
$original, | |
$domain | |
) { | |
$strings = array( | |
'Not Approved' => 'Pending Approval', | |
'not approved' => 'Pending Approval', | |
// You can add some more strings here | |
); | |
if ( isset( $strings[$original] ) ) { | |
$translations = get_translations_for_domain( $domain ); | |
$translated = $translations->translate( $strings[$original] ); | |
} | |
return $translated; | |
} | |
add_filter( 'gettext', 'im_custom_filter_gettext', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment