Skip to content

Instantly share code, notes, and snippets.

@djrmom
Created November 16, 2017 16:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrmom/3293378ff8653d3e5dfcc5628d6034fa to your computer and use it in GitHub Desktop.
Save djrmom/3293378ff8653d3e5dfcc5628d6034fa to your computer and use it in GitHub Desktop.
facetwp change autocomplete button text
<?php
/**
* replace "Update" for search button with different text
* change 'autocomplete_facet' to the name of your facet
* Note that this text is also translation ready and could be
* modified using internationalization functions as well
*/
add_filter( 'facetwp_facet_html', function( $output, $params ) {
if ( 'autocomplete_facet' == $params['facet']['name'] ) {
$output = str_replace( 'Update', 'Search', $output );
}
return $output;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment