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 // remove in an existing file | |
$count_posts = wp_count_posts( 'job_listing' ); | |
echo $count_posts->publish; |
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 | |
/* | |
Plugin Name: Add Editor to WPJM Management | |
Plugin URI: http://wpjobmanager.com | |
Description: Custom plugin to add the editor to WPJM. | |
Version: 0.1 | |
Author: Brandon Kraft | |
Author URI: https://kraft.im/ | |
*/ |
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 //remove if adding to an existing file. | |
add_filter( 'resume_manager_new_resume_notification_recipient', 'bk_wpjm_resume_notif_rcpt' ); | |
function bk_wpjm_resume_notif_rcpt( $email ){ // the $email var will be, by default, the admin e-mail set in WP Settings. | |
$new_rcpts = "[email protected],[email protected],[email protected]"; | |
return $new_rcpts; // Note that this isn't returning the original admin e-mail in this form. | |
} |
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 // remove this line if adding to an existing PHP file. | |
add_filter('submit_job_form_fields', 'bk_prefill_jobs_location'); | |
function bk_prefill_jobs_location( $fields ) { | |
$fields['job']['job_location']['value'] = 'Granite Falls, WA'; | |
return $fields; | |
} |
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 // do not include this line if pasting into an existing php file | |
// This function will only return posts that are related AND has ALL of the same categories. | |
function jp_only_rp_in_same_category( $categories, $post_id ) { | |
$category_objects = get_the_category( $post_id ); | |
if ( ! empty( $categories ) ) { | |
$categories = array_merge( 'categories', 'category_objects' ); | |
return $categories; | |
} |
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 | |
/* | |
Plugin Name: WPJM + Polylang Shiv | |
Plugin URI: https://kraft.im/ | |
Description: Let's have WP Job Manager return the right jobs based on language, right? | |
Author: Brandon Kraft | |
Author URI: https://kraft.im/ | |
Version: 0.1 | |
License: GPL |
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 | |
echo "<h1>Your server's port seems to be...</h1>"; | |
echo "<p>" . $_SERVER['SERVER_PORT'] . "</p>"; |
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 // do not include if pasting in an existing file that already has this. | |
add_filter( 'jpp_use_captcha_when_blocked', '__return_true'); |
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 // don't include this in an existing file | |
add_filter('http_request_timeout', 'bk_massive_timeout' ); | |
function bk_massive_timeout( $timeout ){ | |
$timeout = 60; | |
return $timeout; | |
} |
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
// The default is 265px | |
// this is a simple example to change them all. more options available. | |
add_filter( 'gallery_widget_content_width', 'bk_change_default_gallery_content_width' ); | |
function bk_change_default_gallery_content_width(){ | |
return 400; | |
} |