- สถานะ
- รอผู้พัฒนา
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- WP Job Manager
- แท็กหัวข้อ
- Compatibility
ภาพรวมของปัญหา
เมื่อใช้ WPML ร่วมกับส่วนเสริม Applications ของ WP Job Manager Job Dashboard จะแสดงแบบฟอร์มการสมัครจากทุกภาษาอย่างไม่ถูกต้อง แทนที่จะแสดงเฉพาะแบบฟอร์มในภาษาปัจจุบัน ปัญหานี้ส่งผลกระทบต่อแบบฟอร์มแก้ไขงานและสร้างความสับสนให้กับผู้ใช้
วิธีแก้ปัญหาชั่วคราว
โปรดตรวจสอบให้แน่ใจว่าคุณมี ข้อมูลสำรองของไซต์แบบเต็ม สำหรับไซต์ของคุณก่อนดำเนินการต่อ
- เปิดไฟล์ …/\wp-content/plugins/wp-job-manager-applications/includes/wp-job-manager-applications-functions.php
- ค้นหาบรรทัดที่ 302
- แทนที่:
function get_application_forms() { $posts = new WP_Query( array( 'post_type' => 'job_application_form', 'posts_per_page' => - 1, 'suppress_filters' => true, 'orderby' => 'title', 'order' => 'ASC', ) ); $default_form = WP_Job_Manager_Applications_Default_Form::get_default_form(); if ( $posts->post_count <= 1 ) { return null; } $application_forms = []; if ( array_key_exists( 'ID', $default_form ) ) { $application_forms[ $default_form['ID'] ] = $default_form['post_title']; } foreach ( $posts->posts as $post ) { $application_forms[ $post->ID ] = $post->post_title; } return apply_filters( 'job_application_forms', $application_forms ); } - ด้วย:
// WPML Workaround for compsupp-7797 function get_application_forms() { $posts = new WP_Query( array( 'post_type' => 'job_application_form', 'posts_per_page' => - 1, 'suppress_filters' => false, // replace true with false 'orderby' => 'title', 'order' => 'ASC', ) ); $default_form = WP_Job_Manager_Applications_Default_Form::get_default_form(); if ( $posts->post_count < 1 ) { // replace <= with < return null; } $application_forms = []; /* comment out this part if you don't want to see the default form in other languages if ( array_key_exists( 'ID', $default_form ) ) { $application_forms[ $default_form['ID'] ] = $default_form['post_title']; }*/ foreach ( $posts->posts as $post ) { $application_forms[ $post->ID ] = $post->post_title; } return apply_filters( 'job_application_forms', $application_forms ); }