Skip to content

Instantly share code, notes, and snippets.

/gist.md Secret

Created April 14, 2016 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/213620bf64c3f42ebd716f46d29b0cf2 to your computer and use it in GitHub Desktop.
Save anonymous/213620bf64c3f42ebd716f46d29b0cf2 to your computer and use it in GitHub Desktop.
function ee_custom_messaging_changes( $translated, $original, $domain ) {
    $strings = array(
        'upcoming' => 'Próximamente',
        'Upcoming' => 'Próximamente',
    );
    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
}
add_filter( 'gettext', 'ee_custom_messaging_changes', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment