Created
May 10, 2018 23:50
-
-
Save djrmom/fad7778420839d759efa7187023271a6 to your computer and use it in GitHub Desktop.
facetwp replace date picker placeholder text
This file contains hidden or 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 the "Date" or "Start Date" or "End Date" text in the datepicker | |
| ** Other langauges may have different text to replace as well | |
| **/ | |
| add_filter( 'facetwp_facet_html', function( $output, $params ) { | |
| if ( 'my_date_facet' == $params['facet']['name'] ) { // change 'my_date_facet' to the name of your date picker facet | |
| $output = str_replace( 'placeholder="Date"', 'placeholder="mm/dd/yyyy"', $output ); | |
| } | |
| return $output; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment