问题概述
将 Unlimited Elements for Elementor 与 WPML 结合使用时,您可能会遇到以下问题:使用 WPML 的媒体翻译所翻译的图像可能会以默认站点语言显示。这通常会影响类似 CoverFlow Carousel 的图像小工具。
临时解决方法
在继续操作之前,请确保您拥有完整的站点备份。
- 打开 …/wp-content/plugins/unlimited-elements-for-elementor/provider/wpml_integrate.class.php 文件。
- 找到第 156 行。
- 将:
$alternateThumbID = apply_filters( 'wpml_object_id', $thumbID, 'attachment', false, self::$objWpmlSingleton->activeLanguage );
- 替换为:
$current_lang = apply_filters( 'wpml_current_language', null ); $alternateThumbID = apply_filters( 'wpml_object_id', $thumbID, 'attachment', false, $current_lang );