Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'submit_resume_steps', 'replace_resume_done_with_redirect' );
- function replace_resume_done_with_redirect( $steps ) {
- $steps['done'] = array(
- 'priority' => 30,
- 'handler' => function() {
- do_action( 'resume_manager_resume_submitted', WP_Resume_Manager_Form_Submit_Resume::instance()->get_resume_id() );
- $job_id = WP_Resume_Manager_Form_Submit_Resume::instance()->get_job_id();
- // Allow application
- if ( ! empty( $job_id ) ) {
- echo '<h3 class="applying_for">' . sprintf( __( 'Submit your application to the job "%s".', 'wp-job-manager-resumes' ), '<a href="' . get_permalink( $job_id ) . '">' . get_the_title( $job_id ) . '</a>' ) .'</h3>';
- echo do_shortcode( '[job_apply id="' . absint( $job_id ) . '"]' );
- } else {
- if ( wp_redirect( job_manager_get_permalink( 'candidate_dashboard' ) ) ) {
- exit;
- }
- }
- },
- 'view' => null,
- );
- return $steps;
- }
Add Comment
Please, Sign In to add comment