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/section.php +53 -119 4.2.03.20.2 View file →
@@ -91,12 +91,8 @@
91 91 public function get_icon() {
92 92 return 'eicon-columns';
93 93 }
94 94
95 - protected function is_dynamic_content(): bool {
96 - return false;
97 - }
98 -
99 95 /**
100 96 * Get presets.
101 97 *
102 98 * Retrieve a specific preset columns for a given columns count, or a list
@@ -232,9 +228,9 @@
232 228 'tab' => Controls_Manager::TAB_LAYOUT,
233 229 ]
234 230 );
235 231
236 - // Element Name for the Navigator.
232 + // Element Name for the Navigator
237 233 $this->add_control(
238 234 '_title',
239 235 [
240 236 'label' => esc_html__( 'Title', 'elementor' ),
@@ -436,9 +432,9 @@
436 432 ],
437 433 'selectors' => [
438 434 '{{WRAPPER}} > .elementor-container > .elementor-column > .elementor-widget-wrap' => 'align-content: {{VALUE}}; align-items: {{VALUE}};',
439 435 ],
440 - // TODO: The following line is for BC since 2.7.0.
436 + // TODO: The following line is for BC since 2.7.0
441 437 'prefix_class' => 'elementor-section-content-',
442 438 ]
443 439 );
444 440
@@ -503,9 +499,9 @@
503 499 );
504 500
505 501 $this->end_controls_section();
506 502
507 - // Section Structure.
503 + // Section Structure
508 504 $this->start_controls_section(
509 505 'section_structure',
510 506 [
511 507 'label' => esc_html__( 'Structure', 'elementor' ),
@@ -525,9 +521,9 @@
525 521 );
526 522
527 523 $this->end_controls_section();
528 524
529 - // Section background.
525 + // Section background
530 526 $this->start_controls_section(
531 527 'section_background',
532 528 [
533 529 'label' => esc_html__( 'Background', 'elementor' ),
@@ -552,45 +548,14 @@
552 548 'fields_options' => [
553 549 'background' => [
554 550 'frontend_available' => true,
555 551 ],
556 - ],
557 - ]
558 - );
559 -
560 - $this->add_control(
561 - 'handle_slideshow_asset_loading',
562 - [
563 - 'type' => Controls_Manager::HIDDEN,
564 - 'assets' => [
565 - 'styles' => [
566 - [
567 - 'name' => 'e-swiper',
568 - 'conditions' => [
569 - 'terms' => [
570 - [
571 - 'name' => 'background_background',
572 - 'operator' => '===',
573 - 'value' => 'slideshow',
574 - ],
575 - ],
576 - ],
552 + 'image' => [
553 + 'background_lazyload' => [
554 + 'active' => true,
555 + 'keys' => [ 'background_image', 'url' ],
577 556 ],
578 557 ],
579 - 'scripts' => [
580 - [
581 - 'name' => 'swiper',
582 - 'conditions' => [
583 - 'terms' => [
584 - [
585 - 'name' => 'background_background',
586 - 'operator' => '===',
587 - 'value' => 'slideshow',
588 - ],
589 - ],
590 - ],
591 - ],
592 - ],
593 558 ],
594 559 ]
595 560 );
596 561
@@ -636,9 +601,9 @@
636 601 $this->end_controls_tabs();
637 602
638 603 $this->end_controls_section();
639 604
640 - // Background Overlay.
605 + // Background Overlay
641 606 $this->start_controls_section(
642 607 'section_background_overlay',
643 608 [
644 609 'label' => esc_html__( 'Background Overlay', 'elementor' ),
@@ -659,8 +624,17 @@
659 624 Group_Control_Background::get_type(),
660 625 [
661 626 'name' => 'background_overlay',
662 627 'selector' => '{{WRAPPER}} > .elementor-background-overlay',
628 + 'fields_options' => [
629 + 'image' => [
630 + 'background_lazyload' => [
631 + 'active' => true,
632 + 'keys' => [ 'background_overlay_image', 'url' ],
633 + 'selector' => '.elementor-background-overlay',
634 + ],
635 + ],
636 + ],
663 637 ]
664 638 );
665 639
666 640 $this->add_responsive_control(
@@ -823,9 +797,9 @@
823 797 $this->end_controls_tabs();
824 798
825 799 $this->end_controls_section();
826 800
827 - // Section border.
801 + // Section border
828 802 $this->start_controls_section(
829 803 'section_border',
830 804 [
831 805 'label' => esc_html__( 'Border', 'elementor' ),
@@ -929,9 +903,9 @@
929 903 'operator' => '!==',
930 904 'value' => '',
931 905 ],
932 906 [
933 - 'name' => 'border_hover_border',
907 + 'name' => 'border_border',
934 908 'operator' => '!==',
935 909 'value' => '',
936 910 ],
937 911 ],
@@ -948,9 +922,9 @@
948 922 $this->end_controls_tabs();
949 923
950 924 $this->end_controls_section();
951 925
952 - // Section Shape Divider.
926 + // Section Shape Divider
953 927 $this->start_controls_section(
954 928 'section_shape_divider',
955 929 [
956 930 'label' => esc_html__( 'Shape Divider', 'elementor' ),
@@ -959,8 +933,16 @@
959 933 );
960 934
961 935 $this->start_controls_tabs( 'tabs_shape_dividers' );
962 936
937 + $shapes_options = [
938 + '' => esc_html__( 'None', 'elementor' ),
939 + ];
940 +
941 + foreach ( Shapes::get_shapes() as $shape_name => $shape_props ) {
942 + $shapes_options[ $shape_name ] = $shape_props['title'];
943 + }
944 +
963 945 foreach ( [
964 946 'top' => esc_html__( 'Top', 'elementor' ),
965 947 'bottom' => esc_html__( 'Bottom', 'elementor' ),
966 948 ] as $side => $side_label ) {
@@ -976,30 +958,12 @@
976 958 $this->add_control(
977 959 $base_control_key,
978 960 [
979 961 'label' => esc_html__( 'Type', 'elementor' ),
980 - 'type' => Controls_Manager::VISUAL_CHOICE,
981 - 'label_block' => true,
982 - 'columns' => 2,
983 - 'options' => Shapes::get_shapes(),
962 + 'type' => Controls_Manager::SELECT,
963 + 'options' => $shapes_options,
984 964 'render_type' => 'none',
985 965 'frontend_available' => true,
986 - 'assets' => [
987 - 'styles' => [
988 - [
989 - 'name' => 'e-shapes',
990 - 'conditions' => [
991 - 'terms' => [
992 - [
993 - 'name' => $base_control_key,
994 - 'operator' => '!==',
995 - 'value' => '',
996 - ],
997 - ],
998 - ],
999 - ],
1000 - ],
1001 - ],
1002 966 ]
1003 967 );
1004 968
1005 969 $this->add_control(
@@ -1018,11 +982,10 @@
1018 982
1019 983 $this->add_responsive_control(
1020 984 $base_control_key . '_width',
1021 985 [
1022 - 'label' => esc_html__( 'Width', 'elementor' ),
986 + 'label' => esc_html__( 'Width', 'elementor' ) . ' (%)',
1023 987 'type' => Controls_Manager::SLIDER,
1024 - 'size_units' => [ '%', 'vw', 'custom' ],
1025 988 'default' => [
1026 989 'unit' => '%',
1027 990 ],
1028 991 'tablet_default' => [
@@ -1035,12 +998,8 @@
1035 998 '%' => [
1036 999 'min' => 100,
1037 1000 'max' => 300,
1038 1001 ],
1039 - 'vw' => [
1040 - 'min' => 100,
1041 - 'max' => 300,
1042 - ],
1043 1002 ],
1044 1003 'condition' => [
1045 1004 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'height_only', Shapes::FILTER_EXCLUDE ) ),
1046 1005 ],
@@ -1054,19 +1013,12 @@
1054 1013 $base_control_key . '_height',
1055 1014 [
1056 1015 'label' => esc_html__( 'Height', 'elementor' ),
1057 1016 'type' => Controls_Manager::SLIDER,
1058 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
1059 1017 'range' => [
1060 1018 'px' => [
1061 1019 'max' => 500,
1062 1020 ],
1063 - 'em' => [
1064 - 'max' => 50,
1065 - ],
1066 - 'rem' => [
1067 - 'max' => 50,
1068 - ],
1069 1021 ],
1070 1022 'condition' => [
1071 1023 "shape_divider_$side!" => '',
1072 1024 ],
@@ -1123,9 +1075,9 @@
1123 1075 $this->end_controls_tabs();
1124 1076
1125 1077 $this->end_controls_section();
1126 1078
1127 - // Section Typography.
1079 + // Section Typography
1128 1080 $this->start_controls_section(
1129 1081 'section_typo',
1130 1082 [
1131 1083 'label' => esc_html__( 'Typography', 'elementor' ),
@@ -1186,10 +1138,10 @@
1186 1138 [
1187 1139 'label' => esc_html__( 'Text Align', 'elementor' ),
1188 1140 'type' => Controls_Manager::CHOOSE,
1189 1141 'options' => [
1190 - 'start' => [
1191 - 'title' => esc_html__( 'Start', 'elementor' ),
1142 + 'left' => [
1143 + 'title' => esc_html__( 'Left', 'elementor' ),
1192 1144 'icon' => 'eicon-text-align-left',
1193 1145 ],
1194 1146 'center' => [
1195 1147 'title' => esc_html__( 'Center', 'elementor' ),
@@ -1194,10 +1146,10 @@
1194 1146 'center' => [
1195 1147 'title' => esc_html__( 'Center', 'elementor' ),
1196 1148 'icon' => 'eicon-text-align-center',
1197 1149 ],
1198 - 'end' => [
1199 - 'title' => esc_html__( 'End', 'elementor' ),
1150 + 'right' => [
1151 + 'title' => esc_html__( 'Right', 'elementor' ),
1200 1152 'icon' => 'eicon-text-align-right',
1201 1153 ],
1202 1154 'justify' => [
1203 1155 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -1203,13 +1155,8 @@
1203 1155 'title' => esc_html__( 'Justified', 'elementor' ),
1204 1156 'icon' => 'eicon-text-align-justify',
1205 1157 ],
1206 1158 ],
1207 - 'classes' => 'elementor-control-start-end',
1208 - 'selectors_dictionary' => [
1209 - 'left' => is_rtl() ? 'end' : 'start',
1210 - 'right' => is_rtl() ? 'start' : 'end',
1211 - ],
1212 1159 'selectors' => [
1213 1160 '{{WRAPPER}} > .elementor-container' => 'text-align: {{VALUE}};',
1214 1161 ],
1215 1162 ]
@@ -1216,9 +1163,9 @@
1216 1163 );
1217 1164
1218 1165 $this->end_controls_section();
1219 1166
1220 - // Section Advanced.
1167 + // Section Advanced
1221 1168 $this->start_controls_section(
1222 1169 'section_advanced',
1223 1170 [
1224 1171 'label' => esc_html__( 'Advanced', 'elementor' ),
@@ -1363,9 +1310,9 @@
1363 1310 );
1364 1311
1365 1312 $this->end_controls_section();
1366 1313
1367 - // Section Responsive.
1314 + // Section Responsive
1368 1315 $this->start_controls_section(
1369 1316 '_section_responsive',
1370 1317 [
1371 1318 'label' => esc_html__( 'Responsive', 'elementor' ),
@@ -1438,14 +1385,9 @@
1438 1385 if ( ! settings.background_play_once ) {
1439 1386 videoAttributes += ' loop';
1440 1387 }
1441 1388
1442 - view.addRenderAttribute(
1443 - 'background-video-container',
1444 - {
1445 - 'class': 'elementor-background-video-container',
1446 - }
1447 - );
1389 + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-background-video-container' );
1448 1390
1449 1391 if ( ! settings.background_play_on_mobile ) {
1450 1392 view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
1451 1393 }
@@ -1450,15 +1392,15 @@
1450 1392 view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
1451 1393 }
1452 1394 #>
1453 1395 <div {{{ view.getRenderAttributeString( 'background-video-container' ) }}}>
1454 - <div class="elementor-background-video-embed" role="presentation"></div>
1455 - <video class="elementor-background-video-hosted" role="presentation" {{ videoAttributes }}></video>
1396 + <div class="elementor-background-video-embed"></div>
1397 + <video class="elementor-background-video-hosted elementor-html5-video" {{ videoAttributes }}></video>
1456 1398 </div>
1457 1399 <# } #>
1458 1400 <div class="elementor-background-overlay"></div>
1459 - <div class="elementor-shape elementor-shape-top" aria-hidden="true"></div>
1460 - <div class="elementor-shape elementor-shape-bottom" aria-hidden="true"></div>
1401 + <div class="elementor-shape elementor-shape-top"></div>
1402 + <div class="elementor-shape elementor-shape-bottom"></div>
1461 1403 <div class="elementor-container elementor-column-gap-{{ settings.gap }}"></div>
1462 1404 <?php
1463 1405 }
1464 1406
@@ -1479,24 +1421,19 @@
1479 1421 ?> <?php $this->print_render_attribute_string( '_wrapper' ); ?>>
1480 1422 <?php
1481 1423 if ( 'video' === $settings['background_background'] ) :
1482 1424 if ( $settings['background_video_link'] ) :
1483 - $is_embed_video = Embed::is_embed_video( $settings['background_video_link'] );
1425 + $video_properties = Embed::get_video_properties( $settings['background_video_link'] );
1484 1426
1485 - $this->add_render_attribute(
1486 - 'background-video-container',
1487 - [
1488 - 'class' => 'elementor-background-video-container',
1489 - ]
1490 - );
1427 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-background-video-container' );
1491 1428
1492 1429 if ( ! $settings['background_play_on_mobile'] ) {
1493 - $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
1430 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-phone' );
1494 1431 }
1495 1432 ?>
1496 1433 <div <?php $this->print_render_attribute_string( 'background-video-container' ); ?>>
1497 - <?php if ( $is_embed_video ) : ?>
1498 - <div class="elementor-background-video-embed" role="presentation"></div>
1434 + <?php if ( $video_properties ) : ?>
1435 + <div class="elementor-background-video-embed"></div>
1499 1436 <?php
1500 1437 else :
1501 1438 $video_tag_attributes = 'autoplay muted playsinline';
1502 1439 if ( 'yes' !== $settings['background_play_once'] ) :
@@ -1502,9 +1439,9 @@
1502 1439 if ( 'yes' !== $settings['background_play_once'] ) :
1503 1440 $video_tag_attributes .= ' loop';
1504 1441 endif;
1505 1442 ?>
1506 - <video class="elementor-background-video-hosted" role="presentation" <?php
1443 + <video class="elementor-background-video-hosted elementor-html5-video" <?php
1507 1444 // PHPCS - the variable $video_tag_attributes is a plain string.
1508 1445 echo $video_tag_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1509 1446 ?>></video>
1510 1447 <?php endif; ?>
@@ -1512,14 +1449,11 @@
1512 1449 <?php
1513 1450 endif;
1514 1451 endif;
1515 1452
1516 - $overlay_background = $settings['background_overlay_background'] ?? '';
1517 - $overlay_hover_background = $settings['background_overlay_hover_background'] ?? '';
1453 + $has_background_overlay = in_array( $settings['background_overlay_background'], [ 'classic', 'gradient' ], true ) ||
1454 + in_array( $settings['background_overlay_hover_background'], [ 'classic', 'gradient' ], true );
1518 1455
1519 - $has_background_overlay = in_array( $overlay_background, [ 'classic', 'gradient' ], true ) ||
1520 - in_array( $overlay_hover_background, [ 'classic', 'gradient' ], true );
1521 -
1522 1456 if ( $has_background_overlay ) :
1523 1457 ?>
1524 1458 <div class="elementor-background-overlay"></div>
1525 1459 <?php
@@ -1632,9 +1566,9 @@
1632 1566 return;
1633 1567 }
1634 1568
1635 1569 ?>
1636 - <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" aria-hidden="true" data-negative="<?php
1570 + <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" data-negative="<?php
1637 1571 Utils::print_unescaped_internal_string( $negative ? 'true' : 'false' );
1638 1572 ?>">
1639 1573 <?php
1640 1574 // PHPCS - The file content is being read from a strict file path structure.