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_resume_form_fields', 'custom_submit_resume_form_fields' ); | |
function custom_submit_resume_form_fields( $fields ) { | |
$fields['resume_fields']['candidate_education']['required'] = true; | |
$fields['resume_fields']['candidate_education']['fields']['notes']['label'] = 'Additional Comments'; | |
$fields['resume_fields']['candidate_experience']['fields']['notes']['label'] = 'Achievements'; | |
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( 'wc_order_is_editable', 'wcs_custom_order_status_edit', 10, 1 ); | |
function wcs_custom_order_status_edit( $order ) { | |
$edit = ( in_array( $order->get_status(), array( 'pending', 'on-hold', 'auto-draft', 'quote' ) ) ? true : false; | |
return $edit; | |
} |
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 custom_list_of_myme_types( $mime_types ) { | |
$mime_types = array( | |
'pdf' => 'application/pdf', | |
'doc' => 'application/msword', | |
); | |
return $mime_types; | |
} | |
add_filter('upload_mimes', 'custom_list_of_myme_types', 1, 1); |
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 getUrlVars() { | |
var vars = [], hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; | |
} | |
return vars; |
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 resume_published_send_email($post_id) { | |
$post = get_post($post_id); | |
$author = get_userdata($post->post_author); | |
$message = " | |
Hi ".$author->display_name.", | |
Your listing, ".$post->post_title." has just been approved at ".get_permalink( $post_id ).". Well done! | |
"; | |
wp_mail($author->user_email, "Your job listing is online", $message); | |
} |
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 listing_published_send_email($post_id) { | |
$post = get_post($post_id); | |
$author = get_userdata($post->post_author); | |
$message = " | |
Hi ".$author->display_name.", | |
Your listing, ".$post->post_title." has just been approved at ".get_permalink( $post_id ).". Well done! | |
"; | |
wp_mail($author->user_email, "Your job listing is online", $message); | |
} |
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 wcs_no_specific_shipping( $rates ) { | |
global $woocommerce; | |
// set the product ids that are eligible | |
$eligible = array( '963' ); | |
// get cart contents | |
$cart_items = $woocommerce->cart->get_cart(); | |
// loop through the items looking for one in the eligible array |
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_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 ) ); | |
$headers = array( 'From: Your Name <[email protected]>' ); | |
$attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' ); // Direct link to a file you want to attach |
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
// Hook into user_has_cap filter. This assumes you have setup resumes to require the capability 'has_active_job_package' | |
add_filter( 'user_has_cap', 'has_active_job_package_capability_check', 10, 3 ); | |
/** | |
* has_active_job_package_capability_check() | |
* | |
* Filter on the current_user_can() function. | |
* | |
* @param array $allcaps All the capabilities of the user | |
* @param array $cap [0] Required capability |
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_resume_form_fields', 'edit_submit_resume_edu_qual_field' ); | |
function edit_submit_resume_edu_qual_field( $fields ) { | |
$fields['resume_fields']['candidate_education']['fields']['qualification']['label'] = "Degree(s)"; | |
return $fields; | |
} |