View gist:7bcadb2d30fb28c72df88a5d8e1a9daa
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_applications_past_args', 'change_past_application_args'); | |
function change_past_application_args( $args ) { | |
$args['posts_per_page'] = 5; // Number of past applications to display on each page. | |
$args['offset'] = ( max( 1, get_query_var( 'paged' ) ) - 1 ) * $args['posts_per_page']; | |
return $args; | |
} |
View gist:0104476b2554ed2ac574fb30e1af1f18
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 change_resume_slug( $args ) { | |
$args['rewrite']['slug'] = _x( 'cv', 'Resume permalink - resave permalinks after changing this', 'wp_job_manager_resumes' ); | |
return $args; | |
} | |
add_filter( 'register_post_type_resume', 'change_resume_slug' ); |
View gist:5ab128f246e7af26fba5b097717c7dab
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( 'wcpl_get_job_packages_args', 'bk_show_hidden_job_packages'); | |
function bk_show_hidden_job_packages( $args ) { | |
unset( $args['tax_query'][1] ); | |
return $args; | |
} |
View functions.php
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', 'custom_submit_job_form_fields' ); | |
function custom_submit_job_form_fields( $fields ) { | |
$fields['job']['job_type']['default'] = "freelance"; | |
return $fields; | |
} |
View gist:142e2f94be95b6a2b2f758164d3dc71c
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 job_manager_set_allowed_deletion_period() { | |
return 3; | |
} | |
add_filter( 'job_manager_job_listing_allowed_deletion_period', 'job_manager_set_allowed_deletion_period' ); |
View applications-recaptcha
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 | |
// Define your keys here | |
define( 'RECAPTCHA_SITE_KEY', 'XXX' ); | |
define( 'RECAPTCHA_SECRET_KEY', 'XXX' ); | |
// Enqueue Google reCAPTCHA scripts | |
add_action( 'wp_enqueue_scripts', 'recaptcha_scripts' ); | |
function recaptcha_scripts() { | |
wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' ); |
View functions.php
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( 'woocommerce_box_office_scan_permission', 'modify_woocommerce_box_office_scan_permission' ); | |
function modify_woocommerce_box_office_scan_permission( $has_permission ) { | |
// Do any required permission checks here | |
$has_permission = true; | |
return $has_permission; | |
} |
View gist:887ed4b28dcd9f5963a247539d4fb47a
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
// Set checkboxes to checked by default | |
jQuery(document).ready(function(){ | |
jQuery('.addon-checkbox').attr( 'checked', 'checked' ); | |
}); |
View gist:cc1d8eea8d9736534bbcd8ae0068644e
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( 'body_class', 'dj_add_position_filled_class' ); | |
function dj_add_position_filled_class( $classes ) { | |
global $post; | |
if ( $post->post_type !== 'job_listing' ) { | |
return $classes; | |
} | |
if ( is_position_filled( $post ) ) { | |
$classes[] = 'position-filled'; | |
} |
View gist:8424a87c691231d2699b2a9904a3c7af
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
// Change the 'job-category' slug | |
add_filter( 'register_taxonomy_job_listing_category_args', 'change_job_listing_category_rewrite' ); | |
function change_job_listing_category_rewrite( $options ) { | |
$options['rewrite'] = array( | |
'slug' => 'industria', | |
'with_front' => false, | |
'hierarchical' => false, | |
); | |
return $options; |
NewerOlder