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 your own function to filter the fields | |
add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields_dalt' ); | |
// This is your function which takes the fields, modifies them, and returns them | |
// You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php | |
function custom_submit_job_form_fields_dalt( $fields ) { | |
// Here we target one of the job fields (job_title) and change it's label | |
$fields['company']['company_tagline']['type'] = 'textarea'; |
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( 'job_manager_indeed_get_jobs_args', 'custom_job_manager_indeed_get_jobs_args' ); | |
function custom_job_manager_indeed_get_jobs_args( $args ) { | |
$args['sort'] = 'date'; | |
return $args; | |
} |
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_action( 'init', 'jm_update_resume_slug' ); | |
function jm_update_resume_slug( ) { | |
$resume_args = get_post_type_object('resume'); | |
if ( ! empty( $resume_args ) ) { | |
$resume_args->rewrite = array( | |
'slug' => 'cv', | |
'with_front' => false, | |
'feeds' => false, | |
'pages' => false, | |
); |
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( 'create_job_application_notification_headers','dm_job_application_headers', 10, 3 ); | |
function dm_job_application_headers( $headers, $job_id, $application_id ) { | |
$candidate_name = get_the_title( $application_id ); | |
$candidate_email = get_post_meta( $application_id, '_candidate_email', true ); | |
$headers[] = 'From: ' . $candidate_name . ' <' . $candidate_email . '>'; | |
return $headers; | |
} |
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 your own function to filter the fields | |
add_filter( 'submit_resume_form_fields', 'custom_submit_resume_form_fields_dm' ); | |
// This is your function which takes the fields, modifies them, and returns them | |
function custom_submit_resume_form_fields_dm( $fields ) { | |
// Here we target one of the job fields (candidate name) and change it's label | |
$fields['resume_fields']['candidate_title']['label'] = "My pro title"; | |
// And return the modified fields | |
return $fields; | |
} |
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 comment support to the job listing post type - you'll need to enable the comments for old listings manually | |
add_filter( 'register_post_type_job_listing', 'register_post_type_job_listing_enable_comments' ); | |
function register_post_type_job_listing_enable_comments( $post_type ) { | |
$post_type['supports'][] = 'comments'; | |
return $post_type; | |
} | |
// Make comments open by default for new job listings | |
add_filter( 'submit_job_form_save_job_data', 'custom_submit_job_form_save_job_data' ); |
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('jetpack_photon_pre_args', 'jetpackme_custom_photon_compression' ); | |
function jetpackme_custom_photon_compression( $args ) { | |
$args['quality'] = 80; | |
$args['strip'] = 'all'; | |
return $args; | |
} |
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
function disable_wpcomtoolbar ( $modules ) { | |
if ( isset( $modules['masterbar'] ) ) { | |
unset( $modules['masterbar'] ); | |
} | |
return $modules; | |
} | |
add_filter( 'jetpack_get_available_modules', 'disable_wpcomtoolbar' ); |
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_job_form_fields', 'dm_prefill_company_logo'); | |
function dm_prefill_company_logo( $fields ) { | |
$fields['company']['company_logo']['value'] = 'full_url_to_the_logo'; | |
return $fields; | |
} |
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
function daki_remove_post_top_posts( $posts, $post_ids, $count ) { | |
foreach ( $posts as $k => $post ) { | |
// Get the list of categories for that post. | |
$categories = wp_get_post_categories( | |
$post['post_id'], | |
// We only need the category slug here. | |
array( 'orderby' => 'name', 'order' => 'ASC', 'fields' => 'slugs' ) | |
); |