- Trạng thái
- Đang chờ nhà phát triển
- Plugin/giao diện liên quan
- WP Job Manager
- Thẻ chủ đề
- Compatibility
Tổng quan về lỗi
Khi sử dụng WPML với tiện ích bổ sung Applications của WP Job Manager, Job Dashboard hiển thị không chính xác các biểu mẫu ứng tuyển từ tất cả ngôn ngữ, thay vì chỉ hiển thị các biểu mẫu trong ngôn ngữ hiện tại. Điều này ảnh hưởng đến biểu mẫu chỉnh sửa công việc và gây nhầm lẫn cho người dùng.
Giải pháp tạm thời
Vui lòng đảm bảo sao lưu toàn bộ trang web của bạn trước khi tiếp tục.
- Mở tệp …/\wp-content/plugins/wp-job-manager-applications/includes/wp-job-manager-applications-functions.php.
- Tìm dòng 302.
- Thay thế:
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 ); } - Bằng:
// 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 ); }