Redirect to Job Dashboard after job submission
add_filter( 'submit_job_steps', 'replace_done_with_redirect' ); | |
function replace_done_with_redirect( $steps ) { | |
$steps['done'] = array( | |
'priority' => 30, | |
'handler' => function() { | |
if ( wp_redirect( job_manager_get_permalink( 'job_dashboard' ) ) ) { | |
exit; | |
} | |
} | |
); | |
return $steps; | |
} |
This comment has been minimized.
This comment has been minimized.
jonasvogel
commented
Mar 27, 2018
Before redirecting, there'll be a PHP notice that this step is missing the
|
This comment has been minimized.
This comment has been minimized.
joewa1980
commented
Sep 7, 2018
Excellent! Many thanks. |
This comment has been minimized.
This comment has been minimized.
jom
commented
Feb 4, 2019
•
Replaced with https://gist.github.com/jom/749b818f9b388d37918b18d1bc1a6d15 for 1.32.0 compatibility. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
joewa1980 commentedJan 25, 2018
While it does redirect to the correct link inserted on line 7 when you submit a completed form... it submits the form to the site in a preview state rather than pending (we need it in pending for the WP Job Manager Emails plugin to hook into).