I hereby claim:
- I am jom on github.
- I am jakeom (https://keybase.io/jakeom) on keybase.
- I have a public key ASCmHzniJb6QigpFMxSq9IBDYDSqzcJ3q0SURRqhq1sP-Ao
To claim this, I am signing this object:
<?php | |
add_filter( | |
'sensei_is_enrolled', | |
function( $is_enrolled, $user_id ) { | |
if ( empty( $user_id ) ) { | |
return false; | |
} | |
return $is_enrolled; | |
}, |
<?php | |
/** | |
* Below are some snippets for modifying behavior related to Sensei LMS v3.0.0's new enrolment strategy. | |
* | |
* Most of these should be in place prior to upgrading to Sensei LMS 3.0.0. | |
* | |
* These may change in later releases and are just meant to be a guide. | |
*/ |
I hereby claim:
To claim this, I am signing this object:
add_action( 'new_job_application', function( $application_id, $job_id ) { | |
if ( is_object( $job_id ) ) { | |
// We're in WP core's hook. | |
return; | |
} | |
wp_safe_redirect( home_url( '/page-success-application' ) ); | |
exit; | |
}, 999, 2 ); |
add_filter( 'wpjm_get_job_listing_structured_data', function( $data ) { | |
if ( ! isset( $data['jobLocation'] ) ) { | |
$data['jobLocation'] = []; | |
$data['jobLocation']['@type'] = 'Place'; | |
} | |
if ( is_string( $data['jobLocation']['address'] ) ) { | |
$original_address = $data['jobLocation']['address']; | |
$data['jobLocation']['address'] = []; | |
$data['jobLocation']['address'] ['@type'] = 'PostalAddress'; |
add_filter( 'submit_job_form_logout_url', function() { | |
return wp_logout_url( 'https://example.com/path/to/page' ); | |
} ); |
add_action( 'init', function() { | |
global $job_manager; | |
register_post_status( 'needs_changes', array( | |
'label' => _x( 'Needs Changes', 'job_listing', 'custom-code-text-domain' ), | |
'public' => false, | |
'exclude_from_search' => false, | |
'show_in_admin_all_list' => false, | |
'show_in_admin_status_list' => true, | |
'post_type' => array( 'job_listing' ), |
add_filter( 'submit_job_steps', function( $steps ) { | |
$user = get_current_user_id(); | |
if ( ! $user || current_user_can( 'manage_options' ) ) { | |
return $steps; | |
} | |
$user_post_count = count( get_posts( [ | |
'author' => $user, | |
'post_type' => 'job_listing', | |
'post_status' => [ 'publish', 'pending' ] |
<?php | |
add_action( 'user_register', function( $user_id ) { | |
if ( ! function_exists( 'wc_paid_listings_give_user_package' ) ) { | |
return; | |
} | |
$product_id = 0; // Update this to be the ID for the new product you've created (shown on the product listings page) | |
wc_paid_listings_give_user_package( $user_id, $product_id ); | |
} ); |
<?php | |
// Paste the lines below in your functions.php or Code Snippets plugin. | |
// For the job dashboard page. | |
add_filter( 'job_manager_job_dashboard_login_url', 'job_manager_custom_sign_in_url' ); | |
// For the job form page. | |
add_filter( 'submit_job_form_login_url', 'job_manager_custom_sign_in_url' ); |