Skip to content

Instantly share code, notes, and snippets.

add_filter( 'submit_job_form_fields', 'job_manager_terms_conditions' );
function job_manager_terms_conditions( $fields ) {
$fields['job']['terms'] = array(
'label' => __( 'I accept the Terms & Conditions', 'job_manager' ),
'type' => 'checkbox',
'required' => true,
'placeholder' => '',
'priority' => 50
);
return $fields;
remove_action( 'recipe_hero_archive_recipe_content', 'recipe_hero_output_single_header_before', 5 );
remove_action( 'recipe_hero_archive_recipe_content', 'recipe_hero_output_archive_meta', 20 );
remove_action( 'recipe_hero_archive_recipe_content', 'recipe_hero_output_single_header_after', 25 );
remove_action( 'recipe_hero_archive_recipe_content', 'recipe_hero_output_archive_tax', 40 );
remove_action( 'recipe_hero_archive_recipe_content', 'recipe_hero_output_archive_details', 50 );
remove_action( 'recipe_hero_archive_recipe_content', 'recipe_hero_output_archive_description', 60 );
@media print {
.recipe-schema-thumb {
display: none;
}
header {
display: block !important;
}
#navigation {
display: none;
}
add_filter( 'wcdrip_checkout_subscribe_params', 'drip_make_optin_single' );
add_filter( 'wcdrip_register_subscribe_params', 'drip_make_optin_single' );
function drip_make_optin_single( $params ) {
$params['double_optin'] = false;
return $params;
}
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 <youremail@example.com>' );
wp_mail( $candidate_email, 'Your Application on ' . get_bloginfo( 'name' ), $message, $headers );
}
add_filter( 'wcdrip_custom_fields', 'drip_add_first_last_fields', 10, 5 );
function drip_add_first_last_fields( $filters, $email, $lifetime_value, $products, $order ) {
unset( $filters['name'] );
$filters['first_name'] = $order->billing_first_name;
$filters['last_name'] = $order->billing_last_name;
return $filters;
}
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 );
}
​add_filter( 'submit_resume_form_fields', 'remove_submit_resume_form_fields' );
function remove_submit_resume_form_fields( $fields ) {
// Unset any of the fields you'd like to remove - copy and repeat as needed
unset( $fields['resume_fields']['candidate_photo'] );
​unset( $fields['resume_fields']['candidate_video'] );
// And return the modified fields
return $fields;
}
@bryceadams
bryceadams / gist:45c65d1ed09bb7c4038c
Created March 26, 2015 07:00
Captain Opening Hours CSS Change Colors
/* Change Day Color / Size */
.locations-display ul.location-hours li .day {
color: red;
font-size: 16px;
}
/* Change Hours Color / Size */
.locations-display ul.location-hours li .hours {
color: blue;
font-size: 10px;
<?php
/**
* Check the cart for specific classes, remove UPS Shipping method if they are present
*
* REMOVE THE TOP <?php if there is no ?> before (or you have an error after adding this)
*
* Add the code to your theme functions.php file
*/
add_filter( 'woocommerce_package_rates', 'unset_usps_shipping_method' , 10, 2 );