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', 'alter_allowed_mime_types' ); | |
function alter_allowed_mime_types( $fields ) { | |
if ( ! empty( $fields['resume_fields']['resume_file'] ) ) { | |
$fields['resume_fields']['resume_file']['allowed_file_types'] = array( | |
'doc' => 'application/msword', | |
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', | |
'pdf' => 'application/pdf', | |
); | |
} | |
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
/** | |
* Code placed in theme functions.php | |
*/ | |
add_filter( 'post_class', 'wc_product_tag_post_class', 20, 3 ); | |
function wc_product_tag_post_class( $classes, $class = '', $post_id = '' ) { | |
$tags = get_the_terms( $post_id, 'product_tag' ); | |
if ( ! empty( $tags ) ) { | |
foreach ( $tags as $key => $value ) { | |
$classes[] = 'product-tag-' . $value->slug; |
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_action( 'woocommerce_before_shop_loop_item_title', 'show_free_shipping_badge' ); | |
function show_free_shipping_badge() { | |
global $post, $product; | |
if ( $product && $product->get_price() >= 100 ) { | |
echo '<span class="free-shipping">' . __( 'Free Shipping!'' ) . '</span>'; | |
} | |
} |
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( 'woocommerce_enable_setup_wizard', '__return_false' ); |
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
// This will make sure expired jobs are deleted after XX days | |
add_filter( 'job_manager_delete_expired_jobs', '__return_true' ); | |
// The default is 30 days, but you can change this with the following | |
add_filter( 'job_manager_delete_expired_jobs_days', 'change_job_manager_delete_expired_jobs_days' ); | |
function change_job_manager_delete_expired_jobs_days() { | |
return 30; // change this to the number of days you desired | |
} |
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_action( 'submit_resume_form_start', 'submit_resume_form_start_content' ); | |
function submit_resume_form_start_content() { | |
?> | |
Your content here | |
<?php | |
} |
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( 'job_manager_job_dashboard_columns', 'custom_job_manager_job_dashboard_columns' ); | |
/** | |
* Columns are the existing columns found here: https://github.com/Automattic/WP-Job-Manager/blob/master/includes/class-wp-job-manager-shortcodes.php#L161-L166 | |
*/ | |
function custom_job_manager_job_dashboard_columns( $columns ) { | |
// Add a colunn | |
$columns['new_column'] = 'New Column Heading'; | |
// Remove a column |
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
<wpml-config> | |
<admin-texts> | |
<key name="job_manager_alerts_page_id" /> | |
</admin-texts> | |
</wpml-config> |
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 | |
var_dump( current_time( 'timestamp' ) ); | |
var_dump( strtotime( '-6 days', current_time( 'timestamp' ) ) ); | |
var_dump( strtotime( 'midnight', current_time( 'timestamp' ) ) ); | |
?> |
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 | |
/** | |
* Plugin Name: WP Job Manager - Update access tester | |
* Description: Pings our site to see if your server can connect. Just head to <a href="/?wpjm-test=1">yoursite.com/?wpjm-test=1</a> whilst logged in as admin. | |
* Version: 1.0.0 | |
* Author: Mike Jolley | |
* Requires at least: 4.1 | |
* Tested up to: 4.3 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |