WPML
상태
미해결
관련 플러그인/테마
WP Job Manager
주제 태그
Compatibility

문제 개요

WPML과 함께 WP Job Manager를 사용할 때, 프런트엔드(Job 대시보드)에서 Job 글 또는 Resume 글을 삭제해도 번역은 자동으로 삭제되지 않습니다. “WPML > 설정 > 글 및 페이지 동기화”에서 “글을 삭제할 때 번역도 삭제” 옵션이 활성화되어 있는 경우에도 마찬가지입니다.

임시 해결 방법

진행하기 전에 사이트의 전체 사이트 백업이 있는지 확인하세요.

Job 글의 경우


  • /wp-content/plugins/wp-job-manager/includes/class-job-dashboard-shortcode.php를 여세요.

  • 466번째 줄을 찾으세요.

  • 다음을:
    				case 'delete':
    					// Trash it.
    					wp_trash_post( $job_id );

  • 다음으로 교체하세요:
    				case 'delete':
    					// Trash it.
    					// WPML workaround for compsupp-7729
    					if ( class_exists('Sitepress') ) {
    						$trid = apply_filters( 'wpml_element_trid', NULL, $job_id , 'post_job_listing' );
    						$translations = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'job_listing' );
    						if ( !empty( $translations ) ) {
    							foreach ( $translations as $lang => $translation ) {
    								$translation_id = absint( $translation->element_id );
    								wp_trash_post( $translation_id );
    							}
    						}
    					} else {
    						wp_trash_post( $job_id );
    					}

Resume 글의 경우


  • /wp-content/plugins/wp-job-manager-resumes/includes/class-wp-resume-manager-shortcodes.php를 여세요.

  • 125번째 줄을 찾으세요.

  • 다음을:
    				case 'delete':
    					// Trash it.
    					wp_trash_post( $resume_id );

  • 다음으로 교체하세요:
    				case 'delete':
    					// Trash it.
    					// WPML workaround for compsupp-7757
    					if ( class_exists('Sitepress') ) {
    						$trid = apply_filters( 'wpml_element_trid', NULL, $resume_id , 'post_resume' );
    						$translations = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'resume' );
    						if ( !empty( $translations ) ) {
    							foreach ( $translations as $lang => $translation ) {
    								$translation_id = absint( $translation->element_id );
    								wp_trash_post( $translation_id );
    							}
    						}
    					} else {
    						wp_trash_post( $resume_id );
    					}

알려진 모든 문제 →