PluginProbe
JobWP – Job Board Plugin for WordPress | Job Listings, Career Page & Applications / 2.3.9
JobWP – Job Board Plugin for WordPress | Job Listings, Career Page & Applications v2.3.9
2.5.0 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 All 33 releases
jobwp / front / view / single / header.php

header.php in JobWP – Job Board Plugin for WordPress | Job Listings, Career Page & Applications 2.3.9, at front/view/single/header.php

62 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 # Silence is golden.
4 if ( !defined( 'ABSPATH' ) ) {
5 exit;
6 }
7 $resumeUploadMsg = null;
8 require_once JOBWP_PATH . 'front/cls-jobwp-front.php';
9 $jobwp_front_new = new JobWp_Front(JOBWP_VERSION);
10 // Single Settings Content
11 $jobwpSingleContent = $jobwp_front_new->jobwp_get_single_content_settings();
12 foreach ( $jobwpSingleContent as $option_name => $option_value ) {
13 if ( isset( $jobwpSingleContent[$option_name] ) ) {
14 ${"" . $option_name} = $option_value;
15 }
16 }
17 // Single Settings Styles
18 $jobwpSingleStyles = $jobwp_front_new->jobwp_get_single_styles_settings();
19 foreach ( $jobwpSingleStyles as $option_name => $option_value ) {
20 if ( isset( $jobwpSingleStyles[$option_name] ) ) {
21 ${"" . $option_name} = $option_value;
22 }
23 }
24 // General Settings
25 $jobwpGeneralSettings = $jobwp_front_new->jobwp_get_general_settings();
26 foreach ( $jobwpGeneralSettings as $option_name => $option_value ) {
27 if ( isset( $jobwpGeneralSettings[$option_name] ) ) {
28 ${"" . $option_name} = $option_value;
29 }
30 }
31 $wbgAbctEmail = [];
32 if ( '' !== $jobwp_admin_noti_email ) {
33 $wbgAbctEmail[] = sanitize_email( $jobwp_admin_noti_email );
34 }
35 //echo '<pre>';
36 //print_r($wbgAbctEmail);
37 // Upload Resume
38 if ( isset( $_FILES['jobwp_upload_resume']['name'] ) ) {
39 if ( !isset( $_POST['jobwp_apply_form_nonce_field'] ) || !wp_verify_nonce( $_POST['jobwp_apply_form_nonce_field'], 'jobwp_apply_form_action' ) ) {
40 $resumeUploadMsg = __( 'Sorry, your nonce did not verify.', JOBWP_TXT_DOMAIN );
41 } else {
42 if ( $jobwp_captcha_on_apply_form ) {
43 $secret = ( isset( $jobwp_recaptcha_secret_key ) ? sanitize_text_field( $jobwp_recaptcha_secret_key ) : '' );
44 $recaptcha = ( isset( $_POST['g-recaptcha-response'] ) ? sanitize_text_field( $_POST['g-recaptcha-response'] ) : null );
45 $url = "https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$recaptcha}";
46 $response = wp_remote_get( $url, array(
47 'timeout' => 20,
48 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0',
49 ) );
50 $respKey = json_decode( wp_remote_retrieve_body( $response ) );
51 if ( $respKey->success ) {
52 $resumeUploadMsg = $jobwp_front_new->jobwp_upload_resume( $_POST, $_FILES, $wbgAbctEmail );
53 } else {
54 $resumeUploadMsg = __( 'reCaptcha verification failed!', JOBWP_TXT_DOMAIN );
55 }
56 } else {
57 $resumeUploadMsg = $jobwp_front_new->jobwp_upload_resume( $_POST, $_FILES, $wbgAbctEmail );
58 }
59 }
60 }
61 // Load Styling
62 include JOBWP_PATH . 'assets/css/single.php';