facetwp change text by translating

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** example of changing a text string using wp’s gettext filter **/
add_filter( ‘gettext’, function ( $translated_text, $untranslated_text, $domain ) {
if ( $translated_text == ‘Enter location’ && ‘fwp’ == $domain ) {
$translated_text = ‘Other text’;
}
return $translated_text;
}, 10, 3 );
{{/gist}}