PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.1.9
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.1.9
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Builder/Managers/ConditionManager.php +9 -4 3.0.43.1.9 View file →
@@ -22,9 +22,9 @@
22 22 /**
23 23 * @var ThemeBuilder
24 24 */
25 25 private $builder;
26 -
26 +
27 27 private $location_cache = [];
28 28
29 29 public function __construct( $builder ) {
30 30 $this->cache = new Cache();
@@ -30,11 +30,11 @@
30 30 $this->cache = new Cache();
31 31 $this->builder = $builder;
32 32
33 33 add_action( 'wp_loaded', [ $this, 'register' ] );
34 - add_action( 'wp_ajax_templately_conditions', [ $this, 'get_conditions' ] );
35 - add_action( 'wp_ajax_templately_save_conditions', [ $this, 'save_conditions' ] );
36 - add_action( 'wp_ajax_templately_check_conditions', [ $this, 'check_conditions' ] );
34 + // add_action( 'wp_ajax_templately_conditions', [ $this, 'get_conditions' ] );
35 + // add_action( 'wp_ajax_templately_save_conditions', [ $this, 'save_conditions' ] );
36 + // add_action( 'wp_ajax_templately_check_conditions', [ $this, 'check_conditions' ] );
37 37 }
38 38
39 39 public function get_conditions() {
40 40 $config = [];
@@ -243,8 +243,13 @@
243 243 $is_passed = $sub_condition->check( [ 'id' => $sub_id ] );
244 244 }
245 245
246 246 if ( $is_passed ) {
247 + // Get the post ID in the current language
248 + if($template_id_locale = apply_filters( 'wpml_object_id', $template_id )){
249 + $template_id = $template_id_locale;
250 + }
251 +
247 252 $post_status = get_post_status( $template_id );
248 253
249 254 if ( $post_status !== 'publish' ) {
250 255 continue;