Guest User

Untitled

a guest
Jan 17th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. <?php
  2. add_filter( 'submit_resume_steps', 'replace_resume_done_with_redirect' );
  3.  
  4. function replace_resume_done_with_redirect( $steps ) {
  5. $steps['done'] = array(
  6. 'priority' => 30,
  7. 'handler' => function() {
  8. do_action( 'resume_manager_resume_submitted', WP_Resume_Manager_Form_Submit_Resume::instance()->get_resume_id() );
  9. $job_id = WP_Resume_Manager_Form_Submit_Resume::instance()->get_job_id();
  10.  
  11. // Allow application
  12. if ( ! empty( $job_id ) ) {
  13. 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>';
  14. echo do_shortcode( '[job_apply id="' . absint( $job_id ) . '"]' );
  15. } else {
  16. if ( wp_redirect( job_manager_get_permalink( 'candidate_dashboard' ) ) ) {
  17. exit;
  18. }
  19. }
  20. },
  21. 'view' => null,
  22. );
  23. return $steps;
  24. }
Add Comment
Please, Sign In to add comment