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
<?php | |
/** | |
* This code can be placed inside a custom plugin, or the theme functions.php file. | |
* | |
* The admin email is simply an array of content which is ran through a filter then 'imploded' and sent. | |
* The content can be customised through a filter. | |
* | |
* The default content looks like this in the plugin: | |
* |
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
<?php | |
/** | |
* Add rewrite tags for the data we want to insert and define the structure of the permalink. | |
* | |
* You need to go to Settings > Permalinks and save for these rules to be added. | |
*/ | |
function add_resume_rewrite_rules(){ | |
add_rewrite_tag( '%resume%', '([^/]+)', 'resume=' ); | |
add_rewrite_tag( '%candidate_title%', '([^/]+)', 'candidate_title=' ); |
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
<?php // You don't need this line if <?php is already present in your file :) | |
// First, add the field to the form. This will be a text field. | |
add_filter( 'job_application_form_fields', 'add_application_form_tel_field' ); | |
function add_application_form_tel_field( $fields ) { | |
$fields[ 'tel' ] = array( | |
'label' => 'Telephone Number', | |
'type' => 'text', | |
'required' => true, |
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( 'apply_with_resume_email_message', 'custom_apply_with_resume_email_message', 10, 4 ); | |
function custom_apply_with_resume_email_message( $message, $user_id, $job_id, $resume_id ) { | |
$resume = get_post( $resume_id ); | |
$message['resume_content'] = "\n\n-----------\n\n" . nl2br( $resume->post_content ); | |
return $message; | |
} |
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
<?php | |
global $job_manager_tags; | |
remove_filter( 'the_job_description', array( $job_manager_tags, 'display_tags' ) ); |
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
<?php | |
add_action( 'new_job_application', 'send_new_job_application_confirmation', 10, 2 ); | |
function send_new_job_application_confirmation( $application_id, $job_id ) { | |
$candidate_email = get_post_meta( $application_id, '_candidate_email', true ); | |
$message = sprintf( "Thanks for your application for '%s'. We'll get back to you as soon as possible.", get_the_title( $job_id ) ); | |
wp_mail( $candidate_email, 'Your Application on ' . get_bloginfo( 'name' ), $message ); | |
} |
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
// Goes goes in theme functions.php | |
add_filter( 'job_manager_job_filters_showing_jobs_links', 'custom_job_manager_job_filters_showing_jobs_links' ); | |
function custom_job_manager_job_filters_showing_jobs_links( $links ) { | |
unset( $links['rss_link'] ); | |
return $links; | |
} |
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 - code goes in theme functions.php | |
add_filter( 'submit_resume_form_fields', 'custom_submit_resume_form_fields' ); | |
// This is your function which takes the fields, modifies them, and returns them | |
function custom_submit_resume_form_fields( $fields ) { | |
// Here we target one of the job fields (candidate name) and change it's label | |
$fields['resume_fields']['resume_skills']['type'] = 'term-multiselect'; | |
$fields['resume_fields']['resume_skills']['taxonomy'] = 'resume_skill'; |
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_job_listing_data_fields', 'custom_job_manager_job_listing_data_fields' ); | |
function custom_job_manager_job_listing_data_fields( $fields ) { | |
unset( $fields['_application']['value'] ); | |
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
<?php | |
add_action( 'user_register', 'give_wcpl_user_package_on_registration' ); | |
function give_wcpl_user_package_on_registration( $user_id ) { | |
global $wpdb; | |
$wpdb->insert( | |
"{$wpdb->prefix}wcpl_user_packages", | |
array( | |
'user_id' => $user_id, |