WPML

문제 개요

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 );
    	}

모든 알려진 문제

여전히 이 문제가 발생합니까?

업데이트해도 문제가 해결되지 않으면 지원 문의를 하세요. 함께 살펴보겠습니다.