Created
September 21, 2018 11:52
-
-
Save yousufansa/6097a3ae91c8944229cfac50610b141b to your computer and use it in GitHub Desktop.
Jobhunt Single Resume Header Background Image
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
add_filter('submit_resume_form_fields' , 'jobhunt_child_custom_submit_resume_form_fields'); | |
if ( ! function_exists( 'jobhunt_child_custom_submit_resume_form_fields' ) ) { | |
function jobhunt_child_custom_submit_resume_form_fields ($fields) { | |
$fields['resume_fields']['candidate_header_bg_image'] = array( | |
'label' => esc_html__( 'Header Image', 'jobhunt' ), | |
'type' => 'file', | |
'placeholder' => 'Upload your header image', | |
'priority' => 5, | |
'required' => false | |
); | |
return $fields; | |
} | |
} | |
add_filter('resume_manager_resume_fields' , 'jobhunt_child_custom_resume_manager_resume_fields'); | |
if ( ! function_exists( 'jobhunt_child_custom_resume_manager_resume_fields' ) ) { | |
function jobhunt_child_custom_resume_manager_resume_fields ($fields) { | |
$fields['_candidate_header_bg_image'] = array( | |
'label' => esc_html__( 'Header Image', 'jobhunt' ), | |
'placeholder' => 'Upload your header image', | |
'type' => 'file' | |
); | |
return $fields; | |
} | |
} | |
add_filter('jobhunt_get_wpjmr_header_bg_img' , 'jobhunt_get_wpjmr_single_header_bg_img'); | |
if ( ! function_exists( 'jobhunt_get_wpjmr_single_header_bg_img' ) ) { | |
function jobhunt_get_wpjmr_single_header_bg_img($bg_url) { | |
global $post; | |
if ( is_singular( 'resume' ) && !empty($post->_candidate_header_bg_image) ) { | |
$bg_url = $post->_candidate_header_bg_image; | |
} | |
return $bg_url; | |
} | |
} |
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
#submit-resume-form .fieldset-candidate_header_bg_image { | |
flex: 0 0 100%; | |
max-width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment