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 in an existing file | |
add_action( 'new_job_application', 'bk_redirect_now', 99); | |
function bk_redirect_now(){ | |
add_action( 'template_redirect', 'bk_final_redirect', 99); | |
} | |
function bk_final_redirect(){ | |
wp_redirect('https://example.com'); |
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_application_statuses', 'bk_add_status'); | |
function bk_add_status( $status ){ | |
$status['investigation'] => 'Pending OPM Investigation'; | |
return $status; | |
} |
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
<a href="#" onclick="history.go(-1)">Go Back</a> | |
or something like | |
<button onclick="goBack()">Go Back</button> | |
<script> | |
function goBack() { | |
window.history.back(); | |
} |
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: WP Job Manager - Publicize using Jetpack | |
Plugin URI: https://kraft.im/ | |
Description: Use Jetpack's Publicize feature with WP Job Manager listings. | |
Author: Brandon Kraft | |
Author URI: https://kraft.im/ | |
Version: 1.0 | |
License: GPL 2+ | |
*/ |
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 in an existing file. | |
add_filter( 'jetpack_social_media_icons_widget_array', 'bk_social_media'); | |
function bk_social_media( $html ){ | |
$html[] = '<a title="View my Tumblr" href="https://example.tumblr.com" class="genericon genericon-tumblr" target="_blank"><span class="screen-reader-text">View my Tumblr</span></a>'; | |
$html[] = '<a title="View my Flickr" href="https://flickr.com" class="genericon genericon-flickr" target="_blank"><span class="screen-reader-text">View my Flickr</span></a>'; | |
return $html; | |
} |
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( 'wp_mail_from', 'bk_force_default_email', 1 ); | |
function bk_force_default_email(){ | |
$sitename = strtolower( $_SERVER['SERVER_NAME'] ); | |
if ( substr( $sitename, 0, 4 ) == 'www.' ) { | |
$sitename = substr( $sitename, 4 ); | |
} | |
$email = 'wordpress@' . $sitename; | |
return $email; |
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 | |
add_filter( 'jetpack_relatedposts_filter_hits', 'kraft_add_default_posts' ); | |
function kraft_add_default_posts( $ids ) { | |
if ( empty( $ids ) ){ | |
$ids = array( 123, 456, 789 ); | |
} | |
return $ids; | |
} |
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 on an existing file | |
add_filter('submit_resume_form_fields', 'bk_multiselect'); | |
function bk_multiselect($fields){ | |
$fields['resume_fields']['resume_skills']['type'] = 'term-multiselect'; | |
$fields['resume_fields']['resume_skills']['taxonomy'] = 'resume_skill'; | |
$fields['resume_fields']['resume_skills']['placeholder'] = ''; | |
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
add_filter( 'jetpack_known_staging', 'bk_my_personal_staging_domain'); | |
function bk_my_personal_staging_domain( $known_staging ){ | |
$known_staging['urls'][] = '#\staging\.example\.com$#i'; | |
return $known_staging; | |
} |
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( 'the_job_location_map_link', 'bk_uk_the_location_map' ); | |
fuction bk_uk_the_location_map( $link, $location ){ | |
$link = '<a class="google_map_link" href="' . esc_url( 'http://maps.google.com/maps?q=' . urlencode( strip_tags( $location ) ) . '%2C+UK&zoom=14&size=512x512&maptype=roadmap&sensor=false' ) . '" target="_blank">' . esc_html( strip_tags( $location ) ) . '</a>'; | |
return $link; | |
} |