Created
November 16, 2017 16:02
-
-
Save djrmom/3293378ff8653d3e5dfcc5628d6034fa to your computer and use it in GitHub Desktop.
facetwp change autocomplete button text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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