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
function job_listing_post_type_link( $permalink, $post ) { | |
// Abort if post is not a job | |
if ( $post->post_type !== 'job_listing' ) { | |
return $permalink; | |
} | |
// Abort early if the placeholder rewrite tag isn't in the generated URL | |
if ( false === strpos( $permalink, '%' ) ) { | |
return $permalink; | |
} |
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
add_action( 'job_manager_update_job_data', 'wpjm_set_yoast_opengraph_image', 10, 2 ); | |
function wpjm_set_yoast_opengraph_image( $job_id, $values ) { | |
update_post_meta( $job_id, '_yoast_wpseo_opengraph-image', $values['company']['company_logo'] ); | |
} |
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
add_filter( 'resume_manager_new_resume_notification_recipient', 'change_resume_manager_new_resume_notification_recipient' ); | |
function change_resume_manager_new_resume_notification_recipient( $email ) { | |
return '[email protected]'; | |
} |
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 | |
add_filter( 'create_job_application_notification_headers', 'job_applications_cc_email' ); | |
function job_applications_cc_email( $headers ) { | |
$headers[] = 'Cc:[email protected]'; | |
return $headers; | |
} |
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
add_filter( 'job_manager_indeed_import_format_keyword', 'custom_job_manager_indeed_import_format_keyword' ); | |
function custom_job_manager_indeed_import_format_keyword( $keyword ) { | |
$keyword .= ' add something to the keyword'; | |
return $keyword; | |
} |
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
add_filter( 'submit_job_form_save_job_data', 'custom_submit_job_form_save_job_data', 10, 5 ); | |
function custom_submit_job_form_save_job_data( $data, $post_title, $post_content, $status, $values ) { | |
$job_slug = array(); | |
$job_slug[] = $post_title; | |
// Add location | |
if ( ! empty( $values['job']['job_location'] ) ) |
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
add_action( 'submit_resume_form_resume_fields_end', 'recaptcha_field' ); | |
add_filter( 'submit_resume_form_validate_fields', 'validate_recaptcha_field' ); |
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
add_filter( 'job_manager_job_listing_data_fields', 'remove_author_type_field' ); | |
function remove_author_type_field( $fields ) { | |
global $post; | |
if ( isset( $fields['_job_author'] ) ) { | |
$fields['_job_author']['type'] = 'text'; | |
$fields['_job_author']['value'] = $post->post_author; | |
} | |
return $fields; | |
} |
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
add_filter( 'job_manager_indeed_get_jobs_args', 'custom_job_manager_indeed_get_jobs_args' ); | |
function custom_job_manager_indeed_get_jobs_args( $args ) { | |
$args['jt'] = 'fulltime'; | |
return $args; | |
} |
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
add_filter( 'the_company_logo', 'custom_get_the_company_logo', 10, 2 ); | |
function custom_get_the_company_logo( $logo, $post ) { | |
if ( $post->post_author ) { | |
$avatar_img = get_avatar( $post->post_author ); | |
preg_match( '#src=["|\'](.+)["|\']#Uuis', $avatar_img, $matches ); | |
return ! empty( $matches[1] ) ? $matches[1] : ''; | |
} | |
return $logo; | |
} |