PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0-beta1
Elementor Website Builder – more than just a page builder v3.8.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 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 All 457 releases
← All changes | includes/elements/container.php +107 -468 4.2.0-dev2 → 3.8.0-beta1 View file →
@@ -10,9 +10,8 @@
10 10 use Elementor\Group_Control_Box_Shadow;
11 11 use Elementor\Group_Control_Css_Filter;
12 12 use Elementor\Group_Control_Flex_Container;
13 13 use Elementor\Group_Control_Flex_Item;
14 -use Elementor\Group_Control_Grid_Container;
15 14 use Elementor\Plugin;
16 15 use Elementor\Shapes;
17 16 use Elementor\Utils;
18 17
@@ -26,12 +25,8 @@
26 25 * @var \Elementor\Core\Kits\Documents\Kit
27 26 */
28 27 private $active_kit;
29 28
30 - protected function is_dynamic_content(): bool {
31 - return false;
32 - }
33 -
34 29 /**
35 30 * Container constructor.
36 31 *
37 32 * @param array $data
@@ -38,9 +33,9 @@
38 33 * @param array|null $args
39 34 *
40 35 * @return void
41 36 */
42 - public function __construct( array $data = [], ?array $args = null ) {
37 + public function __construct( array $data = [], array $args = null ) {
43 38 parent::__construct( $data, $args );
44 39
45 40 $this->active_kit = Plugin::$instance->kits_manager->get_active_kit();
46 41 }
@@ -80,37 +75,8 @@
80 75 public function get_icon() {
81 76 return 'eicon-container';
82 77 }
83 78
84 - public function get_keywords() {
85 - return [ 'Container', 'Flex', 'Flexbox', 'Flexbox Container', 'Grid', 'Grid Container', 'CSS Grid', 'Layout' ];
86 - }
87 -
88 - public function get_panel_presets() {
89 - return [
90 - 'container_grid' => [
91 - 'replacements' => [
92 - 'name' => 'container_grid',
93 - 'controls' => [
94 - 'container_type' => [ 'default' => 'grid' ],
95 - ],
96 - 'title' => esc_html__( 'Grid', 'elementor' ),
97 - 'icon' => 'eicon-container-grid',
98 - 'custom' => [
99 - 'isPreset' => true,
100 - 'originalWidget' => $this->get_name(),
101 - 'presetWidget' => 'container_grid',
102 - 'preset_settings' => [
103 - 'container_type' => 'grid',
104 - 'presetTitle' => esc_html__( 'Grid', 'elementor' ),
105 - 'presetIcon' => 'eicon-container-grid',
106 - ],
107 - ],
108 - ],
109 - ],
110 - ];
111 - }
112 -
113 79 /**
114 80 * Override the render attributes to add a custom wrapper class.
115 81 *
116 82 * @return void
@@ -117,14 +83,11 @@
117 83 */
118 84 protected function add_render_attributes() {
119 85 parent::add_render_attributes();
120 86
121 - $is_nested_class_name = $this->get_data( 'isInner' ) ? 'e-child' : 'e-parent';
122 -
123 87 $this->add_render_attribute( '_wrapper', [
124 88 'class' => [
125 - 'e-con',
126 - $is_nested_class_name,
89 + 'e-container',
127 90 ],
128 91 ] );
129 92 }
130 93
@@ -139,9 +102,8 @@
139 102 $config['controls'] = $this->get_controls();
140 103 $config['tabs_controls'] = $this->get_tabs_controls();
141 104 $config['show_in_panel'] = true;
142 105 $config['categories'] = [ 'layout' ];
143 - $config['include_in_widgets_config'] = true;
144 106
145 107 return $config;
146 108 }
147 109
@@ -152,9 +114,9 @@
152 114 */
153 115 protected function content_template() {
154 116 ?>
155 117 <# if ( 'boxed' === settings.content_width ) { #>
156 - <div class="e-con-inner">
118 + <div class="e-container__inner">
157 119 <#
158 120 }
159 121 if ( settings.background_video_link ) {
160 122 let videoAttributes = 'autoplay muted playsinline';
@@ -162,26 +124,21 @@
162 124 if ( ! settings.background_play_once ) {
163 125 videoAttributes += ' loop';
164 126 }
165 127
166 - view.addRenderAttribute(
167 - 'background-video-container',
168 - {
169 - 'class': 'elementor-background-video-container',
170 - }
171 - );
128 + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-background-video-container' );
172 129
173 130 if ( ! settings.background_play_on_mobile ) {
174 - view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
131 + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-phone' );
175 132 }
176 133 #>
177 134 <div {{{ view.getRenderAttributeString( 'background-video-container' ) }}}>
178 - <div class="elementor-background-video-embed" role="presentation"></div>
179 - <video class="elementor-background-video-hosted" role="presentation" {{ videoAttributes }}></video>
135 + <div class="elementor-background-video-embed"></div>
136 + <video class="elementor-background-video-hosted elementor-html5-video" {{ videoAttributes }}></video>
180 137 </div>
181 138 <# } #>
182 - <div class="elementor-shape elementor-shape-top" aria-hidden="true"></div>
183 - <div class="elementor-shape elementor-shape-bottom" aria-hidden="true"></div>
139 + <div class="elementor-shape elementor-shape-top"></div>
140 + <div class="elementor-shape elementor-shape-bottom"></div>
184 141 <# if ( 'boxed' === settings.content_width ) { #>
185 142 </div>
186 143 <# } #>
187 144 <?php
@@ -191,9 +148,9 @@
191 148 * Render the video background markup.
192 149 *
193 150 * @return void
194 151 */
195 - protected function render_video_background() {
152 + private function render_video_background() {
196 153 $settings = $this->get_settings_for_display();
197 154
198 155 if ( 'video' !== $settings['background_background'] ) {
199 156 return;
@@ -202,24 +159,19 @@
202 159 if ( ! $settings['background_video_link'] ) {
203 160 return;
204 161 }
205 162
206 - $is_embed_video = Embed::is_embed_video( $settings['background_video_link'] );
163 + $video_properties = Embed::get_video_properties( $settings['background_video_link'] );
207 164
208 - $this->add_render_attribute(
209 - 'background-video-container',
210 - [
211 - 'class' => 'elementor-background-video-container',
212 - ]
213 - );
165 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-background-video-container' );
214 166
215 167 if ( ! $settings['background_play_on_mobile'] ) {
216 - $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
168 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-phone' );
217 169 }
218 170
219 171 ?><div <?php $this->print_render_attribute_string( 'background-video-container' ); ?>>
220 - <?php if ( $is_embed_video ) : ?>
221 - <div class="elementor-background-video-embed" role="presentation"></div>
172 + <?php if ( $video_properties ) : ?>
173 + <div class="elementor-background-video-embed"></div>
222 174 <?php
223 175 else :
224 176 $video_tag_attributes = 'autoplay muted playsinline';
225 177
@@ -226,9 +178,9 @@
226 178 if ( 'yes' !== $settings['background_play_once'] ) {
227 179 $video_tag_attributes .= ' loop';
228 180 }
229 181 ?>
230 - <video class="elementor-background-video-hosted" role="presentation" <?php echo esc_attr( $video_tag_attributes ); ?>></video>
182 + <video class="elementor-background-video-hosted elementor-html5-video" <?php echo esc_attr( $video_tag_attributes ); ?>></video>
231 183 <?php endif; ?>
232 184 </div><?php
233 185 }
234 186
@@ -241,9 +193,9 @@
241 193 * @param string $side - Shape divider side, used to set the shape key.
242 194 *
243 195 * @return void
244 196 */
245 - protected function render_shape_divider( $side ) {
197 + private function render_shape_divider( $side ) {
246 198 $settings = $this->get_active_settings();
247 199 $base_setting_key = "shape_divider_$side";
248 200 $negative = ! empty( $settings[ $base_setting_key . '_negative' ] );
249 201 $shape_path = Shapes::get_shape_path( $settings[ $base_setting_key ], $negative );
@@ -251,9 +203,9 @@
251 203 if ( ! is_file( $shape_path ) || ! is_readable( $shape_path ) ) {
252 204 return;
253 205 }
254 206 ?>
255 - <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" aria-hidden="true" data-negative="<?php
207 + <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" data-negative="<?php
256 208 Utils::print_unescaped_internal_string( $negative ? 'true' : 'false' );
257 209 ?>">
258 210 <?php
259 211 // PHPCS - The file content is being read from a strict file path structure.
@@ -267,9 +219,9 @@
267 219 * Print safe HTML tag for the element based on the element settings.
268 220 *
269 221 * @return void
270 222 */
271 - protected function print_html_tag() {
223 + private function print_html_tag() {
272 224 $html_tag = $this->get_settings( 'html_tag' );
273 225
274 226 if ( empty( $html_tag ) ) {
275 227 $html_tag = 'div';
@@ -293,9 +245,9 @@
293 245
294 246 ?><<?php $this->print_html_tag(); ?> <?php $this->print_render_attribute_string( '_wrapper' ); ?>>
295 247 <?php
296 248 if ( $this->is_boxed_container( $settings ) ) { ?>
297 - <div class="e-con-inner">
249 + <div class="e-container__inner">
298 250 <?php }
299 251
300 252 $this->render_video_background();
301 253
@@ -321,9 +273,9 @@
321 273 </<?php $this->print_html_tag(); ?>>
322 274 <?php
323 275 }
324 276
325 - protected function is_boxed_container( array $settings ) {
277 + private function is_boxed_container( array $settings ) {
326 278 return ! empty( $settings['content_width'] ) && 'boxed' === $settings['content_width'];
327 279 }
328 280
329 281 /**
@@ -333,18 +285,12 @@
333 285 *
334 286 * @return \Elementor\Element_Base|\Elementor\Widget_Base|null
335 287 */
336 288 protected function _get_default_child_type( array $element_data ) {
337 - $el_types = array_keys( Plugin::$instance->elements_manager->get_element_types() );
338 -
339 - if ( in_array( $element_data['elType'], $el_types, true ) ) {
340 - return Plugin::$instance->elements_manager->get_element_types( $element_data['elType'] );
289 + if ( 'container' === $element_data['elType'] ) {
290 + return Plugin::$instance->elements_manager->get_element_types( 'container' );
341 291 }
342 292
343 - if ( ! isset( $element_data['widgetType'] ) ) {
344 - return null;
345 - }
346 -
347 293 return Plugin::$instance->widgets_manager->get_widget_types( $element_data['widgetType'] );
348 294 }
349 295
350 296 /**
@@ -369,27 +315,8 @@
369 315 $min_affected_device = Breakpoints_Manager::BREAKPOINT_KEY_TABLET;
370 316 }
371 317
372 318 $this->add_control(
373 - 'container_type',
374 - [
375 - 'label' => esc_html__( 'Container Layout', 'elementor' ),
376 - 'type' => Controls_Manager::SELECT,
377 - 'default' => 'flex',
378 - 'prefix_class' => 'e-',
379 - 'options' => [
380 - 'flex' => esc_html__( 'Flexbox', 'elementor' ),
381 - 'grid' => esc_html__( 'Grid', 'elementor' ),
382 - ],
383 - 'selectors' => [
384 - '{{WRAPPER}}' => '--display: {{VALUE}}',
385 - ],
386 - 'separator' => 'after',
387 - 'editor_available' => true,
388 - ]
389 - );
390 -
391 - $this->add_control(
392 319 'content_width',
393 320 [
394 321 'label' => esc_html__( 'Content Width', 'elementor' ),
395 322 'type' => Controls_Manager::SELECT,
@@ -398,10 +325,10 @@
398 325 'boxed' => esc_html__( 'Boxed', 'elementor' ),
399 326 'full' => esc_html__( 'Full Width', 'elementor' ),
400 327 ],
401 328 'render_type' => 'template',
402 - 'prefix_class' => 'e-con-',
403 - 'editor_available' => true,
329 + 'prefix_class' => 'e-container--width-',
330 + 'frontend_available' => true,
404 331 ]
405 332 );
406 333
407 334 $width_control_settings = [
@@ -406,14 +333,22 @@
406 333
407 334 $width_control_settings = [
408 335 'label' => esc_html__( 'Width', 'elementor' ),
409 336 'type' => Controls_Manager::SLIDER,
410 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
337 + 'size_units' => [ 'px', '%', 'vw' ],
411 338 'range' => [
412 339 'px' => [
413 340 'min' => 500,
414 341 'max' => 1600,
415 342 ],
343 + '%' => [
344 + 'min' => 0,
345 + 'max' => 100,
346 + ],
347 + 'vw' => [
348 + 'min' => 0,
349 + 'max' => 100,
350 + ],
416 351 ],
417 352 'default' => [
418 353 'unit' => '%',
419 354 ],
@@ -423,8 +358,9 @@
423 358 Breakpoints_Manager::BREAKPOINT_KEY_TABLET_EXTRA => $min_affected_device,
424 359 Breakpoints_Manager::BREAKPOINT_KEY_TABLET => $min_affected_device,
425 360 Breakpoints_Manager::BREAKPOINT_KEY_MOBILE_EXTRA => $min_affected_device,
426 361 ],
362 + 'separator' => 'none',
427 363 ];
428 364
429 365 $this->add_responsive_control(
430 366 'width',
@@ -485,16 +421,20 @@
485 421 'min_height',
486 422 [
487 423 'label' => esc_html__( 'Min Height', 'elementor' ),
488 424 'type' => Controls_Manager::SLIDER,
489 - 'size_units' => [ 'px', 'em', 'rem', 'vh', 'custom' ],
425 + 'size_units' => [ 'px', 'vh' ],
490 426 'range' => [
491 427 'px' => [
428 + 'min' => 0,
492 429 'max' => 1440,
493 430 ],
431 + 'vh' => [
432 + 'min' => 0,
433 + 'max' => 100,
434 + ],
494 435 ],
495 436 'description' => sprintf(
496 - /* translators: %s: 100vh. */
497 437 esc_html__( 'To achieve full height Container use %s.', 'elementor' ),
498 438 '100vh'
499 439 ),
500 440 'selectors' => [
@@ -509,9 +449,9 @@
509 449 'name' => 'flex',
510 450 'selector' => '{{WRAPPER}}',
511 451 'fields_options' => [
512 452 'gap' => [
513 - 'label' => esc_html__( 'Gaps', 'elementor' ),
453 + 'label' => esc_html_x( 'Gap between elements', 'Flex Container Control', 'elementor' ),
514 454 'device_args' => [
515 455 Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP => [
516 456 // Use the default gap from the kit as a placeholder.
517 457 'placeholder' => $this->active_kit->get_settings_for_display( 'space_between_widgets' ),
@@ -518,25 +458,11 @@
518 458 ],
519 459 ],
520 460 ],
521 461 ],
522 - 'condition' => [
523 - 'container_type' => [ 'flex' ],
524 - ],
525 462 ]
526 463 );
527 464
528 - $this->add_group_control(
529 - Group_Control_Grid_Container::get_type(),
530 - [
531 - 'name' => 'grid',
532 - 'selector' => '{{WRAPPER}}',
533 - 'condition' => [
534 - 'container_type' => [ 'grid' ],
535 - ],
536 - ]
537 - );
538 -
539 465 $this->end_controls_section();
540 466 }
541 467
542 468 /**
@@ -597,11 +523,11 @@
597 523
598 524 $this->add_control(
599 525 'link_note',
600 526 [
601 - 'type' => Controls_Manager::ALERT,
602 - 'alert_type' => 'warning',
603 - 'content' => esc_html__( 'Don’t add links to elements nested in this container - it will break the layout.', 'elementor' ),
527 + 'type' => Controls_Manager::RAW_HTML,
528 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
529 + 'raw' => esc_html__( 'Don’t add links to elements nested in this container - it will break the layout.', 'elementor' ),
604 530 'condition' => [
605 531 'html_tag' => 'a',
606 532 ],
607 533 ]
@@ -614,8 +540,9 @@
614 540 'type' => Controls_Manager::URL,
615 541 'dynamic' => [
616 542 'active' => true,
617 543 ],
544 + 'placeholder' => esc_html__( 'https://your-link.com', 'elementor' ),
618 545 'condition' => [
619 546 'html_tag' => 'a',
620 547 ],
621 548 ]
@@ -673,45 +600,8 @@
673 600 ],
674 601 ]
675 602 );
676 603
677 - $this->add_control(
678 - 'handle_slideshow_asset_loading',
679 - [
680 - 'type' => Controls_Manager::HIDDEN,
681 - 'assets' => [
682 - 'styles' => [
683 - [
684 - 'name' => 'e-swiper',
685 - 'conditions' => [
686 - 'terms' => [
687 - [
688 - 'name' => 'background_background',
689 - 'operator' => '===',
690 - 'value' => 'slideshow',
691 - ],
692 - ],
693 - ],
694 - ],
695 - ],
696 - 'scripts' => [
697 - [
698 - 'name' => 'swiper',
699 - 'conditions' => [
700 - 'terms' => [
701 - [
702 - 'name' => 'background_background',
703 - 'operator' => '===',
704 - 'value' => 'slideshow',
705 - ],
706 - ],
707 - ],
708 - ],
709 - ],
710 - ],
711 - ]
712 - );
713 -
714 604 $this->end_controls_tab();
715 605
716 606 /**
717 607 * Hover.
@@ -733,9 +623,9 @@
733 623
734 624 $this->add_control(
735 625 'background_hover_transition',
736 626 [
737 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
627 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
738 628 'type' => Controls_Manager::SLIDER,
739 629 'default' => [
740 630 'size' => 0.3,
741 631 ],
@@ -740,9 +630,8 @@
740 630 'size' => 0.3,
741 631 ],
742 632 'range' => [
743 633 'px' => [
744 - 'min' => 0,
745 634 'max' => 3,
746 635 'step' => 0.1,
747 636 ],
748 637 ],
@@ -747,14 +636,8 @@
747 636 ],
748 637 ],
749 638 'render_type' => 'ui',
750 639 'separator' => 'before',
751 - 'condition' => [
752 - 'background_hover_background' => [ 'classic', 'gradient' ],
753 - ],
754 - 'selectors' => [
755 - '{{WRAPPER}}' => '--background-transition: {{SIZE}}s;',
756 - ],
757 640 ]
758 641 );
759 642
760 643 $this->end_controls_tab();
@@ -789,20 +672,18 @@
789 672 'label' => esc_html__( 'Normal', 'elementor' ),
790 673 ]
791 674 );
792 675
793 - $background_overlay_selector = '{{WRAPPER}}::before, {{WRAPPER}} > .elementor-background-video-container::before, {{WRAPPER}} > .e-con-inner > .elementor-background-video-container::before, {{WRAPPER}} > .elementor-background-slideshow::before, {{WRAPPER}} > .e-con-inner > .elementor-background-slideshow::before, {{WRAPPER}} > .elementor-motion-effects-container > .elementor-motion-effects-layer::before';
794 -
795 676 $this->add_group_control(
796 677 Group_Control_Background::get_type(),
797 678 [
798 679 'name' => 'background_overlay',
799 - 'selector' => $background_overlay_selector,
680 + 'selector' => '{{WRAPPER}}::before',
800 681 'fields_options' => [
801 682 'background' => [
802 683 'selectors' => [
803 684 // Hack to set the `::before` content in order to render it only when there is a background overlay.
804 - $background_overlay_selector => '--background-overlay: \'\';',
685 + '{{WRAPPER}}::before' => '--background-overlay: \'\';',
805 686 ],
806 687 ],
807 688 ],
808 689 ]
@@ -807,9 +688,9 @@
807 688 ],
808 689 ]
809 690 );
810 691
811 - $this->add_responsive_control(
692 + $this->add_control(
812 693 'background_overlay_opacity',
813 694 [
814 695 'label' => esc_html__( 'Opacity', 'elementor' ),
815 696 'type' => Controls_Manager::SLIDER,
@@ -903,20 +784,18 @@
903 784 'label' => esc_html__( 'Hover', 'elementor' ),
904 785 ]
905 786 );
906 787
907 - $background_overlay_hover_selector = '{{WRAPPER}}:hover::before, {{WRAPPER}}:hover > .elementor-background-video-container::before, {{WRAPPER}}:hover > .e-con-inner > .elementor-background-video-container::before, {{WRAPPER}} > .elementor-background-slideshow:hover::before, {{WRAPPER}} > .e-con-inner > .elementor-background-slideshow:hover::before';
908 -
909 788 $this->add_group_control(
910 789 Group_Control_Background::get_type(),
911 790 [
912 791 'name' => 'background_overlay_hover',
913 - 'selector' => $background_overlay_hover_selector,
792 + 'selector' => '{{WRAPPER}}:hover::before',
914 793 'fields_options' => [
915 794 'background' => [
916 795 'selectors' => [
917 796 // Hack to set the `::before` content in order to render it only when there is a background overlay.
918 - $background_overlay_hover_selector => '--background-overlay: \'\';',
797 + '{{WRAPPER}}:hover::before' => '--background-overlay: \'\';',
919 798 ],
920 799 ],
921 800 ],
922 801 ]
@@ -921,9 +800,9 @@
921 800 ],
922 801 ]
923 802 );
924 803
925 - $this->add_responsive_control(
804 + $this->add_control(
926 805 'background_overlay_hover_opacity',
927 806 [
928 807 'label' => esc_html__( 'Opacity', 'elementor' ),
929 808 'type' => Controls_Manager::SLIDER,
@@ -944,16 +823,23 @@
944 823 ],
945 824 ]
946 825 );
947 826
827 + $this->add_group_control(
828 + Group_Control_Css_Filter::get_type(),
829 + [
830 + 'name' => 'css_filters_hover',
831 + 'selector' => '{{WRAPPER}}:hover::before',
832 + ]
833 + );
834 +
948 835 $this->add_control(
949 836 'background_overlay_hover_transition',
950 837 [
951 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
838 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
952 839 'type' => Controls_Manager::SLIDER,
953 840 'range' => [
954 841 'px' => [
955 - 'min' => 0,
956 842 'max' => 3,
957 843 'step' => 0.1,
958 844 ],
959 845 ],
@@ -958,25 +844,14 @@
958 844 ],
959 845 ],
960 846 'render_type' => 'ui',
961 847 'separator' => 'before',
962 - 'condition' => [
963 - 'background_overlay_hover_background' => [ 'classic', 'gradient' ],
964 - ],
965 848 'selectors' => [
966 - '{{WRAPPER}}, {{WRAPPER}}::before' => '--overlay-transition: {{SIZE}}s;',
849 + '{{WRAPPER}}' => '--overlay-transition: {{SIZE}}s;',
967 850 ],
968 851 ]
969 852 );
970 853
971 - $this->add_group_control(
972 - Group_Control_Css_Filter::get_type(),
973 - [
974 - 'name' => 'css_filters_hover',
975 - 'selector' => '{{WRAPPER}}:hover::before',
976 - ]
977 - );
978 -
979 854 $this->end_controls_tab();
980 855
981 856 $this->end_controls_tabs();
982 857
@@ -1012,26 +887,8 @@
1012 887 $this->add_group_control(
1013 888 Group_Control_Border::get_type(),
1014 889 [
1015 890 'name' => 'border',
1016 - 'selector' => '{{WRAPPER}}',
1017 - 'fields_options' => [
1018 - 'width' => [
1019 - 'selectors' => [
1020 - '{{SELECTOR}}' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; --border-top-width: {{TOP}}{{UNIT}}; --border-right-width: {{RIGHT}}{{UNIT}}; --border-bottom-width: {{BOTTOM}}{{UNIT}}; --border-left-width: {{LEFT}}{{UNIT}};',
1021 - ],
1022 - ],
1023 - 'color' => [
1024 - 'selectors' => [
1025 - '{{SELECTOR}}' => 'border-color: {{VALUE}}; --border-color: {{VALUE}};',
1026 - ],
1027 - ],
1028 - 'border' => [
1029 - 'selectors' => [
1030 - '{{SELECTOR}}' => 'border-style: {{VALUE}}; --border-style: {{VALUE}};',
1031 - ],
1032 - ],
1033 - ],
1034 891 ]
1035 892 );
1036 893
1037 894 $this->add_responsive_control(
@@ -1038,9 +895,9 @@
1038 895 'border_radius',
1039 896 [
1040 897 'label' => esc_html__( 'Border Radius', 'elementor' ),
1041 898 'type' => Controls_Manager::DIMENSIONS,
1042 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
899 + 'size_units' => [ 'px', '%', 'em' ],
1043 900 'selectors' => [
1044 901 '{{WRAPPER}}' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1045 902 ],
1046 903 ]
@@ -1069,20 +926,8 @@
1069 926 Group_Control_Border::get_type(),
1070 927 [
1071 928 'name' => 'border_hover',
1072 929 'selector' => '{{WRAPPER}}:hover',
1073 - 'fields_options' => [
1074 - 'width' => [
1075 - 'selectors' => [
1076 - '{{SELECTOR}}' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; --border-top-width: {{TOP}}{{UNIT}}; --border-right-width: {{RIGHT}}{{UNIT}}; --border-bottom-width: {{BOTTOM}}{{UNIT}}; --border-left-width: {{LEFT}}{{UNIT}};',
1077 - ],
1078 - ],
1079 - 'color' => [
1080 - 'selectors' => [
1081 - '{{SELECTOR}}' => 'border-color: {{VALUE}}; --border-color: {{VALUE}};',
1082 - ],
1083 - ],
1084 - ],
1085 930 ]
1086 931 );
1087 932
1088 933 $this->add_responsive_control(
@@ -1089,11 +934,11 @@
1089 934 'border_radius_hover',
1090 935 [
1091 936 'label' => esc_html__( 'Border Radius', 'elementor' ),
1092 937 'type' => Controls_Manager::DIMENSIONS,
1093 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
938 + 'size_units' => [ 'px', '%', 'em' ],
1094 939 'selectors' => [
1095 - '{{WRAPPER}}:hover' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; --border-top-left-radius: {{TOP}}{{UNIT}}; --border-top-right-radius: {{RIGHT}}{{UNIT}}; --border-bottom-right-radius: {{BOTTOM}}{{UNIT}}; --border-bottom-left-radius: {{LEFT}}{{UNIT}};',
940 + '{{WRAPPER}}:hover' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1096 941 ],
1097 942 ]
1098 943 );
1099 944
@@ -1107,9 +952,9 @@
1107 952
1108 953 $this->add_control(
1109 954 'border_hover_transition',
1110 955 [
1111 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
956 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
1112 957 'type' => Controls_Manager::SLIDER,
1113 958 'separator' => 'before',
1114 959 'default' => [
1115 960 'size' => 0.3,
@@ -1115,9 +960,8 @@
1115 960 'size' => 0.3,
1116 961 ],
1117 962 'range' => [
1118 963 'px' => [
1119 - 'min' => 0,
1120 964 'max' => 3,
1121 965 'step' => 0.1,
1122 966 ],
1123 967 ],
@@ -1124,36 +968,22 @@
1124 968 'conditions' => [
1125 969 'relation' => 'or',
1126 970 'terms' => [
1127 971 [
1128 - 'name' => 'border_hover_border',
972 + 'name' => 'background_background',
1129 973 'operator' => '!==',
1130 974 'value' => '',
1131 975 ],
1132 976 [
1133 - 'name' => 'border_radius_hover[top]',
977 + 'name' => 'border_border',
1134 978 'operator' => '!==',
1135 979 'value' => '',
1136 980 ],
1137 - [
1138 - 'name' => 'border_radius_hover[right]',
1139 - 'operator' => '!==',
1140 - 'value' => '',
1141 - ],
1142 - [
1143 - 'name' => 'border_radius_hover[bottom]',
1144 - 'operator' => '!==',
1145 - 'value' => '',
1146 - ],
1147 - [
1148 - 'name' => 'border_radius_hover[left]',
1149 - 'operator' => '!==',
1150 - 'value' => '',
1151 - ],
1152 981 ],
1153 982 ],
1154 983 'selectors' => [
1155 - '{{WRAPPER}}, {{WRAPPER}}::before' => '--border-transition: {{SIZE}}s;',
984 + '{{WRAPPER}}' => '--transition: background {{background_hover_transition.SIZE}}s, border {{SIZE}}s, border-radius {{SIZE}}s, box-shadow {{SIZE}}s;
985 + --overlay-transition: background {{background_overlay_hover_transition.SIZE}}s, border-radius {{SIZE}}s, opacity {{background_overlay_hover_transition.SIZE}}s',
1156 986 ],
1157 987 ]
1158 988 );
1159 989
@@ -1180,8 +1010,16 @@
1180 1010 );
1181 1011
1182 1012 $this->start_controls_tabs( 'tabs_shape_dividers' );
1183 1013
1014 + $shapes_options = [
1015 + '' => esc_html__( 'None', 'elementor' ),
1016 + ];
1017 +
1018 + foreach ( Shapes::get_shapes() as $shape_name => $shape_props ) {
1019 + $shapes_options[ $shape_name ] = $shape_props['title'];
1020 + }
1021 +
1184 1022 foreach ( [
1185 1023 'top' => esc_html__( 'Top', 'elementor' ),
1186 1024 'bottom' => esc_html__( 'Bottom', 'elementor' ),
1187 1025 ] as $side => $side_label ) {
@@ -1197,30 +1035,12 @@
1197 1035 $this->add_control(
1198 1036 $base_control_key,
1199 1037 [
1200 1038 'label' => esc_html__( 'Type', 'elementor' ),
1201 - 'type' => Controls_Manager::VISUAL_CHOICE,
1202 - 'label_block' => true,
1203 - 'columns' => 2,
1204 - 'options' => Shapes::get_shapes(),
1039 + 'type' => Controls_Manager::SELECT,
1040 + 'options' => $shapes_options,
1205 1041 'render_type' => 'none',
1206 1042 'frontend_available' => true,
1207 - 'assets' => [
1208 - 'styles' => [
1209 - [
1210 - 'name' => 'e-shapes',
1211 - 'conditions' => [
1212 - 'terms' => [
1213 - [
1214 - 'name' => $base_control_key,
1215 - 'operator' => '!==',
1216 - 'value' => '',
1217 - ],
1218 - ],
1219 - ],
1220 - ],
1221 - ],
1222 - ],
1223 1043 ]
1224 1044 );
1225 1045
1226 1046 $this->add_control(
@@ -1231,9 +1051,9 @@
1231 1051 'condition' => [
1232 1052 "shape_divider_$side!" => '',
1233 1053 ],
1234 1054 'selectors' => [
1235 - "{{WRAPPER}} > .elementor-shape-$side .elementor-shape-fill, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side .elementor-shape-fill" => 'fill: {{UNIT}};',
1055 + "{{WRAPPER}} > .elementor-shape-$side .elementor-shape-fill, {{WRAPPER}} > .e-container__inner > .elementor-shape-$side .elementor-shape-fill" => 'fill: {{UNIT}};',
1236 1056 ],
1237 1057 ]
1238 1058 );
1239 1059
@@ -1241,9 +1061,8 @@
1241 1061 $base_control_key . '_width',
1242 1062 [
1243 1063 'label' => esc_html__( 'Width', 'elementor' ),
1244 1064 'type' => Controls_Manager::SLIDER,
1245 - 'size_units' => [ '%', 'vw', 'custom' ],
1246 1065 'default' => [
1247 1066 'unit' => '%',
1248 1067 ],
1249 1068 'tablet_default' => [
@@ -1256,18 +1075,14 @@
1256 1075 '%' => [
1257 1076 'min' => 100,
1258 1077 'max' => 300,
1259 1078 ],
1260 - 'vw' => [
1261 - 'min' => 100,
1262 - 'max' => 300,
1263 - ],
1264 1079 ],
1265 1080 'condition' => [
1266 1081 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'height_only', Shapes::FILTER_EXCLUDE ) ),
1267 1082 ],
1268 1083 'selectors' => [
1269 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'width: calc({{SIZE}}{{UNIT}} + 1.3px)',
1084 + "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-container__inner > .elementor-shape-$side svg" => 'width: calc({{SIZE}}{{UNIT}} + 1.3px)',
1270 1085 ],
1271 1086 ]
1272 1087 );
1273 1088
@@ -1275,25 +1090,18 @@
1275 1090 $base_control_key . '_height',
1276 1091 [
1277 1092 'label' => esc_html__( 'Height', 'elementor' ),
1278 1093 'type' => Controls_Manager::SLIDER,
1279 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
1280 1094 'range' => [
1281 1095 'px' => [
1282 1096 'max' => 500,
1283 1097 ],
1284 - 'em' => [
1285 - 'max' => 50,
1286 - ],
1287 - 'rem' => [
1288 - 'max' => 50,
1289 - ],
1290 1098 ],
1291 1099 'condition' => [
1292 1100 "shape_divider_$side!" => '',
1293 1101 ],
1294 1102 'selectors' => [
1295 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'height: {{SIZE}}{{UNIT}};',
1103 + "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-container__inner > .elementor-shape-$side svg" => 'height: {{SIZE}}{{UNIT}};',
1296 1104 ],
1297 1105 ]
1298 1106 );
1299 1107
@@ -1305,9 +1113,9 @@
1305 1113 'condition' => [
1306 1114 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'has_flip' ) ),
1307 1115 ],
1308 1116 'selectors' => [
1309 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'transform: translateX(-50%) rotateY(180deg)',
1117 + "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-container__inner > .elementor-shape-$side svg" => 'transform: translateX(-50%) rotateY(180deg)',
1310 1118 ],
1311 1119 ]
1312 1120 );
1313 1121
@@ -1329,9 +1137,9 @@
1329 1137 [
1330 1138 'label' => esc_html__( 'Bring to Front', 'elementor' ),
1331 1139 'type' => Controls_Manager::SWITCHER,
1332 1140 'selectors' => [
1333 - "{{WRAPPER}} > .elementor-shape-$side, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side" => 'z-index: 2; pointer-events: none',
1141 + "{{WRAPPER}} > .elementor-shape-$side, {{WRAPPER}} > .e-container__inner > .elementor-shape-$side" => 'z-index: 2; pointer-events: none',
1334 1142 ],
1335 1143 'condition' => [
1336 1144 "shape_divider_$side!" => '',
1337 1145 ],
@@ -1378,11 +1186,11 @@
1378 1186 'margin',
1379 1187 [
1380 1188 'label' => esc_html__( 'Margin', 'elementor' ),
1381 1189 'type' => Controls_Manager::DIMENSIONS,
1382 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1190 + 'size_units' => [ 'px', 'em', '%', 'rem' ],
1383 1191 'selectors' => [
1384 - '{{WRAPPER}}' => '--margin-top: {{TOP}}{{UNIT}}; --margin-bottom: {{BOTTOM}}{{UNIT}}; --margin-left: {{LEFT}}{{UNIT}}; --margin-right: {{RIGHT}}{{UNIT}};',
1192 + '{{WRAPPER}}' => '--margin-top: {{TOP}}{{UNIT}}; --margin-right: {{RIGHT}}{{UNIT}}; --margin-bottom: {{BOTTOM}}{{UNIT}}; --margin-left:{{LEFT}}{{UNIT}};',
1385 1193 ],
1386 1194 ]
1387 1195 );
1388 1196
@@ -1390,113 +1198,15 @@
1390 1198 'padding',
1391 1199 [
1392 1200 'label' => esc_html__( 'Padding', 'elementor' ),
1393 1201 'type' => Controls_Manager::DIMENSIONS,
1394 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1202 + 'size_units' => [ 'px', 'em', '%', 'rem' ],
1395 1203 'selectors' => [
1396 - '{{WRAPPER}}' => '--padding-top: {{TOP}}{{UNIT}}; --padding-bottom: {{BOTTOM}}{{UNIT}}; --padding-left: {{LEFT}}{{UNIT}}; --padding-right: {{RIGHT}}{{UNIT}};',
1204 + '{{WRAPPER}}' => '--padding-top: {{TOP}}{{UNIT}}; --padding-right: {{RIGHT}}{{UNIT}}; --padding-bottom: {{BOTTOM}}{{UNIT}}; --padding-left: {{LEFT}}{{UNIT}};',
1397 1205 ],
1398 1206 ]
1399 1207 );
1400 1208
1401 - $this->add_control(
1402 - 'heading_grid_item',
1403 - [
1404 - 'type' => Controls_Manager::HEADING,
1405 - 'label' => esc_html__( 'Grid Item', 'elementor' ),
1406 - 'separator' => 'before',
1407 - ]
1408 - );
1409 -
1410 - $this->add_responsive_control(
1411 - 'grid_column',
1412 - [
1413 - 'label' => esc_html__( 'Column Span', 'elementor' ),
1414 - 'type' => Controls_Manager::SELECT,
1415 - 'options' => [
1416 - '' => ' ' . esc_html__( 'Default', 'elementor' ),
1417 - '1' => '1',
1418 - '2' => '2',
1419 - '3' => '3',
1420 - '4' => '4',
1421 - '5' => '5',
1422 - '6' => '6',
1423 - '7' => '7',
1424 - '8' => '8',
1425 - '9' => '9',
1426 - '10' => '10',
1427 - '11' => '11',
1428 - '12' => '12',
1429 - 'custom' => esc_html__( 'Custom', 'elementor' ),
1430 - ],
1431 - 'selectors' => [
1432 - '{{WRAPPER}}' => 'grid-column: span {{VALUE}};',
1433 - ],
1434 - ]
1435 - );
1436 -
1437 - $this->add_responsive_control(
1438 - 'grid_column_custom',
1439 - [
1440 - 'label' => esc_html__( 'Custom', 'elementor' ),
1441 - 'type' => Controls_Manager::TEXT,
1442 - 'ai' => [
1443 - 'active' => false,
1444 - ],
1445 - 'selectors' => [
1446 - '{{WRAPPER}}' => 'grid-column: {{VALUE}}',
1447 - ],
1448 - 'condition' => [
1449 - 'grid_column' => 'custom',
1450 - ],
1451 - ]
1452 - );
1453 -
1454 - $this->add_responsive_control(
1455 - 'grid_row',
1456 - [
1457 - 'label' => esc_html__( 'Row Span', 'elementor' ),
1458 - 'type' => Controls_Manager::SELECT,
1459 - 'options' => [
1460 - '' => ' ' . esc_html__( 'Default', 'elementor' ),
1461 - '1' => '1',
1462 - '2' => '2',
1463 - '3' => '3',
1464 - '4' => '4',
1465 - '5' => '5',
1466 - '6' => '6',
1467 - '7' => '7',
1468 - '8' => '8',
1469 - '9' => '9',
1470 - '10' => '10',
1471 - '11' => '11',
1472 - '12' => '12',
1473 - 'custom' => esc_html__( 'Custom', 'elementor' ),
1474 - ],
1475 - 'selectors' => [
1476 - '{{WRAPPER}}' => 'grid-row: span {{VALUE}};',
1477 - ],
1478 - ]
1479 - );
1480 -
1481 - $this->add_responsive_control(
1482 - 'grid_row_custom',
1483 - [
1484 - 'label' => esc_html__( 'Custom', 'elementor' ),
1485 - 'type' => Controls_Manager::TEXT,
1486 - 'separator' => 'after',
1487 - 'ai' => [
1488 - 'active' => false,
1489 - ],
1490 - 'selectors' => [
1491 - '{{WRAPPER}}' => 'grid-row: {{VALUE}}',
1492 - ],
1493 - 'condition' => [
1494 - 'grid_row' => 'custom',
1495 - ],
1496 - ]
1497 - );
1498 -
1499 1209 $this->add_group_control(
1500 1210 Group_Control_Flex_Item::get_type(),
1501 1211 [
1502 1212 'name' => '_flex',
@@ -1507,9 +1217,9 @@
1507 1217 'size',
1508 1218 'grow',
1509 1219 'shrink',
1510 1220 ],
1511 - 'selector' => '{{WRAPPER}}.e-con', // Hack to increase specificity.
1221 + 'selector' => '{{WRAPPER}}.e-container', // Hack to increase specificity.
1512 1222 'separator' => 'before',
1513 1223 ]
1514 1224 );
1515 1225
@@ -1515,12 +1225,11 @@
1515 1225
1516 1226 $this->add_control(
1517 1227 'position_description',
1518 1228 [
1519 - 'type' => Controls_Manager::ALERT,
1520 - 'alert_type' => 'warning',
1521 - 'heading' => esc_html__( 'Please note!', 'elementor' ),
1522 - 'content' => esc_html__( 'Custom positioning is not considered best practice for responsive web design and should not be used too frequently.', 'elementor' ),
1229 + 'raw' => '<strong>' . esc_html__( 'Please note!', 'elementor' ) . '</strong> ' . esc_html__( 'Custom positioning is not considered best practice for responsive web design and should not be used too frequently.', 'elementor' ),
1230 + 'type' => Controls_Manager::RAW_HTML,
1231 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
1523 1232 'render_type' => 'ui',
1524 1233 'condition' => [
1525 1234 'position!' => '',
1526 1235 ],
@@ -1586,8 +1295,9 @@
1586 1295 'range' => [
1587 1296 'px' => [
1588 1297 'min' => -1000,
1589 1298 'max' => 1000,
1299 + 'step' => 1,
1590 1300 ],
1591 1301 '%' => [
1592 1302 'min' => -200,
1593 1303 'max' => 200,
@@ -1601,11 +1311,11 @@
1601 1311 'max' => 200,
1602 1312 ],
1603 1313 ],
1604 1314 'default' => [
1605 - 'size' => 0,
1315 + 'size' => '0',
1606 1316 ],
1607 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'vh', 'custom' ],
1317 + 'size_units' => [ 'px', '%', 'vw', 'vh' ],
1608 1318 'selectors' => [
1609 1319 'body:not(.rtl) {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',
1610 1320 'body.rtl {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',
1611 1321 ],
@@ -1624,8 +1334,9 @@
1624 1334 'range' => [
1625 1335 'px' => [
1626 1336 'min' => -1000,
1627 1337 'max' => 1000,
1338 + 'step' => 0.1,
1628 1339 ],
1629 1340 '%' => [
1630 1341 'min' => -200,
1631 1342 'max' => 200,
@@ -1639,11 +1350,11 @@
1639 1350 'max' => 200,
1640 1351 ],
1641 1352 ],
1642 1353 'default' => [
1643 - 'size' => 0,
1354 + 'size' => '0',
1644 1355 ],
1645 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'vh', 'custom' ],
1356 + 'size_units' => [ 'px', '%', 'vw', 'vh' ],
1646 1357 'selectors' => [
1647 1358 'body:not(.rtl) {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',
1648 1359 'body.rtl {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',
1649 1360 ],
@@ -1686,8 +1397,9 @@
1686 1397 'range' => [
1687 1398 'px' => [
1688 1399 'min' => -1000,
1689 1400 'max' => 1000,
1401 + 'step' => 1,
1690 1402 ],
1691 1403 '%' => [
1692 1404 'min' => -200,
1693 1405 'max' => 200,
@@ -1700,11 +1412,11 @@
1700 1412 'min' => -200,
1701 1413 'max' => 200,
1702 1414 ],
1703 1415 ],
1704 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'vw', 'custom' ],
1416 + 'size_units' => [ 'px', '%', 'vh', 'vw' ],
1705 1417 'default' => [
1706 - 'size' => 0,
1418 + 'size' => '0',
1707 1419 ],
1708 1420 'selectors' => [
1709 1421 '{{WRAPPER}}' => 'top: {{SIZE}}{{UNIT}}',
1710 1422 ],
@@ -1723,8 +1435,9 @@
1723 1435 'range' => [
1724 1436 'px' => [
1725 1437 'min' => -1000,
1726 1438 'max' => 1000,
1439 + 'step' => 1,
1727 1440 ],
1728 1441 '%' => [
1729 1442 'min' => -200,
1730 1443 'max' => 200,
@@ -1737,11 +1450,11 @@
1737 1450 'min' => -200,
1738 1451 'max' => 200,
1739 1452 ],
1740 1453 ],
1741 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'vw', 'custom' ],
1454 + 'size_units' => [ 'px', '%', 'vh', 'vw' ],
1742 1455 'default' => [
1743 - 'size' => 0,
1456 + 'size' => '0',
1744 1457 ],
1745 1458 'selectors' => [
1746 1459 '{{WRAPPER}}' => 'bottom: {{SIZE}}{{UNIT}}',
1747 1460 ],
@@ -1769,11 +1482,8 @@
1769 1482 [
1770 1483 'label' => esc_html__( 'CSS ID', 'elementor' ),
1771 1484 'type' => Controls_Manager::TEXT,
1772 1485 'default' => '',
1773 - 'ai' => [
1774 - 'active' => false,
1775 - ],
1776 1486 'dynamic' => [
1777 1487 'active' => true,
1778 1488 ],
1779 1489 'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),
@@ -1787,11 +1497,8 @@
1787 1497 [
1788 1498 'label' => esc_html__( 'CSS Classes', 'elementor' ),
1789 1499 'type' => Controls_Manager::TEXT,
1790 1500 'default' => '',
1791 - 'ai' => [
1792 - 'active' => false,
1793 - ],
1794 1501 'dynamic' => [
1795 1502 'active' => true,
1796 1503 ],
1797 1504 'prefix_class' => '',
@@ -1799,10 +1506,8 @@
1799 1506 'classes' => 'elementor-control-direction-ltr',
1800 1507 ]
1801 1508 );
1802 1509
1803 - Plugin::$instance->controls_manager->add_display_conditions_controls( $this );
1804 -
1805 1510 $this->end_controls_section();
1806 1511 }
1807 1512
1808 1513 /**
@@ -1818,10 +1523,8 @@
1818 1523 'tab' => Controls_Manager::TAB_ADVANCED,
1819 1524 ]
1820 1525 );
1821 1526
1822 - Plugin::$instance->controls_manager->add_motion_effects_promotion_control( $this );
1823 -
1824 1527 $this->add_responsive_control(
1825 1528 'animation',
1826 1529 [
1827 1530 'label' => esc_html__( 'Entrance Animation', 'elementor' ),
@@ -1891,14 +1594,9 @@
1891 1594
1892 1595 $this->add_control(
1893 1596 'responsive_description',
1894 1597 [
1895 - 'raw' => sprintf(
1896 - /* translators: 1: Link open tag, 2: Link close tag. */
1897 - esc_html__( 'Responsive visibility will take effect only on %1$s preview mode %2$s or live page, and not while editing in Elementor.', 'elementor' ),
1898 - '<a href="javascript: $e.run( \'panel/close\' )">',
1899 - '</a>'
1900 - ),
1598 + 'raw' => esc_html__( 'Responsive visibility will take effect only on preview or live page, and not while editing in Elementor.', 'elementor' ),
1901 1599 'type' => Controls_Manager::RAW_HTML,
1902 1600 'content_classes' => 'elementor-descriptor',
1903 1601 ]
1904 1602 );
@@ -1917,12 +1615,8 @@
1917 1615 $this->register_advanced_controls();
1918 1616
1919 1617 $this->register_motion_effects_controls();
1920 1618
1921 - $this->hook_sticky_notice_into_transform_section();
1922 -
1923 - $this->register_transform_section( 'con' );
1924 -
1925 1619 $this->register_responsive_controls();
1926 1620
1927 1621 Plugin::$instance->controls_manager->add_custom_attributes_controls( $this );
1928 1622
@@ -1928,25 +1622,8 @@
1928 1622
1929 1623 Plugin::$instance->controls_manager->add_custom_css_controls( $this );
1930 1624 }
1931 1625
1932 - protected function hook_sticky_notice_into_transform_section() {
1933 - add_action( 'elementor/element/container/_section_transform/after_section_start', function( Container $container ) {
1934 - if ( ! empty( $container->get_controls( 'transform_sticky_notice' ) ) ) {
1935 - return;
1936 - }
1937 -
1938 - $container->add_control(
1939 - 'transform_sticky_notice',
1940 - [
1941 - 'type' => Controls_Manager::ALERT,
1942 - 'alert_type' => 'warning',
1943 - 'content' => esc_html__( 'Note: Avoid applying transform properties on sticky containers. Doing so might cause unexpected results.', 'elementor' ),
1944 - ]
1945 - );
1946 - } );
1947 - }
1948 -
1949 1626 /**
1950 1627 * Register the Container's controls.
1951 1628 *
1952 1629 * @return void
@@ -1954,44 +1631,6 @@
1954 1631 protected function register_controls() {
1955 1632 $this->register_layout_tab();
1956 1633 $this->register_style_tab();
1957 1634 $this->register_advanced_tab();
1958 - }
1959 -
1960 - public function on_import( $element ) {
1961 - return self::slider_to_gaps_converter( $element );
1962 - }
1963 -
1964 - /**
1965 - * Convert slider to gaps control for the 3.16 upgrade script
1966 - *
1967 - * @param array $element
1968 - * @return array
1969 - */
1970 - public static function slider_to_gaps_converter( $element ) {
1971 - $breakpoints = array_keys( (array) Plugin::$instance->breakpoints->get_breakpoints() );
1972 - $breakpoints[] = 'desktop';
1973 - $control_name = 'flex_gap';
1974 -
1975 - foreach ( $breakpoints as $breakpoint ) {
1976 - $control = 'desktop' !== $breakpoint
1977 - ? $control_name . '_' . $breakpoint
1978 - : $control_name;
1979 -
1980 - if ( ! isset( $element['settings'][ $control ] ) ) {
1981 - continue;
1982 - }
1983 -
1984 - $already_using_gaps_control = isset( $element['settings'][ $control ]['isLinked'] ); // Slider control won't have the 'isLinked' property.
1985 -
1986 - if ( ! $already_using_gaps_control ) {
1987 - $old_size = strval( $element['settings'][ $control ]['size'] );
1988 -
1989 - $element['settings'][ $control ]['column'] = $old_size;
1990 - $element['settings'][ $control ]['row'] = $old_size;
1991 - $element['settings'][ $control ]['isLinked'] = true;
1992 - }
1993 - }
1994 -
1995 - return $element;
1996 1635 }
1997 1636 }