WPML

문제 개요

Houzez 테마는 자체 사용자 정의 함수를 사용하여 테마 옵션을 호출합니다. 사이트의 기본 언어가 영어가 아닌 경우, 이 함수는 WPML과 충돌합니다. 그 결과 프런트엔드에 번역이 표시되지 않으며 관리 화면에서는 기본 언어로 되돌아갑니다.

임시 해결 방법

이 문제는 해결되었습니다. 최신 버전으로 업데이트하면 사이트에서 이 문제가 해결되므로, 아직 업데이트할 수 없는 경우에만 이 임시 해결 방법이 필요합니다.

진행하기 전에 사이트를 전체 백업하세요.

  1. /wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php를 여세요.
  2. 198번째 줄을 찾으세요.
  3. 다음 코드를:
    function icl_st_set_admin_options_filters() {
    	$option_names = $this->getOptionNames();
    
    	foreach ( $option_names as $option_key => $option ) {
    		if ( $this->is_blacklisted( $option_key ) ) {
    			unset( $option_names[ $option_key ] );
    			update_option( '_icl_admin_option_names', $option_names );
    		} elseif ( $option_key != 'theme' && $option_key != 'plugin' ) { // theme and plugin are an obsolete format before 3.2
    			add_filter( 'option_' . $option_key, array( $this, 'icl_st_translate_admin_string' ) );
    			add_action( 'update_option_' . $option_key, array( $this, 'on_update_original_value' ), 10, 3 );
    		}
    	}
    }
  4. 다음과 같이 바꾸세요:
    function icl_st_set_admin_options_filters() {
    	$option_names = $this->getOptionNames();
    
    	$isAdmin = is_admin() && ! wpml_is_ajax();
    
    	foreach ( $option_names as $option_key => $option ) {
    		if ( $this->is_blacklisted( $option_key ) ) {
    			unset( $option_names[ $option_key ] );
    			update_option( '_icl_admin_option_names', $option_names );
    		} elseif ( $option_key != 'theme' && $option_key != 'plugin' ) { // theme and plugin are an obsolete format before 3.2
    			/**
    			 * We don't want to translate admin strings in admin panel because it causes a lot of confusion
    			 * when a value is displayed inside the form input.
    			 **/
    			if ( ! $isAdmin ) {
    				add_filter( 'option_' . $option_key, array( $this, 'icl_st_translate_admin_string' ) );
    			}
    			add_action( 'update_option_' . $option_key, array( $this, 'on_update_original_value' ), 10, 3 );
    		}
    	}
    }

다음 단계

이 문제는 WPML 4.5(2021년 9월 말)가 릴리스되면 해결됩니다.

모든 알려진 문제

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

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