PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.6
Elementor Website Builder – more than just a page builder v3.6.6
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 +157 -552 4.1.0-dev13.6.6 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
@@ -138,10 +101,9 @@
138 101
139 102 $config['controls'] = $this->get_controls();
140 103 $config['tabs_controls'] = $this->get_tabs_controls();
141 104 $config['show_in_panel'] = true;
142 - $config['categories'] = [ 'layout' ];
143 - $config['include_in_widgets_config'] = true;
105 + $config['categories'] = [ 'basic' ];
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;
@@ -204,22 +155,17 @@
204 155 }
205 156
206 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 166 <?php if ( $video_properties ) : ?>
221 - <div class="elementor-background-video-embed" role="presentation"></div>
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,14 +197,14 @@
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.
260 - echo Utils::file_get_contents( $shape_path ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
206 + echo file_get_contents( $shape_path ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
261 207 ?>
262 208 </div>
263 209 <?php
264 210 }
@@ -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 /**
@@ -360,35 +288,21 @@
360 288 'tab' => Controls_Manager::TAB_LAYOUT,
361 289 ]
362 290 );
363 291
364 - $active_breakpoints = Plugin::$instance->breakpoints->get_active_breakpoints();
365 -
366 - if ( array_key_exists( Breakpoints_Manager::BREAKPOINT_KEY_MOBILE_EXTRA, $active_breakpoints ) ) {
367 - $min_affected_device = Breakpoints_Manager::BREAKPOINT_KEY_MOBILE_EXTRA;
368 - } else {
369 - $min_affected_device = Breakpoints_Manager::BREAKPOINT_KEY_TABLET;
370 - }
371 -
372 292 $this->add_control(
373 293 'container_type',
374 294 [
375 - 'label' => esc_html__( 'Container Layout', 'elementor' ),
376 - 'type' => Controls_Manager::SELECT,
295 + 'type' => Controls_Manager::HIDDEN,
377 296 'default' => 'flex',
378 - 'prefix_class' => 'e-',
379 - 'options' => [
380 - 'flex' => esc_html__( 'Flexbox', 'elementor' ),
381 - 'grid' => esc_html__( 'Grid', 'elementor' ),
382 - ],
383 297 'selectors' => [
384 298 '{{WRAPPER}}' => '--display: {{VALUE}}',
385 299 ],
386 - 'separator' => 'after',
387 - 'editor_available' => true,
388 300 ]
389 301 );
390 302
303 + $min_affected_device = Breakpoints_Manager::BREAKPOINT_KEY_TABLET;
304 +
391 305 $this->add_control(
392 306 'content_width',
393 307 [
394 308 'label' => esc_html__( 'Content Width', 'elementor' ),
@@ -397,11 +311,16 @@
397 311 'options' => [
398 312 'boxed' => esc_html__( 'Boxed', 'elementor' ),
399 313 'full' => esc_html__( 'Full Width', 'elementor' ),
400 314 ],
401 - 'render_type' => 'template',
402 - 'prefix_class' => 'e-con-',
403 - 'editor_available' => true,
315 + 'render_type' => 'ui',
316 + 'selectors' => [
317 + '{{WRAPPER}}' => '{{VALUE}}',
318 + ],
319 + 'selectors_dictionary' => [
320 + 'boxed' => '--width: 100%;',
321 + 'full' => '--content-width: 100%;',
322 + ],
404 323 ]
405 324 );
406 325
407 326 $width_control_settings = [
@@ -406,14 +325,22 @@
406 325
407 326 $width_control_settings = [
408 327 'label' => esc_html__( 'Width', 'elementor' ),
409 328 'type' => Controls_Manager::SLIDER,
410 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
329 + 'size_units' => [ 'px', '%', 'vw' ],
411 330 'range' => [
412 331 'px' => [
413 332 'min' => 500,
414 333 'max' => 1600,
415 334 ],
335 + '%' => [
336 + 'min' => 0,
337 + 'max' => 100,
338 + ],
339 + 'vw' => [
340 + 'min' => 0,
341 + 'max' => 100,
342 + ],
416 343 ],
417 344 'default' => [
418 345 'unit' => '%',
419 346 ],
@@ -421,10 +348,10 @@
421 348 Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP => $min_affected_device,
422 349 Breakpoints_Manager::BREAKPOINT_KEY_LAPTOP => $min_affected_device,
423 350 Breakpoints_Manager::BREAKPOINT_KEY_TABLET_EXTRA => $min_affected_device,
424 351 Breakpoints_Manager::BREAKPOINT_KEY_TABLET => $min_affected_device,
425 - Breakpoints_Manager::BREAKPOINT_KEY_MOBILE_EXTRA => $min_affected_device,
426 352 ],
353 + 'separator' => 'none',
427 354 ];
428 355
429 356 $this->add_responsive_control(
430 357 'width',
@@ -434,22 +361,11 @@
434 361 ],
435 362 'condition' => [
436 363 'content_width' => 'full',
437 364 ],
438 - 'device_args' => [
439 - Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP => [
440 - 'placeholder' => [
441 - 'size' => 100,
442 - 'unit' => '%',
443 - ],
444 - ],
445 - Breakpoints_Manager::BREAKPOINT_KEY_MOBILE => [
446 - // The mobile width is not inherited from the higher breakpoint width controls.
447 - 'placeholder' => [
448 - 'size' => 100,
449 - 'unit' => '%',
450 - ],
451 - ],
365 + 'placeholder' => [
366 + 'size' => '100',
367 + 'unit' => '%',
452 368 ],
453 369 ] )
454 370 );
455 371
@@ -469,15 +385,8 @@
469 385 Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP => [
470 386 // Use the default width from the kit as a placeholder.
471 387 'placeholder' => $this->active_kit->get_settings_for_display( 'container_width' ),
472 388 ],
473 - Breakpoints_Manager::BREAKPOINT_KEY_MOBILE => [
474 - // The mobile width is not inherited from the higher breakpoint width controls.
475 - 'placeholder' => [
476 - 'size' => 100,
477 - 'unit' => '%',
478 - ],
479 - ],
480 389 ],
481 390 ] )
482 391 );
483 392
@@ -485,16 +394,20 @@
485 394 'min_height',
486 395 [
487 396 'label' => esc_html__( 'Min Height', 'elementor' ),
488 397 'type' => Controls_Manager::SLIDER,
489 - 'size_units' => [ 'px', 'em', 'rem', 'vh', 'custom' ],
398 + 'size_units' => [ 'px', 'vh' ],
490 399 'range' => [
491 400 'px' => [
401 + 'min' => 0,
492 402 'max' => 1440,
493 403 ],
404 + 'vh' => [
405 + 'min' => 0,
406 + 'max' => 100,
407 + ],
494 408 ],
495 409 'description' => sprintf(
496 - /* translators: %s: 100vh. */
497 410 esc_html__( 'To achieve full height Container use %s.', 'elementor' ),
498 411 '100vh'
499 412 ),
500 413 'selectors' => [
@@ -502,63 +415,14 @@
502 415 ],
503 416 ]
504 417 );
505 418
506 - $this->add_group_control(
507 - Group_Control_Flex_Container::get_type(),
508 - [
509 - 'name' => 'flex',
510 - 'selector' => '{{WRAPPER}}',
511 - 'fields_options' => [
512 - 'gap' => [
513 - 'label' => esc_html__( 'Gaps', 'elementor' ),
514 - 'device_args' => [
515 - Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP => [
516 - // Use the default gap from the kit as a placeholder.
517 - 'placeholder' => $this->active_kit->get_settings_for_display( 'space_between_widgets' ),
518 - ],
519 - ],
520 - ],
521 - ],
522 - 'condition' => [
523 - 'container_type' => [ 'flex' ],
524 - ],
525 - ]
526 - );
527 -
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 - $this->end_controls_section();
540 - }
541 -
542 - /**
543 - * Register the Container's items layout controls.
544 - *
545 - * @return void
546 - */
547 - protected function register_items_layout_controls() {
548 - $this->start_controls_section(
549 - 'section_layout_additional_options',
550 - [
551 - 'label' => esc_html__( 'Additional Options', 'elementor' ),
552 - 'tab' => Controls_Manager::TAB_LAYOUT,
553 - ]
554 - );
555 -
556 419 $this->add_control(
557 420 'overflow',
558 421 [
559 422 'label' => esc_html__( 'Overflow', 'elementor' ),
560 423 'type' => Controls_Manager::SELECT,
424 + 'separator' => 'before',
561 425 'default' => '',
562 426 'options' => [
563 427 '' => esc_html__( 'Default', 'elementor' ),
564 428 'hidden' => esc_html__( 'Hidden', 'elementor' ),
@@ -578,9 +442,9 @@
578 442 'article' => 'article',
579 443 'section' => 'section',
580 444 'aside' => 'aside',
581 445 'nav' => 'nav',
582 - 'a' => 'a ' . esc_html__( '(link)', 'elementor' ),
446 + 'a' => 'a',
583 447 ];
584 448
585 449 $options = [
586 450 '' => esc_html__( 'Default', 'elementor' ),
@@ -595,29 +459,55 @@
595 459 ]
596 460 );
597 461
598 462 $this->add_control(
599 - 'link_note',
463 + 'link',
600 464 [
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' ),
465 + 'label' => esc_html__( 'Link', 'elementor' ),
466 + 'type' => Controls_Manager::URL,
467 + 'dynamic' => [
468 + 'active' => true,
469 + ],
470 + 'placeholder' => esc_html__( 'https://your-link.com', 'elementor' ),
604 471 'condition' => [
605 472 'html_tag' => 'a',
606 473 ],
474 + 'description' => esc_html__( 'Don\'t use for nested links, this will cause semantic issues and unexpected behavior.', 'elementor' ),
607 475 ]
608 476 );
609 477
610 - $this->add_control(
611 - 'link',
478 + $this->end_controls_section();
479 +
480 + }
481 +
482 + /**
483 + * Register the Container's items layout controls.
484 + *
485 + * @return void
486 + */
487 + protected function register_items_layout_controls() {
488 + $this->start_controls_section(
489 + 'section_layout_items',
612 490 [
613 - 'label' => esc_html__( 'Link', 'elementor' ),
614 - 'type' => Controls_Manager::URL,
615 - 'dynamic' => [
616 - 'active' => true,
491 + 'label' => esc_html__( 'Items', 'elementor' ),
492 + 'tab' => Controls_Manager::TAB_LAYOUT,
493 + ]
494 + );
495 +
496 + $this->add_group_control(
497 + Group_Control_Flex_Container::get_type(),
498 + [
499 + 'name' => 'flex',
500 + 'selector' => '{{WRAPPER}}',
501 + 'fields_options' => [
502 + 'gap' => [
503 + 'label' => esc_html_x( 'Elements Gap', 'Flex Container Control', 'elementor' ),
504 + // Use the default "elements gap" from the kit as a placeholder.
505 + 'placeholder' => $this->active_kit->get_settings_for_display( 'space_between_widgets' ),
506 + ],
617 507 ],
618 508 'condition' => [
619 - 'html_tag' => 'a',
509 + 'container_type' => 'flex',
620 510 ],
621 511 ]
622 512 );
623 513
@@ -673,45 +563,8 @@
673 563 ],
674 564 ]
675 565 );
676 566
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 567 $this->end_controls_tab();
715 568
716 569 /**
717 570 * Hover.
@@ -733,9 +586,9 @@
733 586
734 587 $this->add_control(
735 588 'background_hover_transition',
736 589 [
737 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
590 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
738 591 'type' => Controls_Manager::SLIDER,
739 592 'default' => [
740 593 'size' => 0.3,
741 594 ],
@@ -740,9 +593,8 @@
740 593 'size' => 0.3,
741 594 ],
742 595 'range' => [
743 596 'px' => [
744 - 'min' => 0,
745 597 'max' => 3,
746 598 'step' => 0.1,
747 599 ],
748 600 ],
@@ -747,14 +599,8 @@
747 599 ],
748 600 ],
749 601 'render_type' => 'ui',
750 602 'separator' => 'before',
751 - 'condition' => [
752 - 'background_hover_background' => [ 'classic', 'gradient' ],
753 - ],
754 - 'selectors' => [
755 - '{{WRAPPER}}' => '--background-transition: {{SIZE}}s;',
756 - ],
757 603 ]
758 604 );
759 605
760 606 $this->end_controls_tab();
@@ -789,20 +635,18 @@
789 635 'label' => esc_html__( 'Normal', 'elementor' ),
790 636 ]
791 637 );
792 638
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 639 $this->add_group_control(
796 640 Group_Control_Background::get_type(),
797 641 [
798 642 'name' => 'background_overlay',
799 - 'selector' => $background_overlay_selector,
643 + 'selector' => '{{WRAPPER}}::before',
800 644 'fields_options' => [
801 645 'background' => [
802 646 'selectors' => [
803 647 // Hack to set the `::before` content in order to render it only when there is a background overlay.
804 - $background_overlay_selector => '--background-overlay: \'\';',
648 + '{{WRAPPER}}::before' => '--background-overlay: \'\';',
805 649 ],
806 650 ],
807 651 ],
808 652 ]
@@ -807,9 +651,9 @@
807 651 ],
808 652 ]
809 653 );
810 654
811 - $this->add_responsive_control(
655 + $this->add_control(
812 656 'background_overlay_opacity',
813 657 [
814 658 'label' => esc_html__( 'Opacity', 'elementor' ),
815 659 'type' => Controls_Manager::SLIDER,
@@ -903,20 +747,18 @@
903 747 'label' => esc_html__( 'Hover', 'elementor' ),
904 748 ]
905 749 );
906 750
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 751 $this->add_group_control(
910 752 Group_Control_Background::get_type(),
911 753 [
912 754 'name' => 'background_overlay_hover',
913 - 'selector' => $background_overlay_hover_selector,
755 + 'selector' => '{{WRAPPER}}:hover::before',
914 756 'fields_options' => [
915 757 'background' => [
916 758 'selectors' => [
917 759 // 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: \'\';',
760 + '{{WRAPPER}}:hover::before' => '--background-overlay: \'\';',
919 761 ],
920 762 ],
921 763 ],
922 764 ]
@@ -921,9 +763,9 @@
921 763 ],
922 764 ]
923 765 );
924 766
925 - $this->add_responsive_control(
767 + $this->add_control(
926 768 'background_overlay_hover_opacity',
927 769 [
928 770 'label' => esc_html__( 'Opacity', 'elementor' ),
929 771 'type' => Controls_Manager::SLIDER,
@@ -944,16 +786,26 @@
944 786 ],
945 787 ]
946 788 );
947 789
790 + $this->add_group_control(
791 + Group_Control_Css_Filter::get_type(),
792 + [
793 + 'name' => 'css_filters_hover',
794 + 'selector' => '{{WRAPPER}}:hover::before',
795 + ]
796 + );
797 +
948 798 $this->add_control(
949 799 'background_overlay_hover_transition',
950 800 [
951 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
801 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
952 802 'type' => Controls_Manager::SLIDER,
803 + 'default' => [
804 + 'size' => 0.3,
805 + ],
953 806 'range' => [
954 807 'px' => [
955 - 'min' => 0,
956 808 'max' => 3,
957 809 'step' => 0.1,
958 810 ],
959 811 ],
@@ -958,25 +810,14 @@
958 810 ],
959 811 ],
960 812 'render_type' => 'ui',
961 813 'separator' => 'before',
962 - 'condition' => [
963 - 'background_overlay_hover_background' => [ 'classic', 'gradient' ],
964 - ],
965 814 'selectors' => [
966 - '{{WRAPPER}}, {{WRAPPER}}::before' => '--overlay-transition: {{SIZE}}s;',
815 + '{{WRAPPER}}' => '--overlay-transition: {{SIZE}}s;',
967 816 ],
968 817 ]
969 818 );
970 819
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 820 $this->end_controls_tab();
980 821
981 822 $this->end_controls_tabs();
982 823
@@ -1012,26 +853,8 @@
1012 853 $this->add_group_control(
1013 854 Group_Control_Border::get_type(),
1014 855 [
1015 856 '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 857 ]
1035 858 );
1036 859
1037 860 $this->add_responsive_control(
@@ -1038,9 +861,9 @@
1038 861 'border_radius',
1039 862 [
1040 863 'label' => esc_html__( 'Border Radius', 'elementor' ),
1041 864 'type' => Controls_Manager::DIMENSIONS,
1042 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
865 + 'size_units' => [ 'px', '%' ],
1043 866 'selectors' => [
1044 867 '{{WRAPPER}}' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1045 868 ],
1046 869 ]
@@ -1069,20 +892,8 @@
1069 892 Group_Control_Border::get_type(),
1070 893 [
1071 894 'name' => 'border_hover',
1072 895 '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 896 ]
1086 897 );
1087 898
1088 899 $this->add_responsive_control(
@@ -1089,11 +900,11 @@
1089 900 'border_radius_hover',
1090 901 [
1091 902 'label' => esc_html__( 'Border Radius', 'elementor' ),
1092 903 'type' => Controls_Manager::DIMENSIONS,
1093 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
904 + 'size_units' => [ 'px', '%' ],
1094 905 '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}};',
906 + '{{WRAPPER}}:hover' => '--border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1096 907 ],
1097 908 ]
1098 909 );
1099 910
@@ -1107,9 +918,9 @@
1107 918
1108 919 $this->add_control(
1109 920 'border_hover_transition',
1110 921 [
1111 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (s)',
922 + 'label' => esc_html__( 'Transition Duration', 'elementor' ),
1112 923 'type' => Controls_Manager::SLIDER,
1113 924 'separator' => 'before',
1114 925 'default' => [
1115 926 'size' => 0.3,
@@ -1115,9 +926,8 @@
1115 926 'size' => 0.3,
1116 927 ],
1117 928 'range' => [
1118 929 'px' => [
1119 - 'min' => 0,
1120 930 'max' => 3,
1121 931 'step' => 0.1,
1122 932 ],
1123 933 ],
@@ -1124,36 +934,22 @@
1124 934 'conditions' => [
1125 935 'relation' => 'or',
1126 936 'terms' => [
1127 937 [
1128 - 'name' => 'border_hover_border',
938 + 'name' => 'background_background',
1129 939 'operator' => '!==',
1130 940 'value' => '',
1131 941 ],
1132 942 [
1133 - 'name' => 'border_radius_hover[top]',
943 + 'name' => 'border_border',
1134 944 'operator' => '!==',
1135 945 'value' => '',
1136 946 ],
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 947 ],
1153 948 ],
1154 949 'selectors' => [
1155 - '{{WRAPPER}}, {{WRAPPER}}::before' => '--border-transition: {{SIZE}}s;',
950 + '{{WRAPPER}}' => '--transition: background {{background_hover_transition.SIZE}}s, border {{SIZE}}s, border-radius {{SIZE}}s, box-shadow {{SIZE}}s;
951 + --overlay-transition: background {{background_overlay_hover_transition.SIZE}}s, border-radius {{SIZE}}s, opacity {{background_overlay_hover_transition.SIZE}}s',
1156 952 ],
1157 953 ]
1158 954 );
1159 955
@@ -1180,8 +976,16 @@
1180 976 );
1181 977
1182 978 $this->start_controls_tabs( 'tabs_shape_dividers' );
1183 979
980 + $shapes_options = [
981 + '' => esc_html__( 'None', 'elementor' ),
982 + ];
983 +
984 + foreach ( Shapes::get_shapes() as $shape_name => $shape_props ) {
985 + $shapes_options[ $shape_name ] = $shape_props['title'];
986 + }
987 +
1184 988 foreach ( [
1185 989 'top' => esc_html__( 'Top', 'elementor' ),
1186 990 'bottom' => esc_html__( 'Bottom', 'elementor' ),
1187 991 ] as $side => $side_label ) {
@@ -1197,30 +1001,12 @@
1197 1001 $this->add_control(
1198 1002 $base_control_key,
1199 1003 [
1200 1004 'label' => esc_html__( 'Type', 'elementor' ),
1201 - 'type' => Controls_Manager::VISUAL_CHOICE,
1202 - 'label_block' => true,
1203 - 'columns' => 2,
1204 - 'options' => Shapes::get_shapes(),
1005 + 'type' => Controls_Manager::SELECT,
1006 + 'options' => $shapes_options,
1205 1007 'render_type' => 'none',
1206 1008 '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 1009 ]
1224 1010 );
1225 1011
1226 1012 $this->add_control(
@@ -1231,9 +1017,9 @@
1231 1017 'condition' => [
1232 1018 "shape_divider_$side!" => '',
1233 1019 ],
1234 1020 'selectors' => [
1235 - "{{WRAPPER}} > .elementor-shape-$side .elementor-shape-fill, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side .elementor-shape-fill" => 'fill: {{UNIT}};',
1021 + "{{WRAPPER}} > .elementor-shape-$side .elementor-shape-fill" => 'fill: {{UNIT}};',
1236 1022 ],
1237 1023 ]
1238 1024 );
1239 1025
@@ -1241,9 +1027,8 @@
1241 1027 $base_control_key . '_width',
1242 1028 [
1243 1029 'label' => esc_html__( 'Width', 'elementor' ),
1244 1030 'type' => Controls_Manager::SLIDER,
1245 - 'size_units' => [ '%', 'vw', 'custom' ],
1246 1031 'default' => [
1247 1032 'unit' => '%',
1248 1033 ],
1249 1034 'tablet_default' => [
@@ -1256,18 +1041,14 @@
1256 1041 '%' => [
1257 1042 'min' => 100,
1258 1043 'max' => 300,
1259 1044 ],
1260 - 'vw' => [
1261 - 'min' => 100,
1262 - 'max' => 300,
1263 - ],
1264 1045 ],
1265 1046 'condition' => [
1266 1047 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'height_only', Shapes::FILTER_EXCLUDE ) ),
1267 1048 ],
1268 1049 'selectors' => [
1269 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'width: calc({{SIZE}}{{UNIT}} + 1.3px)',
1050 + "{{WRAPPER}} > .elementor-shape-$side svg" => 'width: calc({{SIZE}}{{UNIT}} + 1.3px)',
1270 1051 ],
1271 1052 ]
1272 1053 );
1273 1054
@@ -1275,25 +1056,18 @@
1275 1056 $base_control_key . '_height',
1276 1057 [
1277 1058 'label' => esc_html__( 'Height', 'elementor' ),
1278 1059 'type' => Controls_Manager::SLIDER,
1279 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
1280 1060 'range' => [
1281 1061 'px' => [
1282 1062 'max' => 500,
1283 1063 ],
1284 - 'em' => [
1285 - 'max' => 50,
1286 - ],
1287 - 'rem' => [
1288 - 'max' => 50,
1289 - ],
1290 1064 ],
1291 1065 'condition' => [
1292 1066 "shape_divider_$side!" => '',
1293 1067 ],
1294 1068 'selectors' => [
1295 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'height: {{SIZE}}{{UNIT}};',
1069 + "{{WRAPPER}} > .elementor-shape-$side svg" => 'height: {{SIZE}}{{UNIT}};',
1296 1070 ],
1297 1071 ]
1298 1072 );
1299 1073
@@ -1305,9 +1079,9 @@
1305 1079 'condition' => [
1306 1080 "shape_divider_$side" => array_keys( Shapes::filter_shapes( 'has_flip' ) ),
1307 1081 ],
1308 1082 'selectors' => [
1309 - "{{WRAPPER}} > .elementor-shape-$side svg, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side svg" => 'transform: translateX(-50%) rotateY(180deg)',
1083 + "{{WRAPPER}} > .elementor-shape-$side svg" => 'transform: translateX(-50%) rotateY(180deg)',
1310 1084 ],
1311 1085 ]
1312 1086 );
1313 1087
@@ -1329,9 +1103,9 @@
1329 1103 [
1330 1104 'label' => esc_html__( 'Bring to Front', 'elementor' ),
1331 1105 'type' => Controls_Manager::SWITCHER,
1332 1106 'selectors' => [
1333 - "{{WRAPPER}} > .elementor-shape-$side, {{WRAPPER}} > .e-con-inner > .elementor-shape-$side" => 'z-index: 2; pointer-events: none',
1107 + "{{WRAPPER}} > .elementor-shape-$side" => 'z-index: 2; pointer-events: none',
1334 1108 ],
1335 1109 'condition' => [
1336 1110 "shape_divider_$side!" => '',
1337 1111 ],
@@ -1378,11 +1152,11 @@
1378 1152 'margin',
1379 1153 [
1380 1154 'label' => esc_html__( 'Margin', 'elementor' ),
1381 1155 'type' => Controls_Manager::DIMENSIONS,
1382 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1156 + 'size_units' => [ 'px', 'em', '%', 'rem' ],
1383 1157 'selectors' => [
1384 - '{{WRAPPER}}' => '--margin-top: {{TOP}}{{UNIT}}; --margin-bottom: {{BOTTOM}}{{UNIT}}; --margin-left: {{LEFT}}{{UNIT}}; --margin-right: {{RIGHT}}{{UNIT}};',
1158 + '{{WRAPPER}}' => '--margin-top: {{TOP}}{{UNIT}}; --margin-right: {{RIGHT}}{{UNIT}}; --margin-bottom: {{BOTTOM}}{{UNIT}}; --margin-left:{{LEFT}}{{UNIT}};',
1385 1159 ],
1386 1160 ]
1387 1161 );
1388 1162
@@ -1390,113 +1164,15 @@
1390 1164 'padding',
1391 1165 [
1392 1166 'label' => esc_html__( 'Padding', 'elementor' ),
1393 1167 'type' => Controls_Manager::DIMENSIONS,
1394 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1168 + 'size_units' => [ 'px', 'em', '%', 'rem' ],
1395 1169 'selectors' => [
1396 - '{{WRAPPER}}' => '--padding-top: {{TOP}}{{UNIT}}; --padding-bottom: {{BOTTOM}}{{UNIT}}; --padding-left: {{LEFT}}{{UNIT}}; --padding-right: {{RIGHT}}{{UNIT}};',
1170 + '{{WRAPPER}}' => '--padding-top: {{TOP}}{{UNIT}}; --padding-right: {{RIGHT}}{{UNIT}}; --padding-bottom: {{BOTTOM}}{{UNIT}}; --padding-left: {{LEFT}}{{UNIT}};',
1397 1171 ],
1398 1172 ]
1399 1173 );
1400 1174
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 1175 $this->add_group_control(
1500 1176 Group_Control_Flex_Item::get_type(),
1501 1177 [
1502 1178 'name' => '_flex',
@@ -1507,9 +1183,9 @@
1507 1183 'size',
1508 1184 'grow',
1509 1185 'shrink',
1510 1186 ],
1511 - 'selector' => '{{WRAPPER}}.e-con', // Hack to increase specificity.
1187 + 'selector' => '{{WRAPPER}}.e-container', // Hack to increase specificity.
1512 1188 'separator' => 'before',
1513 1189 ]
1514 1190 );
1515 1191
@@ -1515,12 +1191,11 @@
1515 1191
1516 1192 $this->add_control(
1517 1193 'position_description',
1518 1194 [
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' ),
1195 + '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' ),
1196 + 'type' => Controls_Manager::RAW_HTML,
1197 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
1523 1198 'render_type' => 'ui',
1524 1199 'condition' => [
1525 1200 'position!' => '',
1526 1201 ],
@@ -1586,8 +1261,9 @@
1586 1261 'range' => [
1587 1262 'px' => [
1588 1263 'min' => -1000,
1589 1264 'max' => 1000,
1265 + 'step' => 1,
1590 1266 ],
1591 1267 '%' => [
1592 1268 'min' => -200,
1593 1269 'max' => 200,
@@ -1601,11 +1277,11 @@
1601 1277 'max' => 200,
1602 1278 ],
1603 1279 ],
1604 1280 'default' => [
1605 - 'size' => 0,
1281 + 'size' => '0',
1606 1282 ],
1607 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'vh', 'custom' ],
1283 + 'size_units' => [ 'px', '%', 'vw', 'vh' ],
1608 1284 'selectors' => [
1609 1285 'body:not(.rtl) {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',
1610 1286 'body.rtl {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',
1611 1287 ],
@@ -1624,8 +1300,9 @@
1624 1300 'range' => [
1625 1301 'px' => [
1626 1302 'min' => -1000,
1627 1303 'max' => 1000,
1304 + 'step' => 0.1,
1628 1305 ],
1629 1306 '%' => [
1630 1307 'min' => -200,
1631 1308 'max' => 200,
@@ -1639,11 +1316,11 @@
1639 1316 'max' => 200,
1640 1317 ],
1641 1318 ],
1642 1319 'default' => [
1643 - 'size' => 0,
1320 + 'size' => '0',
1644 1321 ],
1645 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'vh', 'custom' ],
1322 + 'size_units' => [ 'px', '%', 'vw', 'vh' ],
1646 1323 'selectors' => [
1647 1324 'body:not(.rtl) {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',
1648 1325 'body.rtl {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',
1649 1326 ],
@@ -1686,8 +1363,9 @@
1686 1363 'range' => [
1687 1364 'px' => [
1688 1365 'min' => -1000,
1689 1366 'max' => 1000,
1367 + 'step' => 1,
1690 1368 ],
1691 1369 '%' => [
1692 1370 'min' => -200,
1693 1371 'max' => 200,
@@ -1700,11 +1378,11 @@
1700 1378 'min' => -200,
1701 1379 'max' => 200,
1702 1380 ],
1703 1381 ],
1704 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'vw', 'custom' ],
1382 + 'size_units' => [ 'px', '%', 'vh', 'vw' ],
1705 1383 'default' => [
1706 - 'size' => 0,
1384 + 'size' => '0',
1707 1385 ],
1708 1386 'selectors' => [
1709 1387 '{{WRAPPER}}' => 'top: {{SIZE}}{{UNIT}}',
1710 1388 ],
@@ -1723,8 +1401,9 @@
1723 1401 'range' => [
1724 1402 'px' => [
1725 1403 'min' => -1000,
1726 1404 'max' => 1000,
1405 + 'step' => 1,
1727 1406 ],
1728 1407 '%' => [
1729 1408 'min' => -200,
1730 1409 'max' => 200,
@@ -1737,11 +1416,11 @@
1737 1416 'min' => -200,
1738 1417 'max' => 200,
1739 1418 ],
1740 1419 ],
1741 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'vw', 'custom' ],
1420 + 'size_units' => [ 'px', '%', 'vh', 'vw' ],
1742 1421 'default' => [
1743 - 'size' => 0,
1422 + 'size' => '0',
1744 1423 ],
1745 1424 'selectors' => [
1746 1425 '{{WRAPPER}}' => 'bottom: {{SIZE}}{{UNIT}}',
1747 1426 ],
@@ -1769,11 +1448,8 @@
1769 1448 [
1770 1449 'label' => esc_html__( 'CSS ID', 'elementor' ),
1771 1450 'type' => Controls_Manager::TEXT,
1772 1451 'default' => '',
1773 - 'ai' => [
1774 - 'active' => false,
1775 - ],
1776 1452 'dynamic' => [
1777 1453 'active' => true,
1778 1454 ],
1779 1455 'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),
@@ -1787,11 +1463,8 @@
1787 1463 [
1788 1464 'label' => esc_html__( 'CSS Classes', 'elementor' ),
1789 1465 'type' => Controls_Manager::TEXT,
1790 1466 'default' => '',
1791 - 'ai' => [
1792 - 'active' => false,
1793 - ],
1794 1467 'dynamic' => [
1795 1468 'active' => true,
1796 1469 ],
1797 1470 'prefix_class' => '',
@@ -1799,10 +1472,8 @@
1799 1472 'classes' => 'elementor-control-direction-ltr',
1800 1473 ]
1801 1474 );
1802 1475
1803 - Plugin::$instance->controls_manager->add_display_conditions_controls( $this );
1804 -
1805 1476 $this->end_controls_section();
1806 1477 }
1807 1478
1808 1479 /**
@@ -1818,10 +1489,8 @@
1818 1489 'tab' => Controls_Manager::TAB_ADVANCED,
1819 1490 ]
1820 1491 );
1821 1492
1822 - Plugin::$instance->controls_manager->add_motion_effects_promotion_control( $this );
1823 -
1824 1493 $this->add_responsive_control(
1825 1494 'animation',
1826 1495 [
1827 1496 'label' => esc_html__( 'Entrance Animation', 'elementor' ),
@@ -1891,14 +1560,9 @@
1891 1560
1892 1561 $this->add_control(
1893 1562 'responsive_description',
1894 1563 [
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 - ),
1564 + 'raw' => esc_html__( 'Responsive visibility will take effect only on preview or live page, and not while editing in Elementor.', 'elementor' ),
1901 1565 'type' => Controls_Manager::RAW_HTML,
1902 1566 'content_classes' => 'elementor-descriptor',
1903 1567 ]
1904 1568 );
@@ -1917,12 +1581,8 @@
1917 1581 $this->register_advanced_controls();
1918 1582
1919 1583 $this->register_motion_effects_controls();
1920 1584
1921 - $this->hook_sticky_notice_into_transform_section();
1922 -
1923 - $this->register_transform_section( 'con' );
1924 -
1925 1585 $this->register_responsive_controls();
1926 1586
1927 1587 Plugin::$instance->controls_manager->add_custom_attributes_controls( $this );
1928 1588
@@ -1928,25 +1588,8 @@
1928 1588
1929 1589 Plugin::$instance->controls_manager->add_custom_css_controls( $this );
1930 1590 }
1931 1591
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 1592 /**
1950 1593 * Register the Container's controls.
1951 1594 *
1952 1595 * @return void
@@ -1954,44 +1597,6 @@
1954 1597 protected function register_controls() {
1955 1598 $this->register_layout_tab();
1956 1599 $this->register_style_tab();
1957 1600 $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 1601 }
1997 1602 }