Skip to content

Instantly share code, notes, and snippets.

@rali14
Created October 19, 2016 19:54
Show Gist options
  • Save rali14/e957d47bd14024d89f6f75e21b816303 to your computer and use it in GitHub Desktop.
Save rali14/e957d47bd14024d89f6f75e21b816303 to your computer and use it in GitHub Desktop.
Redirect URL based application directly to site
<?php if ( $apply = get_the_job_application_method() ) :
wp_enqueue_script( 'wp-job-manager-job-application' );
?>
<div class="job_application application">
<?php do_action( 'job_application_start', $apply ); ?>
<?php if ( 'url' == $apply->type ) : ?>
<a class="button" href="<?php echo esc_url( $apply->url ); ?>" target="_blank" rel="nofollow" style="padding:1em;">Apply for job</a>
<?php else : ?>
<input type="button" class="application_button button" value="<?php _e( 'Apply for job', 'wp-job-manager' ); ?>" />
<?php endif; ?>
<div class="application_details">
<?php
/**
* job_manager_application_details_email or job_manager_application_details_url hook
*/
do_action( 'job_manager_application_details_' . $apply->type, $apply );
?>
</div>
<?php do_action( 'job_application_end', $apply ); ?>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment