WPML
Trạng thái
Đã được giải quyết bởi nhà phát triển
Plugin/giao diện liên quan
BeTheme
Thẻ chủ đề
Compatibility

Tổng quan về lỗi

Nếu bạn đang sử dụng giao diện BeTheme và các global section của nó, bạn có thể gặp tình trạng các section này không hiển thị phiên bản đã dịch ở các ngôn ngữ phụ, mặc dù đã có sẵn bản dịch.

Giải pháp tạm thời

Vui lòng đảm bảo bạn có bản sao lưu toàn bộ trang web trước khi tiếp tục.


  • Mở tệp …/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php.

  • Thay thế mã này:
    public function show_sections($mfn_items, $vbtoolsoff = false){
    
    	if( !is_array($mfn_items) ) return;
    
    	foreach ($mfn_items as $s => $section) {
    
    		$section_class = [];

  • Bằng:
    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 = [];

  • Thứ hai, mở tệp …/wp-content/themes/betheme/functions/post-types/class-mfn-post-type-template.php.

  • Tìm dòng 21.

  • Thay thế:
    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'));

  • Bằng:
    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'));

Tất cả các lỗi đã ghi nhận →