WPML
상태
개발자가 해결함
관련 플러그인/테마
BeTheme
주제 태그
Compatibility

문제 개요

BeTheme 테마 및 해당 글로벌 섹션을 사용하는 경우, 번역을 사용할 수 있음에도 불구하고 보조 언어에서 이 섹션의 번역된 버전이 표시되지 않는 현상을 겪을 수 있습니다.

임시 해결 방법

진행하기 전에 전체 사이트 백업을 완료했는지 확인하세요.


  • …/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php 파일을 여세요.

  • 다음 코드를:
    public function show_sections($mfn_items, $vbtoolsoff = false){
    
    	if( !is_array($mfn_items) ) return;
    
    	foreach ($mfn_items as $s => $section) {
    
    		$section_class = [];

  • 다음으로 교체하세요:
    public function show_sections($mfn_items, $vbtoolsoff = false){
    
    	if( !is_array($mfn_items) ) return;
    
    	foreach ($mfn_items as $s => $section) {
    
    		// WPML workaround for compsupp-7262
    		if( class_exists('Sitepress') && ! empty($section['mfn_global_section_id'] ) ) {
    			$section['mfn_global_section_id'] = apply_filters( 'wpml_object_id', $section['mfn_global_section_id'], get_post_type($section['mfn_global_section_id']) , TRUE  );
    		}
    
    		$section_class = [];

  • 두 번째로, …/wp-content/themes/betheme/functions/post-types/class-mfn-post-type-template.php 파일을 여세요.

  • 21번째 줄을 찾으세요.

  • 다음을:
    public function __construct(){
    
        if( !apply_filters('bebuilder_access', false) ){
            return false;
        }
    
        if( !current_user_can('editor') && !current_user_can('administrator') ){
            return false;
        }
    
        parent::__construct();
    
        // fires after WordPress has finished loading but before any headers are sent
        add_action('init', array($this, 'register'));

  • 다음으로 교체하세요:
    public function __construct(){
    
    	// WPML Workaround for compsupp-7262 (Part 2)
    	if ( ! class_exists('Sitepress') ) {
    
    		if( !apply_filters('bebuilder_access', false) ){
    			return false;
    		}
    
    		if( !current_user_can('editor') && !current_user_can('administrator') ){
    			return false;
    		}
    	}
    
    	parent::__construct();
    
    	// fires after WordPress has finished loading but before any headers are sent
    	add_action('init', array($this, 'register'));

알려진 모든 문제 →