PluginProbe
Elementor Website Builder – more than just a page builder / 3.20.2
Elementor Website Builder – more than just a page builder v3.20.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/elements/column.php +27 -66 4.0.93.20.2 View file →
@@ -1,9 +1,8 @@
1 1 <?php
2 2 namespace Elementor;
3 3
4 4 use Elementor\Core\Breakpoints\Manager as Breakpoints_Manager;
5 -use Elementor\Plugin;
6 5
7 6 if ( ! defined( 'ABSPATH' ) ) {
8 7 exit; // Exit if accessed directly.
9 8 }
@@ -74,12 +73,8 @@
74 73 public function get_icon() {
75 74 return 'eicon-column';
76 75 }
77 76
78 - protected function is_dynamic_content(): bool {
79 - return false;
80 - }
81 -
82 77 /**
83 78 * Get initial config.
84 79 *
85 80 * Retrieve the current section initial configuration.
@@ -119,9 +114,9 @@
119 114 'tab' => Controls_Manager::TAB_LAYOUT,
120 115 ]
121 116 );
122 117
123 - // Element Name for the Navigator.
118 + // Element Name for the Navigator
124 119 $this->add_control(
125 120 '_title',
126 121 [
127 122 'label' => esc_html__( 'Title', 'elementor' ),
@@ -196,11 +191,11 @@
196 191 'top' => 'flex-start',
197 192 'bottom' => 'flex-end',
198 193 ],
199 194 'selectors' => [
200 - // TODO: The following line is for BC since 2.7.0.
195 + // TODO: The following line is for BC since 2.7.0
201 196 '.elementor-bc-flex-widget {{WRAPPER}}.elementor-column .elementor-widget-wrap' => 'align-items: {{VALUE}}',
202 - // This specificity is intended to make sure column css overwrites section css on vertical alignment (content_position).
197 + // This specificity is intended to make sure column css overwrites section css on vertical alignment (content_position)
203 198 '{{WRAPPER}}.elementor-column.elementor-element[data-element_type="column"] > .elementor-widget-wrap.elementor-element-populated' => 'align-content: {{VALUE}}; align-items: {{VALUE}};',
204 199 ],
205 200 ]
206 201 );
@@ -225,13 +220,8 @@
225 220 ],
226 221 ]
227 222 );
228 223
229 - $optimized_markup = Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
230 - $space_between_widgets = $optimized_markup
231 - ? '--kit-widget-spacing: {{VALUE}}px'
232 - : 'margin-block-end: {{VALUE}}px';
233 -
234 224 $this->add_responsive_control(
235 225 'space_between_widgets',
236 226 [
237 227 'label' => esc_html__( 'Widgets Space', 'elementor' ) . ' (px)',
@@ -237,9 +227,9 @@
237 227 'label' => esc_html__( 'Widgets Space', 'elementor' ) . ' (px)',
238 228 'type' => Controls_Manager::NUMBER,
239 229 'placeholder' => 20,
240 230 'selectors' => [
241 - '{{WRAPPER}} > .elementor-widget-wrap > .elementor-widget:not(.elementor-widget__width-auto):not(.elementor-widget__width-initial):not(:last-child):not(.elementor-absolute)' => $space_between_widgets, // Need the full path for exclude the inner section.
231 + '{{WRAPPER}} > .elementor-widget-wrap > .elementor-widget:not(.elementor-widget__width-auto):not(.elementor-widget__width-initial):not(:last-child):not(.elementor-absolute)' => 'margin-bottom: {{VALUE}}px', //Need the full path for exclude the inner section
242 232 ],
243 233 ]
244 234 );
245 235
@@ -296,45 +286,15 @@
296 286 'fields_options' => [
297 287 'background' => [
298 288 'frontend_available' => true,
299 289 ],
300 - ],
301 - ]
302 - );
303 -
304 - $this->add_control(
305 - 'handle_slideshow_asset_loading',
306 - [
307 - 'type' => Controls_Manager::HIDDEN,
308 - 'assets' => [
309 - 'styles' => [
310 - [
311 - 'name' => 'e-swiper',
312 - 'conditions' => [
313 - 'terms' => [
314 - [
315 - 'name' => 'background_background',
316 - 'operator' => '===',
317 - 'value' => 'slideshow',
318 - ],
319 - ],
320 - ],
290 + 'image' => [
291 + 'background_lazyload' => [
292 + 'active' => true,
293 + 'keys' => [ 'background_image', 'url' ],
294 + 'selector' => '.elementor-element-populated',
321 295 ],
322 296 ],
323 - 'scripts' => [
324 - [
325 - 'name' => 'swiper',
326 - 'conditions' => [
327 - 'terms' => [
328 - [
329 - 'name' => 'background_background',
330 - 'operator' => '===',
331 - 'value' => 'slideshow',
332 - ],
333 - ],
334 - ],
335 - ],
336 - ],
337 297 ],
338 298 ]
339 299 );
340 300
@@ -406,8 +366,17 @@
406 366 Group_Control_Background::get_type(),
407 367 [
408 368 'name' => 'background_overlay',
409 369 'selector' => '{{WRAPPER}} > .elementor-element-populated > .elementor-background-overlay',
370 + 'fields_options' => [
371 + 'image' => [
372 + 'background_lazyload' => [
373 + 'active' => true,
374 + 'keys' => [ '_background_overlay', 'url' ],
375 + 'selector' => '.elementor-background-overlay,',
376 + ],
377 + ],
378 + ],
410 379 ]
411 380 );
412 381
413 382 $this->add_responsive_control(
@@ -647,9 +616,9 @@
647 616 'operator' => '!==',
648 617 'value' => '',
649 618 ],
650 619 [
651 - 'name' => 'border_hover_border',
620 + 'name' => 'border_border',
652 621 'operator' => '!==',
653 622 'value' => '',
654 623 ],
655 624 ],
@@ -730,10 +699,10 @@
730 699 [
731 700 'label' => esc_html__( 'Text Align', 'elementor' ),
732 701 'type' => Controls_Manager::CHOOSE,
733 702 'options' => [
734 - 'start' => [
735 - 'title' => esc_html__( 'Start', 'elementor' ),
703 + 'left' => [
704 + 'title' => esc_html__( 'Left', 'elementor' ),
736 705 'icon' => 'eicon-text-align-left',
737 706 ],
738 707 'center' => [
739 708 'title' => esc_html__( 'Center', 'elementor' ),
@@ -738,10 +707,10 @@
738 707 'center' => [
739 708 'title' => esc_html__( 'Center', 'elementor' ),
740 709 'icon' => 'eicon-text-align-center',
741 710 ],
742 - 'end' => [
743 - 'title' => esc_html__( 'End', 'elementor' ),
711 + 'right' => [
712 + 'title' => esc_html__( 'Right', 'elementor' ),
744 713 'icon' => 'eicon-text-align-right',
745 714 ],
746 715 'justify' => [
747 716 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -747,13 +716,8 @@
747 716 'title' => esc_html__( 'Justified', 'elementor' ),
748 717 'icon' => 'eicon-text-align-justify',
749 718 ],
750 719 ],
751 - 'classes' => 'elementor-control-start-end',
752 - 'selectors_dictionary' => [
753 - 'left' => is_rtl() ? 'end' : 'start',
754 - 'right' => is_rtl() ? 'start' : 'end',
755 - ],
756 720 'selectors' => [
757 721 '{{WRAPPER}} > .elementor-element-populated' => 'text-align: {{VALUE}};',
758 722 ],
759 723 ]
@@ -845,9 +809,9 @@
845 809 );
846 810
847 811 Plugin::$instance->controls_manager->add_display_conditions_controls( $this );
848 812
849 - // TODO: Backward comparability for deprecated controls.
813 + // TODO: Backward comparability for deprecated controls
850 814 $this->add_control(
851 815 'screen_sm',
852 816 [
853 817 'type' => Controls_Manager::HIDDEN,
@@ -863,9 +827,9 @@
863 827 ],
864 828 'prefix_class' => 'elementor-sm-',
865 829 ]
866 830 );
867 - // END Backward comparability.
831 + // END Backward comparability
868 832
869 833 $this->end_controls_section();
870 834
871 835 $this->start_controls_section(
@@ -980,13 +944,10 @@
980 944 */
981 945 public function before_render() {
982 946 $settings = $this->get_settings_for_display();
983 947
984 - $overlay_background = $settings['background_overlay_background'] ?? '';
985 - $overlay_hover_background = $settings['background_overlay_hover_background'] ?? '';
986 -
987 - $has_background_overlay = in_array( $overlay_background, [ 'classic', 'gradient' ], true ) ||
988 - in_array( $overlay_hover_background, [ 'classic', 'gradient' ], true );
948 + $has_background_overlay = in_array( $settings['background_overlay_background'], [ 'classic', 'gradient' ], true ) ||
949 + in_array( $settings['background_overlay_hover_background'], [ 'classic', 'gradient' ], true );
989 950
990 951 $column_wrap_classes = [ 'elementor-widget-wrap' ];
991 952
992 953 if ( $this->get_children() ) {