Skip to content

Instantly share code, notes, and snippets.

@pryley pryley/functions.php
Last active Mar 30, 2017

Embed
What would you like to do?
[Site Reviews snippet] Custom text strings
<?php
// Translate text strings
// http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
add_filter( 'gettext', function( $translated_text, $text, $domain ) {
    return ( $domain == 'site-reviews' && $translated_text == 'Submit your review' )
        ? __( 'Make it so!', 'site-reviews-custom' )
        : $translated_text;
}, 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.