- สถานะ
- แก้ไขแล้ว
- รายงานสำหรับ
- WPML Multilingual CMS 4.6.7
- แก้ไขใน
- WPML 4.7.0
- ปลั๊กอิน/ธีมที่เกี่ยวข้อง
- Elementor
- แท็กหัวข้อ
- Compatibility
ภาพรวมของปัญหา
เมื่อใช้งาน Elementor Pro ร่วมกับ WPML เพื่อสร้างและแปลป๊อปอัป CSS แบบอินไลน์สำหรับป๊อปอัปที่แปลแล้วอาจแสดงผลไม่ถูกต้อง ซึ่งทำให้เกิดความคลาดเคลื่อนในการแสดงผลเล็กน้อยระหว่างเวอร์ชันต้นฉบับและเวอร์ชันที่แปล
วิธีแก้ปัญหาชั่วคราว
โปรดตรวจสอบให้แน่ใจว่าได้สำรองข้อมูลทั้งหมดของไซต์คุณก่อนดำเนินการต่อ
- เปิดไฟล์ …/wp-content/plugins/elementor-pro/modules/popup/tag.php
- ค้นหาบรรทัดที่ 99
- เปลี่ยน:
public function render() { $settings = $this->get_active_settings(); if ( 'close' === $settings['action'] ) { $this->print_close_popup_link( $settings ); return; } $this->print_open_popup_link( $settings ); } - เป็น:
public function render() { $settings = $this->get_active_settings(); if ( 'close' === $settings['action'] ) { $this->print_close_popup_link( $settings ); return; } // WPML Workaround for compsupp-7039 if ( class_exists('Sitepress') && isset($settings['popup']) ) { $settings['popup'] = apply_filters( 'wpml_object_id', $settings['popup'], get_post_type($settings['popup']) , TRUE ); } $this->print_open_popup_link( $settings ); }