PluginProbe
Elementor Website Builder – more than just a page builder / 3.7.3
Elementor Website Builder – more than just a page builder v3.7.3
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/container.php +115 -489 4.2.23.7.3 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
@@ -151,12 +113,9 @@
151 113 * @return void
152 114 */
153 115 protected function content_template() {
154 116 ?>
155 - <# if ( 'boxed' === settings.content_width ) { #>
156 - <div class="e-con-inner">
157 117 <#
158 - }
159 118 if ( settings.background_video_link ) {
160 119 let videoAttributes = 'autoplay muted playsinline';
161 120
162 121 if ( ! settings.background_play_once ) {
@@ -162,29 +121,21 @@
162 121 if ( ! settings.background_play_once ) {
163 122 videoAttributes += ' loop';
164 123 }
165 124
166 - view.addRenderAttribute(
167 - 'background-video-container',
168 - {
169 - 'class': 'elementor-background-video-container',
170 - }
171 - );
125 + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-background-video-container' );
172 126
173 127 if ( ! settings.background_play_on_mobile ) {
174 - view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
128 + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-phone' );
175 129 }
176 130 #>
177 131 <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>
132 + <div class="elementor-background-video-embed"></div>
133 + <video class="elementor-background-video-hosted elementor-html5-video" {{ videoAttributes }}></video>
180 134 </div>
181 135 <# } #>
182 - <div class="elementor-shape elementor-shape-top" aria-hidden="true"></div>
183 - <div class="elementor-shape elementor-shape-bottom" aria-hidden="true"></div>
184 - <# if ( 'boxed' === settings.content_width ) { #>
185 - </div>
186 - <# } #>
136 + <div class="elementor-shape elementor-shape-top"></div>
137 + <div class="elementor-shape elementor-shape-bottom"></div>
187 138 <?php
188 139 }
189 140
190 141 /**
@@ -191,9 +142,9 @@
191 142 * Render the video background markup.
192 143 *
193 144 * @return void
194 145 */
195 - protected function render_video_background() {
146 + private function render_video_background() {
196 147 $settings = $this->get_settings_for_display();
197 148
198 149 if ( 'video' !== $settings['background_background'] ) {
199 150 return;
@@ -202,24 +153,19 @@
202 153 if ( ! $settings['background_video_link'] ) {
203 154 return;
204 155 }
205 156
206 - $is_embed_video = Embed::is_embed_video( $settings['background_video_link'] );
157 + $video_properties = Embed::get_video_properties( $settings['background_video_link'] );
207 158
208 - $this->add_render_attribute(
209 - 'background-video-container',
210 - [
211 - 'class' => 'elementor-background-video-container',
212 - ]
213 - );
159 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-background-video-container' );
214 160
215 161 if ( ! $settings['background_play_on_mobile'] ) {
216 - $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-mobile' );
162 + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-phone' );
217 163 }
218 164
219 165 ?><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>
166 + <?php if ( $video_properties ) : ?>
167 + <div class="elementor-background-video-embed"></div>
222 168 <?php
223 169 else :
224 170 $video_tag_attributes = 'autoplay muted playsinline';
225 171
@@ -226,9 +172,9 @@
226 172 if ( 'yes' !== $settings['background_play_once'] ) {
227 173 $video_tag_attributes .= ' loop';
228 174 }
229 175 ?>
230 - <video class="elementor-background-video-hosted" role="presentation" <?php echo esc_attr( $video_tag_attributes ); ?>></video>
176 + <video class="elementor-background-video-hosted elementor-html5-video" <?php echo esc_attr( $video_tag_attributes ); ?>></video>
231 177 <?php endif; ?>
232 178 </div><?php
233 179 }
234 180
@@ -241,9 +187,9 @@
241 187 * @param string $side - Shape divider side, used to set the shape key.
242 188 *
243 189 * @return void
244 190 */
245 - protected function render_shape_divider( $side ) {
191 + private function render_shape_divider( $side ) {
246 192 $settings = $this->get_active_settings();
247 193 $base_setting_key = "shape_divider_$side";
248 194 $negative = ! empty( $settings[ $base_setting_key . '_negative' ] );
249 195 $shape_path = Shapes::get_shape_path( $settings[ $base_setting_key ], $negative );
@@ -251,9 +197,9 @@
251 197 if ( ! is_file( $shape_path ) || ! is_readable( $shape_path ) ) {
252 198 return;
253 199 }
254 200 ?>
255 - <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" aria-hidden="true" data-negative="<?php
201 + <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" data-negative="<?php
256 202 Utils::print_unescaped_internal_string( $negative ? 'true' : 'false' );
257 203 ?>">
258 204 <?php
259 205 // PHPCS - The file content is being read from a strict file path structure.
@@ -267,9 +213,9 @@
267 213 * Print safe HTML tag for the element based on the element settings.
268 214 *
269 215 * @return void
270 216 */
271 - protected function print_html_tag() {
217 + private function print_html_tag() {
272 218 $html_tag = $this->get_settings( 'html_tag' );
273 219
274 220 if ( empty( $html_tag ) ) {
275 221 $html_tag = 'div';
@@ -290,16 +236,13 @@
290 236 if ( ! empty( $link['url'] ) ) {
291 237 $this->add_link_attributes( '_wrapper', $link );
292 238 }
293 239
294 - ?><<?php $this->print_html_tag(); ?> <?php $this->print_render_attribute_string( '_wrapper' ); ?>>
240 + ?><<?php $this->print_html_tag(); ?> <?php $this->print_render_attribute_string( '_wrapper' ); ?>><?php
241 + $this->render_video_background();
242 +?>
295 243 <?php
296 - if ( $this->is_boxed_container( $settings ) ) { ?>
297 - <div class="e-con-inner">
298 - <?php }
299 244
300 - $this->render_video_background();
301 -
302 245 if ( ! empty( $settings['shape_divider_top'] ) ) {
303 246 $this->render_shape_divider( 'top' );
304 247 }
305 248
@@ -313,20 +256,11 @@
313 256 *
314 257 * @return void
315 258 */
316 259 public function after_render() {
317 - $settings = $this->get_settings_for_display();
318 - if ( $this->is_boxed_container( $settings ) ) { ?>
319 - </div>
320 - <?php } ?>
321 - </<?php $this->print_html_tag(); ?>>
322 - <?php
260 + ?></<?php $this->print_html_tag(); ?>><?php
323 261 }
324 262
325 - protected function is_boxed_container( array $settings ) {
326 - return ! empty( $settings['content_width'] ) && 'boxed' === $settings['content_width'];
327 - }
328 -
329 263 /**
330 264 * Override the default child type to allow widgets & containers as children.
331 265 *
332 266 * @param array $element_data
@@ -333,18 +267,12 @@
333 267 *
334 268 * @return \Elementor\Element_Base|\Elementor\Widget_Base|null
335 269 */
336 270 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'] );
271 + if ( 'container' === $element_data['elType'] ) {
272 + return Plugin::$instance->elements_manager->get_element_types( 'container' );
341 273 }
342 274
343 - if ( ! isset( $element_data['widgetType'] ) ) {
344 - return null;
345 - }
346 -
347 275 return Plugin::$instance->widgets_manager->get_widget_types( $element_data['widgetType'] );
348 276 }
349 277
350 278 /**
@@ -369,27 +297,8 @@
369 297 $min_affected_device = Breakpoints_Manager::BREAKPOINT_KEY_TABLET;
370 298 }
371 299
372 300 $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 301 'content_width',
393 302 [
394 303 'label' => esc_html__( 'Content Width', 'elementor' ),
395 304 'type' => Controls_Manager::SELECT,
@@ -397,11 +306,16 @@
397 306 'options' => [
398 307 'boxed' => esc_html__( 'Boxed', 'elementor' ),
399 308 'full' => esc_html__( 'Full Width', 'elementor' ),
400 309 ],
401 - 'render_type' => 'template',
402 - 'prefix_class' => 'e-con-',
403 - 'editor_available' => true,
310 + 'render_type' => 'ui',
311 + 'selectors' => [
312 + '{{WRAPPER}}' => '{{VALUE}}',
313 + ],
314 + 'selectors_dictionary' => [
315 + 'boxed' => '',
316 + 'full' => '--content-width: 100%;',
317 + ],
404 318 ]
405 319 );
406 320
407 321 $width_control_settings = [
@@ -406,14 +320,22 @@
406 320
407 321 $width_control_settings = [
408 322 'label' => esc_html__( 'Width', 'elementor' ),
409 323 'type' => Controls_Manager::SLIDER,
410 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
324 + 'size_units' => [ 'px', '%', 'vw' ],
411 325 'range' => [
412 326 'px' => [
413 327 'min' => 500,
414 328 'max' => 1600,
415 329 ],
330 + '%' => [
331 + 'min' => 0,
332 + 'max' => 100,
333 + ],
334 + 'vw' => [
335 + 'min' => 0,
336 + 'max' => 100,
337 + ],
416 338 ],
417 339 'default' => [
418 340 'unit' => '%',
419 341 ],
@@ -423,8 +345,9 @@
423 345 Breakpoints_Manager::BREAKPOINT_KEY_TABLET_EXTRA => $min_affected_device,
424 346 Breakpoints_Manager::BREAKPOINT_KEY_TABLET => $min_affected_device,
425 347 Breakpoints_Manager::BREAKPOINT_KEY_MOBILE_EXTRA => $min_affected_device,
426 348 ],
349 + 'separator' => 'none',
427 350 ];
428 351
429 352 $this->add_responsive_control(
430 353 'width',
@@ -485,16 +408,20 @@
485 408 'min_height',
486 409 [
487 410 'label' => esc_html__( 'Min Height', 'elementor' ),
488 411 'type' => Controls_Manager::SLIDER,
489 - 'size_units' => [ 'px', 'em', 'rem', 'vh', 'custom' ],
412 + 'size_units' => [ 'px', 'vh' ],
490 413 'range' => [
491 414 'px' => [
415 + 'min' => 0,
492 416 'max' => 1440,
493 417 ],
418 + 'vh' => [
419 + 'min' => 0,
420 + 'max' => 100,
421 + ],
494 422 ],
495 423 'description' => sprintf(
496 - /* translators: %s: 100vh. */
497 424 esc_html__( 'To achieve full height Container use %s.', 'elementor' ),
498 425 '100vh'
499 426 ),
500 427 'selectors' => [
@@ -509,9 +436,9 @@
509 436 'name' => 'flex',
510 437 'selector' => '{{WRAPPER}}',
511 438 'fields_options' => [
512 439 'gap' => [
513 - 'label' => esc_html__( 'Gaps', 'elementor' ),
440 + 'label' => esc_html_x( 'Gap between elements', 'Flex Container Control', 'elementor' ),
514 441 'device_args' => [
515 442 Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP => [
516 443 // Use the default gap from the kit as a placeholder.
517 444 'placeholder' => $this->active_kit->get_settings_for_display( 'space_between_widgets' ),
@@ -518,25 +445,11 @@
518 445 ],
519 446 ],
520 447 ],
521 448 ],
522 - 'condition' => [
523 - 'container_type' => [ 'flex' ],
524 - ],
525 449 ]
526 450 );
527 451
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 452 $this->end_controls_section();
540 453 }
541 454
542 455 /**
@@ -578,9 +491,9 @@
578 491 'article' => 'article',
579 492 'section' => 'section',
580 493 'aside' => 'aside',
581 494 'nav' => 'nav',
582 - 'a' => 'a ' . esc_html__( '(link)', 'elementor' ),
495 + 'a' => 'a',
583 496 ];
584 497
585 498 $options = [
586 499 '' => esc_html__( 'Default', 'elementor' ),
@@ -597,11 +510,11 @@
597 510
598 511 $this->add_control(
599 512 'link_note',
600 513 [
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' ),
514 + 'type' => Controls_Manager::RAW_HTML,
515 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
516 + 'raw' => esc_html__( 'Don’t add links to elements nested in this container - it will break the layout.', 'elementor' ),
604 517 'condition' => [
605 518 'html_tag' => 'a',
606 519 ],
607 520 ]
@@ -614,8 +527,9 @@
614 527 'type' => Controls_Manager::URL,
615 528 'dynamic' => [
616 529 'active' => true,
617 530 ],
531 + 'placeholder' => esc_html__( 'https://your-link.com', 'elementor' ),
618 532 'condition' => [
619 533 'html_tag' => 'a',
620 534 ],
621 535 ]
@@ -673,45 +587,8 @@
673 587 ],
674 588 ]
675 589 );
676 590
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 591 $this->end_controls_tab();
715 592
716 593 /**
717 594 * Hover.
@@ -733,9 +610,9 @@
733 610
734 611 $this->add_control(
735 612 'background_hover_transition',
736 613 [
737 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
614 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
738 615 'type' => Controls_Manager::SLIDER,
739 616 'default' => [
740 617 'size' => 0.3,
741 618 ],
@@ -740,9 +617,8 @@
740 617 'size' => 0.3,
741 618 ],
742 619 'range' => [
743 620 'px' => [
744 - 'min' => 0,
745 621 'max' => 3,
746 622 'step' => 0.1,
747 623 ],
748 624 ],
@@ -747,14 +623,8 @@
747 623 ],
748 624 ],
749 625 'render_type' => 'ui',
750 626 'separator' => 'before',
751 - 'condition' => [
752 - 'background_hover_background' => [ 'classic', 'gradient' ],
753 - ],
754 - 'selectors' => [
755 - '{{WRAPPER}}' => '--background-transition: {{SIZE}}s;',
756 - ],
757 627 ]
758 628 );
759 629
760 630 $this->end_controls_tab();
@@ -789,20 +659,18 @@
789 659 'label' => esc_html__( 'Normal', 'elementor' ),
790 660 ]
791 661 );
792 662
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 663 $this->add_group_control(
796 664 Group_Control_Background::get_type(),
797 665 [
798 666 'name' => 'background_overlay',
799 - 'selector' => $background_overlay_selector,
667 + 'selector' => '{{WRAPPER}}::before',
800 668 'fields_options' => [
801 669 'background' => [
802 670 'selectors' => [
803 671 // Hack to set the `::before` content in order to render it only when there is a background overlay.
804 - $background_overlay_selector => '--background-overlay: \'\';',
672 + '{{WRAPPER}}::before' => '--background-overlay: \'\';',
805 673 ],
806 674 ],
807 675 ],
808 676 ]
@@ -807,9 +675,9 @@
807 675 ],
808 676 ]
809 677 );
810 678
811 - $this->add_responsive_control(
679 + $this->add_control(
812 680 'background_overlay_opacity',
813 681 [
814 682 'label' => esc_html__( 'Opacity', 'elementor' ),
815 683 'type' => Controls_Manager::SLIDER,
@@ -903,20 +771,18 @@
903 771 'label' => esc_html__( 'Hover', 'elementor' ),
904 772 ]
905 773 );
906 774
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 775 $this->add_group_control(
910 776 Group_Control_Background::get_type(),
911 777 [
912 778 'name' => 'background_overlay_hover',
913 - 'selector' => $background_overlay_hover_selector,
779 + 'selector' => '{{WRAPPER}}:hover::before',
914 780 'fields_options' => [
915 781 'background' => [
916 782 'selectors' => [
917 783 // 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: \'\';',
784 + '{{WRAPPER}}:hover::before' => '--background-overlay: \'\';',
919 785 ],
920 786 ],
921 787 ],
922 788 ]
@@ -921,9 +787,9 @@
921 787 ],
922 788 ]
923 789 );
924 790
925 - $this->add_responsive_control(
791 + $this->add_control(
926 792 'background_overlay_hover_opacity',
927 793 [
928 794 'label' => esc_html__( 'Opacity', 'elementor' ),
929 795 'type' => Controls_Manager::SLIDER,
@@ -944,16 +810,23 @@
944 810 ],
945 811 ]
946 812 );
947 813
814 + $this->add_group_control(
815 + Group_Control_Css_Filter::get_type(),
816 + [
817 + 'name' => 'css_filters_hover',
818 + 'selector' => '{{WRAPPER}}:hover::before',
819 + ]
820 + );
821 +
948 822 $this->add_control(
949 823 'background_overlay_hover_transition',
950 824 [
951 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
825 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
952 826 'type' => Controls_Manager::SLIDER,
953 827 'range' => [
954 828 'px' => [
955 - 'min' => 0,
956 829 'max' => 3,
957 830 'step' => 0.1,
958 831 ],
959 832 ],
@@ -958,25 +831,14 @@
958 831 ],
959 832 ],
960 833 'render_type' => 'ui',
961 834 'separator' => 'before',
962 - 'condition' => [
963 - 'background_overlay_hover_background' => [ 'classic', 'gradient' ],
964 - ],
965 835 'selectors' => [
966 - '{{WRAPPER}}, {{WRAPPER}}::before' => '--overlay-transition: {{SIZE}}s;',
836 + '{{WRAPPER}}' => '--overlay-transition: {{SIZE}}s;',
967 837 ],
968 838 ]
969 839 );
970 840
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 841 $this->end_controls_tab();
980 842
981 843 $this->end_controls_tabs();
982 844
@@ -1012,26 +874,8 @@
1012 874 $this->add_group_control(
1013 875 Group_Control_Border::get_type(),
1014 876 [
1015 877 '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 878 ]
1035 879 );
1036 880
1037 881 $this->add_responsive_control(
@@ -1038,9 +882,9 @@
1038 882 'border_radius',
1039 883 [
1040 884 'label' => esc_html__( 'Border Radius', 'elementor' ),
1041 885 'type' => Controls_Manager::DIMENSIONS,
1042 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
886 + 'size_units' => [ 'px', '%' ],
1043 887 'selectors' => [
1044 888 '{{WRAPPER}}' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1045 889 ],
1046 890 ]
@@ -1069,20 +913,8 @@
1069 913 Group_Control_Border::get_type(),
1070 914 [
1071 915 'name' => 'border_hover',
1072 916 '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 917 ]
1086 918 );
1087 919
1088 920 $this->add_responsive_control(
@@ -1089,11 +921,11 @@
1089 921 'border_radius_hover',
1090 922 [
1091 923 'label' => esc_html__( 'Border Radius', 'elementor' ),
1092 924 'type' => Controls_Manager::DIMENSIONS,
1093 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
925 + 'size_units' => [ 'px', '%' ],
1094 926 '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}};',
927 + '{{WRAPPER}}:hover' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1096 928 ],
1097 929 ]
1098 930 );
1099 931
@@ -1107,9 +939,9 @@
1107 939
1108 940 $this->add_control(
1109 941 'border_hover_transition',
1110 942 [
1111 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
943 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
1112 944 'type' => Controls_Manager::SLIDER,
1113 945 'separator' => 'before',
1114 946 'default' => [
1115 947 'size' => 0.3,
@@ -1115,9 +947,8 @@
1115 947 'size' => 0.3,
1116 948 ],
1117 949 'range' => [
1118 950 'px' => [
1119 - 'min' => 0,
1120 951 'max' => 3,
1121 952 'step' => 0.1,
1122 953 ],
1123 954 ],
@@ -1124,36 +955,22 @@
1124 955 'conditions' => [
1125 956 'relation' => 'or',
1126 957 'terms' => [
1127 958 [
1128 - 'name' => 'border_hover_border',
959 + 'name' => 'background_background',
1129 960 'operator' => '!==',
1130 961 'value' => '',
1131 962 ],
1132 963 [
1133 - 'name' => 'border_radius_hover[top]',
964 + 'name' => 'border_border',
1134 965 'operator' => '!==',
1135 966 'value' => '',
1136 967 ],
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 968 ],
1153 969 ],
1154 970 'selectors' => [
1155 - '{{WRAPPER}}, {{WRAPPER}}::before' => '--border-transition: {{SIZE}}s;',
971 + '{{WRAPPER}}' => '--transition: background {{background_hover_transition.SIZE}}s, border {{SIZE}}s, border-radius {{SIZE}}s, box-shadow {{SIZE}}s;
972 + --overlay-transition: background {{background_overlay_hover_transition.SIZE}}s, border-radius {{SIZE}}s, opacity {{background_overlay_hover_transition.SIZE}}s',
1156 973 ],
1157 974 ]
1158 975 );
1159 976
@@ -1180,8 +997,16 @@
1180 997 );
1181 998
1182 999 $this->start_controls_tabs( 'tabs_shape_dividers' );
1183 1000
1001 + $shapes_options = [
1002 + '' => esc_html__( 'None', 'elementor' ),
1003 + ];
1004 +
1005 + foreach ( Shapes::get_shapes() as $shape_name => $shape_props ) {
1006 + $shapes_options[ $shape_name ] = $shape_props['title'];
1007 + }
1008 +
1184 1009 foreach ( [
1185 1010 'top' => esc_html__( 'Top', 'elementor' ),
1186 1011 'bottom' => esc_html__( 'Bottom', 'elementor' ),
1187 1012 ] as $side => $side_label ) {
@@ -1197,30 +1022,12 @@
1197 1022 $this->add_control(
1198 1023 $base_control_key,
1199 1024 [
1200 1025 'label' => esc_html__( 'Type', 'elementor' ),
1201 - 'type' => Controls_Manager::VISUAL_CHOICE,
1202 - 'label_block' => true,
1203 - 'columns' => 2,
1204 - 'options' => Shapes::get_shapes(),
1026 + 'type' => Controls_Manager::SELECT,
1027 + 'options' => $shapes_options,
1205 1028 'render_type' => 'none',
1206 1029 '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 1030 ]
1224 1031 );
1225 1032
1226 1033 $this->add_control(
@@ -1231,9 +1038,9 @@
1231 1038 'condition' => [
1232 1039 "shape_divider_$side!" => '',
1233 1040 ],
1234 1041 'selectors' => [
1235 - "{{WRAPPER}} > .elementor-shape-$side .elementor-shape-fill, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side .elementor-shape-fill" => 'fill: {{UNIT}};',
1042 + "{{WRAPPER}} > .elementor-shape-$side .elementor-shape-fill" => 'fill: {{UNIT}};',
1236 1043 ],
1237 1044 ]
1238 1045 );
1239 1046
@@ -1241,9 +1048,8 @@
1241 1048 $base_control_key . '_width',
1242 1049 [
1243 1050 'label' => esc_html__( 'Width', 'elementor' ),
1244 1051 'type' => Controls_Manager::SLIDER,
1245 - 'size_units' => [ '%', 'vw', 'custom' ],
1246 1052 'default' => [
1247 1053 'unit' => '%',
1248 1054 ],
1249 1055 'tablet_default' => [
@@ -1256,18 +1062,14 @@
1256 1062 '%' => [
1257 1063 'min' => 100,
1258 1064 'max' => 300,
1259 1065 ],
1260 - 'vw' => [
1261 - 'min' => 100,
1262 - 'max' => 300,
1263 - ],
1264 1066 ],
1265 1067 'condition' => [
1266 1068 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'height_only', Shapes::FILTER_EXCLUDE ) ),
1267 1069 ],
1268 1070 'selectors' => [
1269 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'width: calc({{SIZE}}{{UNIT}} + 1.3px)',
1071 + "{{WRAPPER}} > .elementor-shape-$side svg" => 'width: calc({{SIZE}}{{UNIT}} + 1.3px)',
1270 1072 ],
1271 1073 ]
1272 1074 );
1273 1075
@@ -1275,25 +1077,18 @@
1275 1077 $base_control_key . '_height',
1276 1078 [
1277 1079 'label' => esc_html__( 'Height', 'elementor' ),
1278 1080 'type' => Controls_Manager::SLIDER,
1279 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
1280 1081 'range' => [
1281 1082 'px' => [
1282 1083 'max' => 500,
1283 1084 ],
1284 - 'em' => [
1285 - 'max' => 50,
1286 - ],
1287 - 'rem' => [
1288 - 'max' => 50,
1289 - ],
1290 1085 ],
1291 1086 'condition' => [
1292 1087 "shape_divider_$side!" => '',
1293 1088 ],
1294 1089 'selectors' => [
1295 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'height: {{SIZE}}{{UNIT}};',
1090 + "{{WRAPPER}} > .elementor-shape-$side svg" => 'height: {{SIZE}}{{UNIT}};',
1296 1091 ],
1297 1092 ]
1298 1093 );
1299 1094
@@ -1305,9 +1100,9 @@
1305 1100 'condition' => [
1306 1101 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'has_flip' ) ),
1307 1102 ],
1308 1103 'selectors' => [
1309 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'transform: translateX(-50%) rotateY(180deg)',
1104 + "{{WRAPPER}} > .elementor-shape-$side svg" => 'transform: translateX(-50%) rotateY(180deg)',
1310 1105 ],
1311 1106 ]
1312 1107 );
1313 1108
@@ -1329,9 +1124,9 @@
1329 1124 [
1330 1125 'label' => esc_html__( 'Bring to Front', 'elementor' ),
1331 1126 'type' => Controls_Manager::SWITCHER,
1332 1127 'selectors' => [
1333 - "{{WRAPPER}} > .elementor-shape-$side, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side" => 'z-index: 2; pointer-events: none',
1128 + "{{WRAPPER}} > .elementor-shape-$side" => 'z-index: 2; pointer-events: none',
1334 1129 ],
1335 1130 'condition' => [
1336 1131 "shape_divider_$side!" => '',
1337 1132 ],
@@ -1378,11 +1173,11 @@
1378 1173 'margin',
1379 1174 [
1380 1175 'label' => esc_html__( 'Margin', 'elementor' ),
1381 1176 'type' => Controls_Manager::DIMENSIONS,
1382 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1177 + 'size_units' => [ 'px', 'em', '%', 'rem' ],
1383 1178 'selectors' => [
1384 - '{{WRAPPER}}' => '--margin-top: {{TOP}}{{UNIT}}; --margin-bottom: {{BOTTOM}}{{UNIT}}; --margin-left: {{LEFT}}{{UNIT}}; --margin-right: {{RIGHT}}{{UNIT}};',
1179 + '{{WRAPPER}}' => '--margin-top: {{TOP}}{{UNIT}}; --margin-right: {{RIGHT}}{{UNIT}}; --margin-bottom: {{BOTTOM}}{{UNIT}}; --margin-left:{{LEFT}}{{UNIT}};',
1385 1180 ],
1386 1181 ]
1387 1182 );
1388 1183
@@ -1390,113 +1185,15 @@
1390 1185 'padding',
1391 1186 [
1392 1187 'label' => esc_html__( 'Padding', 'elementor' ),
1393 1188 'type' => Controls_Manager::DIMENSIONS,
1394 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1189 + 'size_units' => [ 'px', 'em', '%', 'rem' ],
1395 1190 'selectors' => [
1396 - '{{WRAPPER}}' => '--padding-top: {{TOP}}{{UNIT}}; --padding-bottom: {{BOTTOM}}{{UNIT}}; --padding-left: {{LEFT}}{{UNIT}}; --padding-right: {{RIGHT}}{{UNIT}};',
1191 + '{{WRAPPER}}' => '--padding-top: {{TOP}}{{UNIT}}; --padding-right: {{RIGHT}}{{UNIT}}; --padding-bottom: {{BOTTOM}}{{UNIT}}; --padding-left: {{LEFT}}{{UNIT}};',
1397 1192 ],
1398 1193 ]
1399 1194 );
1400 1195
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 1196 $this->add_group_control(
1500 1197 Group_Control_Flex_Item::get_type(),
1501 1198 [
1502 1199 'name' => '_flex',
@@ -1507,9 +1204,9 @@
1507 1204 'size',
1508 1205 'grow',
1509 1206 'shrink',
1510 1207 ],
1511 - 'selector' => '{{WRAPPER}}.e-con', // Hack to increase specificity.
1208 + 'selector' => '{{WRAPPER}}.e-container', // Hack to increase specificity.
1512 1209 'separator' => 'before',
1513 1210 ]
1514 1211 );
1515 1212
@@ -1515,12 +1212,11 @@
1515 1212
1516 1213 $this->add_control(
1517 1214 'position_description',
1518 1215 [
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' ),
1216 + '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' ),
1217 + 'type' => Controls_Manager::RAW_HTML,
1218 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
1523 1219 'render_type' => 'ui',
1524 1220 'condition' => [
1525 1221 'position!' => '',
1526 1222 ],
@@ -1586,8 +1282,9 @@
1586 1282 'range' => [
1587 1283 'px' => [
1588 1284 'min' => -1000,
1589 1285 'max' => 1000,
1286 + 'step' => 1,
1590 1287 ],
1591 1288 '%' => [
1592 1289 'min' => -200,
1593 1290 'max' => 200,
@@ -1601,11 +1298,11 @@
1601 1298 'max' => 200,
1602 1299 ],
1603 1300 ],
1604 1301 'default' => [
1605 - 'size' => 0,
1302 + 'size' => '0',
1606 1303 ],
1607 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'vh', 'custom' ],
1304 + 'size_units' => [ 'px', '%', 'vw', 'vh' ],
1608 1305 'selectors' => [
1609 1306 'body:not(.rtl) {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',
1610 1307 'body.rtl {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',
1611 1308 ],
@@ -1624,8 +1321,9 @@
1624 1321 'range' => [
1625 1322 'px' => [
1626 1323 'min' => -1000,
1627 1324 'max' => 1000,
1325 + 'step' => 0.1,
1628 1326 ],
1629 1327 '%' => [
1630 1328 'min' => -200,
1631 1329 'max' => 200,
@@ -1639,11 +1337,11 @@
1639 1337 'max' => 200,
1640 1338 ],
1641 1339 ],
1642 1340 'default' => [
1643 - 'size' => 0,
1341 + 'size' => '0',
1644 1342 ],
1645 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'vh', 'custom' ],
1343 + 'size_units' => [ 'px', '%', 'vw', 'vh' ],
1646 1344 'selectors' => [
1647 1345 'body:not(.rtl) {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',
1648 1346 'body.rtl {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',
1649 1347 ],
@@ -1686,8 +1384,9 @@
1686 1384 'range' => [
1687 1385 'px' => [
1688 1386 'min' => -1000,
1689 1387 'max' => 1000,
1388 + 'step' => 1,
1690 1389 ],
1691 1390 '%' => [
1692 1391 'min' => -200,
1693 1392 'max' => 200,
@@ -1700,11 +1399,11 @@
1700 1399 'min' => -200,
1701 1400 'max' => 200,
1702 1401 ],
1703 1402 ],
1704 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'vw', 'custom' ],
1403 + 'size_units' => [ 'px', '%', 'vh', 'vw' ],
1705 1404 'default' => [
1706 - 'size' => 0,
1405 + 'size' => '0',
1707 1406 ],
1708 1407 'selectors' => [
1709 1408 '{{WRAPPER}}' => 'top: {{SIZE}}{{UNIT}}',
1710 1409 ],
@@ -1723,8 +1422,9 @@
1723 1422 'range' => [
1724 1423 'px' => [
1725 1424 'min' => -1000,
1726 1425 'max' => 1000,
1426 + 'step' => 1,
1727 1427 ],
1728 1428 '%' => [
1729 1429 'min' => -200,
1730 1430 'max' => 200,
@@ -1737,11 +1437,11 @@
1737 1437 'min' => -200,
1738 1438 'max' => 200,
1739 1439 ],
1740 1440 ],
1741 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'vw', 'custom' ],
1441 + 'size_units' => [ 'px', '%', 'vh', 'vw' ],
1742 1442 'default' => [
1743 - 'size' => 0,
1443 + 'size' => '0',
1744 1444 ],
1745 1445 'selectors' => [
1746 1446 '{{WRAPPER}}' => 'bottom: {{SIZE}}{{UNIT}}',
1747 1447 ],
@@ -1769,11 +1469,8 @@
1769 1469 [
1770 1470 'label' => esc_html__( 'CSS ID', 'elementor' ),
1771 1471 'type' => Controls_Manager::TEXT,
1772 1472 'default' => '',
1773 - 'ai' => [
1774 - 'active' => false,
1775 - ],
1776 1473 'dynamic' => [
1777 1474 'active' => true,
1778 1475 ],
1779 1476 'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),
@@ -1787,11 +1484,8 @@
1787 1484 [
1788 1485 'label' => esc_html__( 'CSS Classes', 'elementor' ),
1789 1486 'type' => Controls_Manager::TEXT,
1790 1487 'default' => '',
1791 - 'ai' => [
1792 - 'active' => false,
1793 - ],
1794 1488 'dynamic' => [
1795 1489 'active' => true,
1796 1490 ],
1797 1491 'prefix_class' => '',
@@ -1799,10 +1493,8 @@
1799 1493 'classes' => 'elementor-control-direction-ltr',
1800 1494 ]
1801 1495 );
1802 1496
1803 - Plugin::$instance->controls_manager->add_display_conditions_controls( $this );
1804 -
1805 1497 $this->end_controls_section();
1806 1498 }
1807 1499
1808 1500 /**
@@ -1818,10 +1510,8 @@
1818 1510 'tab' => Controls_Manager::TAB_ADVANCED,
1819 1511 ]
1820 1512 );
1821 1513
1822 - Plugin::$instance->controls_manager->add_motion_effects_promotion_control( $this );
1823 -
1824 1514 $this->add_responsive_control(
1825 1515 'animation',
1826 1516 [
1827 1517 'label' => esc_html__( 'Entrance Animation', 'elementor' ),
@@ -1891,14 +1581,9 @@
1891 1581
1892 1582 $this->add_control(
1893 1583 'responsive_description',
1894 1584 [
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 - ),
1585 + 'raw' => esc_html__( 'Responsive visibility will take effect only on preview or live page, and not while editing in Elementor.', 'elementor' ),
1901 1586 'type' => Controls_Manager::RAW_HTML,
1902 1587 'content_classes' => 'elementor-descriptor',
1903 1588 ]
1904 1589 );
@@ -1917,12 +1602,8 @@
1917 1602 $this->register_advanced_controls();
1918 1603
1919 1604 $this->register_motion_effects_controls();
1920 1605
1921 - $this->hook_sticky_notice_into_transform_section();
1922 -
1923 - $this->register_transform_section( 'con' );
1924 -
1925 1606 $this->register_responsive_controls();
1926 1607
1927 1608 Plugin::$instance->controls_manager->add_custom_attributes_controls( $this );
1928 1609
@@ -1928,25 +1609,8 @@
1928 1609
1929 1610 Plugin::$instance->controls_manager->add_custom_css_controls( $this );
1930 1611 }
1931 1612
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 1613 /**
1950 1614 * Register the Container's controls.
1951 1615 *
1952 1616 * @return void
@@ -1954,44 +1618,6 @@
1954 1618 protected function register_controls() {
1955 1619 $this->register_layout_tab();
1956 1620 $this->register_style_tab();
1957 1621 $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 1622 }
1997 1623 }