PluginProbe
Elementor Website Builder – more than just a page builder / 3.19.4
Elementor Website Builder – more than just a page builder v3.19.4
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 +56 -124 4.2.23.19.4 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' ),
@@ -273,8 +269,9 @@
273 269 ],
274 270 'condition' => [
275 271 'layout' => [ 'boxed' ],
276 272 ],
273 + 'separator' => 'none',
277 274 ]
278 275 );
279 276
280 277 $this->add_control(
@@ -436,9 +433,9 @@
436 433 ],
437 434 'selectors' => [
438 435 '{{WRAPPER}} > .elementor-container > .elementor-column > .elementor-widget-wrap' => 'align-content: {{VALUE}}; align-items: {{VALUE}};',
439 436 ],
440 - // TODO: The following line is for BC since 2.7.0.
437 + // TODO: The following line is for BC since 2.7.0
441 438 'prefix_class' => 'elementor-section-content-',
442 439 ]
443 440 );
444 441
@@ -466,13 +463,9 @@
466 463 'default' => '',
467 464 'return_value' => 'section-stretched',
468 465 'prefix_class' => 'elementor-',
469 466 'hide_in_inner' => true,
470 - 'description' => sprintf(
471 - '%1$s <a href="https://go.elementor.com/stretch-section/" target="_blank">%2$s</a>',
472 - esc_html__( 'Stretch the section to the full width of the page using JS.', 'elementor' ),
473 - esc_html__( 'Learn more', 'elementor' )
474 - ),
467 + 'description' => esc_html__( 'Stretch the section to the full width of the page using JS.', 'elementor' ) . sprintf( ' <a href="%1$s" target="_blank">%2$s</a>', 'https://go.elementor.com/stretch-section/', esc_html__( 'Learn more.', 'elementor' ) ),
475 468 'render_type' => 'none',
476 469 'frontend_available' => true,
477 470 ]
478 471 );
@@ -503,9 +496,9 @@
503 496 );
504 497
505 498 $this->end_controls_section();
506 499
507 - // Section Structure.
500 + // Section Structure
508 501 $this->start_controls_section(
509 502 'section_structure',
510 503 [
511 504 'label' => esc_html__( 'Structure', 'elementor' ),
@@ -525,9 +518,9 @@
525 518 );
526 519
527 520 $this->end_controls_section();
528 521
529 - // Section background.
522 + // Section background
530 523 $this->start_controls_section(
531 524 'section_background',
532 525 [
533 526 'label' => esc_html__( 'Background', 'elementor' ),
@@ -552,45 +545,14 @@
552 545 'fields_options' => [
553 546 'background' => [
554 547 'frontend_available' => true,
555 548 ],
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 - ],
549 + 'image' => [
550 + 'background_lazyload' => [
551 + 'active' => true,
552 + 'keys' => [ 'background_image', 'url' ],
577 553 ],
578 554 ],
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 555 ],
594 556 ]
595 557 );
596 558
@@ -636,9 +598,9 @@
636 598 $this->end_controls_tabs();
637 599
638 600 $this->end_controls_section();
639 601
640 - // Background Overlay.
602 + // Background Overlay
641 603 $this->start_controls_section(
642 604 'section_background_overlay',
643 605 [
644 606 'label' => esc_html__( 'Background Overlay', 'elementor' ),
@@ -659,8 +621,17 @@
659 621 Group_Control_Background::get_type(),
660 622 [
661 623 'name' => 'background_overlay',
662 624 'selector' => '{{WRAPPER}} > .elementor-background-overlay',
625 + 'fields_options' => [
626 + 'image' => [
627 + 'background_lazyload' => [
628 + 'active' => true,
629 + 'keys' => [ 'background_overlay_image', 'url' ],
630 + 'selector' => '.elementor-background-overlay',
631 + ],
632 + ],
633 + ],
663 634 ]
664 635 );
665 636
666 637 $this->add_responsive_control(
@@ -823,9 +794,9 @@
823 794 $this->end_controls_tabs();
824 795
825 796 $this->end_controls_section();
826 797
827 - // Section border.
798 + // Section border
828 799 $this->start_controls_section(
829 800 'section_border',
830 801 [
831 802 'label' => esc_html__( 'Border', 'elementor' ),
@@ -929,9 +900,9 @@
929 900 'operator' => '!==',
930 901 'value' => '',
931 902 ],
932 903 [
933 - 'name' => 'border_hover_border',
904 + 'name' => 'border_border',
934 905 'operator' => '!==',
935 906 'value' => '',
936 907 ],
937 908 ],
@@ -948,9 +919,9 @@
948 919 $this->end_controls_tabs();
949 920
950 921 $this->end_controls_section();
951 922
952 - // Section Shape Divider.
923 + // Section Shape Divider
953 924 $this->start_controls_section(
954 925 'section_shape_divider',
955 926 [
956 927 'label' => esc_html__( 'Shape Divider', 'elementor' ),
@@ -959,8 +930,16 @@
959 930 );
960 931
961 932 $this->start_controls_tabs( 'tabs_shape_dividers' );
962 933
934 + $shapes_options = [
935 + '' => esc_html__( 'None', 'elementor' ),
936 + ];
937 +
938 + foreach ( Shapes::get_shapes() as $shape_name => $shape_props ) {
939 + $shapes_options[ $shape_name ] = $shape_props['title'];
940 + }
941 +
963 942 foreach ( [
964 943 'top' => esc_html__( 'Top', 'elementor' ),
965 944 'bottom' => esc_html__( 'Bottom', 'elementor' ),
966 945 ] as $side => $side_label ) {
@@ -976,30 +955,12 @@
976 955 $this->add_control(
977 956 $base_control_key,
978 957 [
979 958 'label' => esc_html__( 'Type', 'elementor' ),
980 - 'type' => Controls_Manager::VISUAL_CHOICE,
981 - 'label_block' => true,
982 - 'columns' => 2,
983 - 'options' => Shapes::get_shapes(),
959 + 'type' => Controls_Manager::SELECT,
960 + 'options' => $shapes_options,
984 961 'render_type' => 'none',
985 962 '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 963 ]
1003 964 );
1004 965
1005 966 $this->add_control(
@@ -1018,11 +979,10 @@
1018 979
1019 980 $this->add_responsive_control(
1020 981 $base_control_key . '_width',
1021 982 [
1022 - 'label' => esc_html__( 'Width', 'elementor' ),
983 + 'label' => esc_html__( 'Width', 'elementor' ) . ' (%)',
1023 984 'type' => Controls_Manager::SLIDER,
1024 - 'size_units' => [ '%', 'vw', 'custom' ],
1025 985 'default' => [
1026 986 'unit' => '%',
1027 987 ],
1028 988 'tablet_default' => [
@@ -1035,12 +995,8 @@
1035 995 '%' => [
1036 996 'min' => 100,
1037 997 'max' => 300,
1038 998 ],
1039 - 'vw' => [
1040 - 'min' => 100,
1041 - 'max' => 300,
1042 - ],
1043 999 ],
1044 1000 'condition' => [
1045 1001 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'height_only', Shapes::FILTER_EXCLUDE ) ),
1046 1002 ],
@@ -1054,19 +1010,12 @@
1054 1010 $base_control_key . '_height',
1055 1011 [
1056 1012 'label' => esc_html__( 'Height', 'elementor' ),
1057 1013 'type' => Controls_Manager::SLIDER,
1058 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
1059 1014 'range' => [
1060 1015 'px' => [
1061 1016 'max' => 500,
1062 1017 ],
1063 - 'em' => [
1064 - 'max' => 50,
1065 - ],
1066 - 'rem' => [
1067 - 'max' => 50,
1068 - ],
1069 1018 ],
1070 1019 'condition' => [
1071 1020 "shape_divider_$side!" => '',
1072 1021 ],
@@ -1123,9 +1072,9 @@
1123 1072 $this->end_controls_tabs();
1124 1073
1125 1074 $this->end_controls_section();
1126 1075
1127 - // Section Typography.
1076 + // Section Typography
1128 1077 $this->start_controls_section(
1129 1078 'section_typo',
1130 1079 [
1131 1080 'label' => esc_html__( 'Typography', 'elementor' ),
@@ -1141,8 +1090,9 @@
1141 1090 'default' => '',
1142 1091 'selectors' => [
1143 1092 '{{WRAPPER}} .elementor-heading-title' => 'color: {{VALUE}};',
1144 1093 ],
1094 + 'separator' => 'none',
1145 1095 ]
1146 1096 );
1147 1097
1148 1098 $this->add_control(
@@ -1186,10 +1136,10 @@
1186 1136 [
1187 1137 'label' => esc_html__( 'Text Align', 'elementor' ),
1188 1138 'type' => Controls_Manager::CHOOSE,
1189 1139 'options' => [
1190 - 'start' => [
1191 - 'title' => esc_html__( 'Start', 'elementor' ),
1140 + 'left' => [
1141 + 'title' => esc_html__( 'Left', 'elementor' ),
1192 1142 'icon' => 'eicon-text-align-left',
1193 1143 ],
1194 1144 'center' => [
1195 1145 'title' => esc_html__( 'Center', 'elementor' ),
@@ -1194,10 +1144,10 @@
1194 1144 'center' => [
1195 1145 'title' => esc_html__( 'Center', 'elementor' ),
1196 1146 'icon' => 'eicon-text-align-center',
1197 1147 ],
1198 - 'end' => [
1199 - 'title' => esc_html__( 'End', 'elementor' ),
1148 + 'right' => [
1149 + 'title' => esc_html__( 'Right', 'elementor' ),
1200 1150 'icon' => 'eicon-text-align-right',
1201 1151 ],
1202 1152 'justify' => [
1203 1153 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -1203,13 +1153,8 @@
1203 1153 'title' => esc_html__( 'Justified', 'elementor' ),
1204 1154 'icon' => 'eicon-text-align-justify',
1205 1155 ],
1206 1156 ],
1207 - 'classes' => 'elementor-control-start-end',
1208 - 'selectors_dictionary' => [
1209 - 'left' => is_rtl() ? 'end' : 'start',
1210 - 'right' => is_rtl() ? 'start' : 'end',
1211 - ],
1212 1157 'selectors' => [
1213 1158 '{{WRAPPER}} > .elementor-container' => 'text-align: {{VALUE}};',
1214 1159 ],
1215 1160 ]
@@ -1216,9 +1161,9 @@
1216 1161 );
1217 1162
1218 1163 $this->end_controls_section();
1219 1164
1220 - // Section Advanced.
1165 + // Section Advanced
1221 1166 $this->start_controls_section(
1222 1167 'section_advanced',
1223 1168 [
1224 1169 'label' => esc_html__( 'Advanced', 'elementor' ),
@@ -1363,9 +1308,9 @@
1363 1308 );
1364 1309
1365 1310 $this->end_controls_section();
1366 1311
1367 - // Section Responsive.
1312 + // Section Responsive
1368 1313 $this->start_controls_section(
1369 1314 '_section_responsive',
1370 1315 [
1371 1316 'label' => esc_html__( 'Responsive', 'elementor' ),
@@ -1438,14 +1383,9 @@
1438 1383 if ( ! settings.background_play_once ) {
1439 1384 videoAttributes += ' loop';
1440 1385 }
1441 1386
1442 - view.addRenderAttribute(
1443 - 'background-video-container',
1444 - {
1445 - 'class': 'elementor-background-video-container',
1446 - }
1447 - );
1387 + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-background-video-container' );
1448 1388
1449 1389 if ( ! settings.background_play_on_mobile ) {
1450 1390 view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
1451 1391 }
@@ -1450,15 +1390,15 @@
1450 1390 view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
1451 1391 }
1452 1392 #>
1453 1393 <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>
1394 + <div class="elementor-background-video-embed"></div>
1395 + <video class="elementor-background-video-hosted elementor-html5-video" {{ videoAttributes }}></video>
1456 1396 </div>
1457 1397 <# } #>
1458 1398 <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>
1399 + <div class="elementor-shape elementor-shape-top"></div>
1400 + <div class="elementor-shape elementor-shape-bottom"></div>
1461 1401 <div class="elementor-container elementor-column-gap-{{ settings.gap }}"></div>
1462 1402 <?php
1463 1403 }
1464 1404
@@ -1479,24 +1419,19 @@
1479 1419 ?> <?php $this->print_render_attribute_string( '_wrapper' ); ?>>
1480 1420 <?php
1481 1421 if ( 'video' === $settings['background_background'] ) :
1482 1422 if ( $settings['background_video_link'] ) :
1483 - $is_embed_video = Embed::is_embed_video( $settings['background_video_link'] );
1423 + $video_properties = Embed::get_video_properties( $settings['background_video_link'] );
1484 1424
1485 - $this->add_render_attribute(
1486 - 'background-video-container',
1487 - [
1488 - 'class' => 'elementor-background-video-container',
1489 - ]
1490 - );
1425 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-background-video-container' );
1491 1426
1492 1427 if ( ! $settings['background_play_on_mobile'] ) {
1493 - $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
1428 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-phone' );
1494 1429 }
1495 1430 ?>
1496 1431 <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>
1432 + <?php if ( $video_properties ) : ?>
1433 + <div class="elementor-background-video-embed"></div>
1499 1434 <?php
1500 1435 else :
1501 1436 $video_tag_attributes = 'autoplay muted playsinline';
1502 1437 if ( 'yes' !== $settings['background_play_once'] ) :
@@ -1502,9 +1437,9 @@
1502 1437 if ( 'yes' !== $settings['background_play_once'] ) :
1503 1438 $video_tag_attributes .= ' loop';
1504 1439 endif;
1505 1440 ?>
1506 - <video class="elementor-background-video-hosted" role="presentation" <?php
1441 + <video class="elementor-background-video-hosted elementor-html5-video" <?php
1507 1442 // PHPCS - the variable $video_tag_attributes is a plain string.
1508 1443 echo $video_tag_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1509 1444 ?>></video>
1510 1445 <?php endif; ?>
@@ -1512,14 +1447,11 @@
1512 1447 <?php
1513 1448 endif;
1514 1449 endif;
1515 1450
1516 - $overlay_background = $settings['background_overlay_background'] ?? '';
1517 - $overlay_hover_background = $settings['background_overlay_hover_background'] ?? '';
1451 + $has_background_overlay = in_array( $settings['background_overlay_background'], [ 'classic', 'gradient' ], true ) ||
1452 + in_array( $settings['background_overlay_hover_background'], [ 'classic', 'gradient' ], true );
1518 1453
1519 - $has_background_overlay = in_array( $overlay_background, [ 'classic', 'gradient' ], true ) ||
1520 - in_array( $overlay_hover_background, [ 'classic', 'gradient' ], true );
1521 -
1522 1454 if ( $has_background_overlay ) :
1523 1455 ?>
1524 1456 <div class="elementor-background-overlay"></div>
1525 1457 <?php
@@ -1632,9 +1564,9 @@
1632 1564 return;
1633 1565 }
1634 1566
1635 1567 ?>
1636 - <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" aria-hidden="true" data-negative="<?php
1568 + <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" data-negative="<?php
1637 1569 Utils::print_unescaped_internal_string( $negative ? 'true' : 'false' );
1638 1570 ?>">
1639 1571 <?php
1640 1572 // PHPCS - The file content is being read from a strict file path structure.