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_get_listings_args', 'bk_change_location' ); | |
function bk_change_location( $args ){ | |
$args['search_location'] = 'Anywhere, USA'; // location as a string. | |
return $args; | |
} |
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_change_app_status' ); | |
function bk_change_app_status( $status ){ | |
unset( $status['new'] ); // example of how to remove one of the built-in ones of new, interviewed, offer, hired, archived | |
$status['campus-visit'] = "Campus Visit"; // example of how to add a new one | |
$status['hired'] = "Appointed"; // example of how to "rename" an existing one if you don't want to impact existing ones. | |
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
add_filter( 'wcpl_get_resume_packages_args', 'bk_show_all_packages' ); | |
add_filter( 'wcpl_get_job_packages_arg', 'bk_show_all_packages' ); | |
function bk_show_all_packages( $args ){ | |
unset( $args['meta_query']); | |
return $args; | |
} |
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 pushStateListener() { | |
var pushState = history.pushState; | |
history.pushState = function() { | |
pushState.apply(history, arguments); | |
$(window).trigger('pushState'); | |
}; | |
$(window).on('pushState', function() { | |
alert(String(window.location).match(/.+\/(\d+)(?=\/$)/)[1]); | |
//Returns page number |
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 in an existing file. | |
add_filter( 'jetpack_open_graph_image_default', 'example_change_default_image' ); | |
function example_change_default_image( $image ) { | |
return 'https://s0.wp.com/i/blank.jpg'; | |
} |
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_action( 'transition_post_status' , 'log_after_sync_on_shutdown'); | |
function log_after_sync_on_shutdown(){ | |
add_action( 'shutdown' , 'log_message_priority_11' , 11 ); | |
} | |
function log_message_priority_11( ) { | |
_log('Message post from shutdown priority 11.'); | |
} |
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_action( 'transition_post_status', 'bk_shutdown', 11); | |
function bk_shutdown() { | |
add_action('shutdown', 'bk_let_the_record_show', 11); | |
} | |
function bk_let_the_record_show(){ | |
error_log( 'Shutdown at 11'); | |
} |
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 PHP file or you can upload this entire file as a plugin. | |
/* | |
* Plugin Name: Jetpack: Auto-Expand Publicize Settings | |
* Plugin URI: http://jetpack.me | |
* Description: Custom plugin to auto-expand the Publicize settings when writing a post. | |
* Author: Brandon Kraft | |
* Version: 1.0.0 | |
* Author URI: https://kraft.im/ | |
* License: GPL2+ | |
*/ |
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_indeed_get_jobs_args', 'bk_custom_args'); | |
function bk_custom_args( $args ){ | |
$args['as_not'] = 'the-query-value-here'; | |
return $args; | |
} |
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
jQuery(document).ready(function($) { | |
// Data rows | |
$( "input.resume_manager_add_row" ).click(function(){ | |
$(this).closest('table').find('tbody').append( $(this).data('row') ); | |
return false; | |
}); | |
// Sorting | |
$('.wc-job-manager-resumes-repeated-rows tbody').sortable({ | |
items:'tr', |