- 상태
- 개발자 대기 중
- 관련 플러그인/테마
- WP Job Manager
- 주제 태그
- Compatibility
문제 개요
WP Job Manager의 Applications 애드온과 함께 WPML을 사용할 때, Job 대시보드에서 현재 언어의 양식만 표시하는 대신 모든 언어의 지원서 양식을 잘못 표시합니다. 이 문제는 채용 공고 편집 양식에 영향을 미치며 사용자에게 혼란을 줍니다.
임시 해결 방법
진행하기 전에 사이트의 전체 사이트 백업을 완료했는지 확인하세요.
- …/\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 ); }