Last active
November 14, 2017 08:16
Listify Snippet: Change Location Field to Address
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 | |
| /** | |
| * Change The Location Fields to "Address" | |
| * | |
| * @link https://gist.github.com/turtlepod/e05053729577fdbf2daa604bb32271b7 | |
| */ | |
| add_action( 'init', function() { | |
| // Filter/modify submit form fields. | |
| add_filter( 'submit_job_form_fields', function( $fields ) { | |
| // Check if job location fields is set. | |
| if ( isset( $fields['job']['job_location'] ) ) { | |
| // Change the label. | |
| $fields['job']['job_location']['label'] = 'Address'; | |
| // Change description text. | |
| $fields['job']['job_location']['description'] = 'Add your address here.'; | |
| // Change the placeholder text. | |
| $fields['job']['job_location']['placeholder'] = 'Type your address here.'; | |
| } | |
| return $fields; | |
| }, 99 ); | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment