Created
October 27, 2020 16:10
-
-
Save yousufansa/712b6666a3e11236901ca4b1f5e48a6a to your computer and use it in GitHub Desktop.
Jobhunt - Change Post A Job Form Custom Taxonomy Fields as Required
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_taxonomy_fields_required' ) ) { | |
| function jh_child_submit_job_form_change_taxonomy_fields_required( $fields ) { | |
| if( isset( $fields['job']['job_category'] ) ) { | |
| $fields['job']['job_category']['required'] = true; | |
| } | |
| if( isset( $fields['job']['job_listing_salary'] ) ) { | |
| $fields['job']['job_listing_salary']['required'] = true; | |
| } | |
| if( isset( $fields['job']['job_listing_career_level'] ) ) { | |
| $fields['job']['job_listing_career_level']['required'] = true; | |
| } | |
| if( isset( $fields['job']['job_listing_experience'] ) ) { | |
| $fields['job']['job_listing_experience']['required'] = true; | |
| } | |
| if( isset( $fields['job']['job_listing_gender'] ) ) { | |
| $fields['job']['job_listing_gender']['required'] = true; | |
| } | |
| if( isset( $fields['job']['job_listing_industry'] ) ) { | |
| $fields['job']['job_listing_industry']['required'] = true; | |
| } | |
| if( isset( $fields['job']['job_listing_qualification'] ) ) { | |
| $fields['job']['job_listing_qualification']['required'] = true; | |
| } | |
| return $fields; | |
| } | |
| } | |
| add_filter( 'submit_job_form_fields', 'jh_child_submit_job_form_change_taxonomy_fields_required', 30 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment