| @@ -150,12 +150,12 @@ | ||
| 150 | 150 | ], |
| 151 | 151 | ] |
| 152 | 152 | ); |
| 153 | 153 | |
| 154 | - $is_legacy_mode_active = Plugin::instance()->get_legacy_mode( 'elementWrappers' ); | |
| 155 | - $main_selector_element = $is_legacy_mode_active ? 'column' : 'widget'; | |
| 156 | - $widget_wrap_child = $is_legacy_mode_active ? ' > .elementor-widget-wrap' : ''; | |
| 157 | - $column_wrap_child = $is_legacy_mode_active ? ' > .elementor-column-wrap' : ''; | |
| 154 | + $is_dome_optimization_active = Plugin::$instance->experiments->is_feature_active( 'e_dom_optimization' ); | |
| 155 | + $main_selector_element = $is_dome_optimization_active ? 'widget' : 'column'; | |
| 156 | + $widget_wrap_child = $is_dome_optimization_active ? '' : ' > .elementor-widget-wrap'; | |
| 157 | + $column_wrap_child = $is_dome_optimization_active ? '' : ' > .elementor-column-wrap'; | |
| 158 | 158 | |
| 159 | 159 | $this->add_responsive_control( |
| 160 | 160 | 'content_position', |
| 161 | 161 | [ |
| @@ -204,9 +204,9 @@ | ||
| 204 | 204 | ], |
| 205 | 205 | ] |
| 206 | 206 | ); |
| 207 | 207 | |
| 208 | - $space_between_widgets_selector = $is_legacy_mode_active ? '> .elementor-column-wrap ' : ''; | |
| 208 | + $space_between_widgets_selector = $is_dome_optimization_active ? '' : '> .elementor-column-wrap '; | |
| 209 | 209 | |
| 210 | 210 | $this->add_responsive_control( |
| 211 | 211 | 'space_between_widgets', |
| 212 | 212 | [ |
| @@ -908,15 +908,15 @@ | ||
| 908 | 908 | * @since 2.9.0 |
| 909 | 909 | * @access protected |
| 910 | 910 | */ |
| 911 | 911 | protected function content_template() { |
| 912 | - $is_legacy_mode_active = Plugin::instance()->get_legacy_mode( 'elementWrappers' ); | |
| 913 | - $wrapper_element = $is_legacy_mode_active ? 'column' : 'widget'; | |
| 912 | + $is_dom_optimization_active = Plugin::$instance->experiments->is_feature_active( 'e_dom_optimization' ); | |
| 913 | + $wrapper_element = $is_dom_optimization_active ? 'widget' : 'column'; | |
| 914 | 914 | |
| 915 | 915 | ?> |
| 916 | 916 | <div class="elementor-<?php echo $wrapper_element; ?>-wrap"> |
| 917 | 917 | <div class="elementor-background-overlay"></div> |
| 918 | - <?php if ( $is_legacy_mode_active ) { ?> | |
| 918 | + <?php if ( ! $is_dom_optimization_active ) { ?> | |
| 919 | 919 | <div class="elementor-widget-wrap"></div> |
| 920 | 920 | <?php } ?> |
| 921 | 921 | </div> |
| 922 | 922 | <?php |
| @@ -935,12 +935,12 @@ | ||
| 935 | 935 | |
| 936 | 936 | $has_background_overlay = in_array( $settings['background_overlay_background'], [ 'classic', 'gradient' ], true ) || |
| 937 | 937 | in_array( $settings['background_overlay_hover_background'], [ 'classic', 'gradient' ], true ); |
| 938 | 938 | |
| 939 | - $is_legacy_mode_active = Plugin::instance()->get_legacy_mode( 'elementWrappers' ); | |
| 940 | - $wrapper_attribute_string = $is_legacy_mode_active ? '_inner_wrapper' : '_widget_wrapper'; | |
| 939 | + $is_dom_optimization_active = Plugin::$instance->experiments->is_feature_active( 'e_dom_optimization' ); | |
| 940 | + $wrapper_attribute_string = $is_dom_optimization_active ? '_widget_wrapper' : '_inner_wrapper'; | |
| 941 | 941 | |
| 942 | - $column_wrap_classes = $is_legacy_mode_active ? [ 'elementor-column-wrap' ] : [ 'elementor-widget-wrap' ]; | |
| 942 | + $column_wrap_classes = $is_dom_optimization_active ? [ 'elementor-widget-wrap' ] : [ 'elementor-column-wrap' ]; | |
| 943 | 943 | |
| 944 | 944 | if ( $this->get_children() ) { |
| 945 | 945 | $column_wrap_classes[] = 'elementor-element-populated'; |
| 946 | 946 | } |
| @@ -949,9 +949,9 @@ | ||
| 949 | 949 | '_inner_wrapper' => [ |
| 950 | 950 | 'class' => $column_wrap_classes, |
| 951 | 951 | ], |
| 952 | 952 | '_widget_wrapper' => [ |
| 953 | - 'class' => $is_legacy_mode_active ? 'elementor-widget-wrap' : $column_wrap_classes, | |
| 953 | + 'class' => $is_dom_optimization_active ? $column_wrap_classes : 'elementor-widget-wrap', | |
| 954 | 954 | ], |
| 955 | 955 | '_background_overlay' => [ |
| 956 | 956 | 'class' => [ 'elementor-background-overlay' ], |
| 957 | 957 | ], |
| @@ -961,9 +961,9 @@ | ||
| 961 | 961 | <div <?php echo $this->get_render_attribute_string( $wrapper_attribute_string ); ?>> |
| 962 | 962 | <?php if ( $has_background_overlay ) : ?> |
| 963 | 963 | <div <?php echo $this->get_render_attribute_string( '_background_overlay' ); ?>></div> |
| 964 | 964 | <?php endif; ?> |
| 965 | - <?php if ( $is_legacy_mode_active ) : ?> | |
| 965 | + <?php if ( ! $is_dom_optimization_active ) : ?> | |
| 966 | 966 | <div <?php echo $this->get_render_attribute_string( '_widget_wrapper' ); ?>> |
| 967 | 967 | <?php endif; ?> |
| 968 | 968 | <?php |
| 969 | 969 | } |
| @@ -976,9 +976,9 @@ | ||
| 976 | 976 | * @since 1.0.0 |
| 977 | 977 | * @access public |
| 978 | 978 | */ |
| 979 | 979 | public function after_render() { |
| 980 | - if ( Plugin::instance()->get_legacy_mode( 'elementWrappers' ) ) { ?> | |
| 980 | + if ( ! Plugin::$instance->experiments->is_feature_active( 'e_dom_optimization' ) ) { ?> | |
| 981 | 981 | </div> |
| 982 | 982 | <?php } ?> |
| 983 | 983 | </div> |
| 984 | 984 | </<?php echo $this->get_html_tag(); ?>> |