Created
October 22, 2020 15:35
-
-
Save yousufansa/d62387be048c9bea17bc485e7d17a653 to your computer and use it in GitHub Desktop.
Jobhunt - Change Post A Job Form Custom Taxonomy Fields to Select
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
| if ( ! function_exists( 'jh_child_submit_job_form_change_multiselect_field_to_select_field' ) ) { | |
| function jh_child_submit_job_form_change_multiselect_field_to_select_field( $fields ) { | |
| if( isset( $fields['job']['job_category'] ) ) { | |
| $fields['job']['job_category']['type'] = 'term-select'; | |
| $fields['job']['job_category']['default'] = ''; | |
| } | |
| if( isset( $fields['job']['job_listing_salary'] ) ) { | |
| $fields['job']['job_listing_salary']['type'] = 'term-select'; | |
| $fields['job']['job_listing_salary']['default'] = ''; | |
| } | |
| if( isset( $fields['job']['job_listing_career_level'] ) ) { | |
| $fields['job']['job_listing_career_level']['type'] = 'term-select'; | |
| $fields['job']['job_listing_career_level']['default'] = ''; | |
| } | |
| if( isset( $fields['job']['job_listing_experience'] ) ) { | |
| $fields['job']['job_listing_experience']['type'] = 'term-select'; | |
| $fields['job']['job_listing_experience']['default'] = ''; | |
| } | |
| if( isset( $fields['job']['job_listing_gender'] ) ) { | |
| $fields['job']['job_listing_gender']['type'] = 'term-select'; | |
| $fields['job']['job_listing_gender']['default'] = ''; | |
| } | |
| if( isset( $fields['job']['job_listing_industry'] ) ) { | |
| $fields['job']['job_listing_industry']['type'] = 'term-select'; | |
| $fields['job']['job_listing_industry']['default'] = ''; | |
| } | |
| if( isset( $fields['job']['job_listing_qualification'] ) ) { | |
| $fields['job']['job_listing_qualification']['type'] = 'term-select'; | |
| $fields['job']['job_listing_qualification']['default'] = ''; | |
| } | |
| return $fields; | |
| } | |
| } | |
| add_filter( 'submit_job_form_fields', 'jh_child_submit_job_form_change_multiselect_field_to_select_field', 30 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment