Skip to content

Commit f7bf4c2

Browse files
authored
Fix: WPML translations do not work when using the template as a shortcode. (#159)
1 parent c9e0f05 commit f7bf4c2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

inc/class-header-footer-elementor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public function render_template( $atts ) {
324324
'hfe_template'
325325
);
326326

327-
$id = ! empty( $atts['id'] ) ? intval( $atts['id'] ) : '';
327+
$id = ! empty( $atts['id'] ) ? apply_filters( 'hfe_render_template_id', intval( $atts['id'] ) ) : '';
328328

329329
if ( empty( $id ) ) {
330330
return '';

inc/compatibility/class-hfe-wpml-compatibility.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static function instance() {
4646
private function __construct() {
4747
add_filter( 'hfe_get_settings_type_header', array( $this, 'get_wpml_object' ) );
4848
add_filter( 'hfe_get_settings_type_footer', array( $this, 'get_wpml_object' ) );
49+
add_filter( 'hfe_render_template_id', array( $this, 'get_wpml_object' ) );
4950
}
5051

5152
/**

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ If the above is nnot possible, You can also add support for the plugin from your
9393

9494
== Changelog ==
9595

96+
= Unreleased
97+
- Fix: WPML Translations do not work when using the Elementor Template as a shortcode.
98+
9699
= 1.1.2 =
97100
- Fix: Depracated function warning from Elementor's method `\Elementor\Post_CSS_File`
98101

0 commit comments

Comments
 (0)