- 状态
- 已解决
- 报告针对
- 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 ); }