Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Last active January 10, 2017 20:53
Show Gist options
  • Select an option

  • Save mgibbs189/eea3d274273e7b6aa2e0 to your computer and use it in GitHub Desktop.

Select an option

Save mgibbs189/eea3d274273e7b6aa2e0 to your computer and use it in GitHub Desktop.
FacetWP - translate strings using gettext
<?php
add_filter( 'gettext', function( $translated_text, $text, $domain ) {
if ( 'fwp' == $domain ) {
if ( 'Start typing...' == $translated_text ) {
$translated_text = 'The new placeholder';
}
}
return $translated_text;
}, 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment