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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
$str .= '<p class="comment-subscription-form"><input type="checkbox" checked name="subscribe_comments" id="subscribe_comments" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;"' . $comments_checked . ' /> '; |
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 get_category_jobs_daki() { | |
$term = get_term( 31, 'job_listing_category' ); | |
$slug = $term->slug; | |
$posts = get_posts('job_listing_category=' . $slug . '&post_type=job_listing'); | |
return $count = count($posts); | |
} |
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 listing_expired_send_email( $new_status, $old_status, $post ) { | |
if ( 'job_listing' !== $post->post_type || 'expired' !== $new_status || $old_status === $new_status ) { | |
return; | |
} | |
$author = get_userdata( $post->post_author ); | |
$message = " | |
Hi " . $author->display_name . ", | |
Your listing, " . $post->post_title . " has now expired: " . get_permalink( $post_id ); | |
wp_mail( $author->user_email, "Your job listing has expired", $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
// Add your own function to filter the fields | |
add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' ); | |
// 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( $fields ) { | |
// Here we target one of the job fields (job_title) and change it's label | |
$fields['job']['job_description']['description'] = "Note: Use headings to make your advert stand out. To see example headings and listing <a href='http://example.com'>click here</a>."; |
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 my_wpjm_meta_key_dm() { | |
global $wpdb, $job_manager_keyword; | |
$searchable_meta_keys[] = '_my_meta_field'; | |
return $searchable_meta_keys; | |
} | |
add_filter('job_listing_searchable_meta_keys', 'my_wpjm_meta_key_dm'); |
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','daki_job_application_headers'); | |
function daki_job_application_headers($headers) { | |
$headers[] = 'From: ' . 'Salon Express' . ' <info@salonexpress.com.au>'; | |
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_filter('create_job_application_notification_headers','dm_job_application_headers'); | |
function dm_job_application_headers($headers) { | |
$headers[] = 'From: ' . 'My Custom From Name' . ' <example@example.com>'; | |
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_filter('create_job_application_candidate_notification_headers','dm_job_candidate_application_headers'); | |
function dm_job_candidate_application_headers($headers) { | |
$headers[] = 'From: ' . 'My Custom From Name' . ' <example@example.com>'; | |
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
/** added to functions.php to create Start Date field **/ | |
add_filter( 'submit_job_form_fields', 'frontend_add_start_field' ); | |
function frontend_add_start_field( $fields ) { | |
$fields['job']['job_start'] = array( | |
'label' => __( 'Start', 'job_manager' ), | |
'type' => 'text', | |
'required' => true, | |
'placeholder' => 'eg March 2017', |
OlderNewer