Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created December 10, 2019 22:52
Show Gist options
  • Save joshfeck/d40061ce9f47b6295b6f31d57b59eeb3 to your computer and use it in GitHub Desktop.
Save joshfeck/d40061ce9f47b6295b6f31d57b59eeb3 to your computer and use it in GitHub Desktop.
Change "Not Approved" text to "Pending Approval" in Event Espresso 4
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