PluginProbe
Elementor Website Builder – more than just a page builder / 3.22.0-dev4
Elementor Website Builder – more than just a page builder v3.22.0-dev4
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/widgets/image.php +13 -42 4.0.73.22.0-dev4 View file →
@@ -93,26 +93,8 @@
93 93 return false;
94 94 }
95 95
96 96 /**
97 - * Get style dependencies.
98 - *
99 - * Retrieve the list of style dependencies the widget requires.
100 - *
101 - * @since 3.24.0
102 - * @access public
103 - *
104 - * @return array Widget style dependencies.
105 - */
106 - public function get_style_depends(): array {
107 - return [ 'widget-image' ];
108 - }
109 -
110 - public function has_widget_inner_wrapper(): bool {
111 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
112 - }
113 -
114 - /**
115 97 * Register image widget controls.
116 98 *
117 99 * Adds different input fields to allow the user to change and customize the widget settings.
118 100 *
@@ -258,10 +240,10 @@
258 240 [
259 241 'label' => esc_html__( 'Alignment', 'elementor' ),
260 242 'type' => Controls_Manager::CHOOSE,
261 243 'options' => [
262 - 'start' => [
263 - 'title' => esc_html__( 'Start', 'elementor' ),
244 + 'left' => [
245 + 'title' => esc_html__( 'Left', 'elementor' ),
264 246 'icon' => 'eicon-text-align-left',
265 247 ],
266 248 'center' => [
267 249 'title' => esc_html__( 'Center', 'elementor' ),
@@ -266,18 +248,13 @@
266 248 'center' => [
267 249 'title' => esc_html__( 'Center', 'elementor' ),
268 250 'icon' => 'eicon-text-align-center',
269 251 ],
270 - 'end' => [
271 - 'title' => esc_html__( 'End', 'elementor' ),
252 + 'right' => [
253 + 'title' => esc_html__( 'Right', 'elementor' ),
272 254 'icon' => 'eicon-text-align-right',
273 255 ],
274 256 ],
275 - 'classes' => 'elementor-control-start-end',
276 - 'selectors_dictionary' => [
277 - 'left' => is_rtl() ? 'end' : 'start',
278 - 'right' => is_rtl() ? 'start' : 'end',
279 - ],
280 257 'selectors' => [
281 258 '{{WRAPPER}}' => 'text-align: {{VALUE}};',
282 259 ],
283 260 ]
@@ -387,9 +364,8 @@
387 364 '' => esc_html__( 'Default', 'elementor' ),
388 365 'fill' => esc_html__( 'Fill', 'elementor' ),
389 366 'cover' => esc_html__( 'Cover', 'elementor' ),
390 367 'contain' => esc_html__( 'Contain', 'elementor' ),
391 - 'scale-down' => esc_html__( 'Scale Down', 'elementor' ),
392 368 ],
393 369 'default' => '',
394 370 'selectors' => [
395 371 '{{WRAPPER}} img' => 'object-fit: {{VALUE}};',
@@ -418,9 +394,9 @@
418 394 '{{WRAPPER}} img' => 'object-position: {{VALUE}};',
419 395 ],
420 396 'condition' => [
421 397 'height[size]!' => '',
422 - 'object-fit' => [ 'cover', 'contain', 'scale-down' ],
398 + 'object-fit' => 'cover',
423 399 ],
424 400 ]
425 401 );
426 402
@@ -581,10 +557,10 @@
581 557 [
582 558 'label' => esc_html__( 'Alignment', 'elementor' ),
583 559 'type' => Controls_Manager::CHOOSE,
584 560 'options' => [
585 - 'start' => [
586 - 'title' => esc_html__( 'Start', 'elementor' ),
561 + 'left' => [
562 + 'title' => esc_html__( 'Left', 'elementor' ),
587 563 'icon' => 'eicon-text-align-left',
588 564 ],
589 565 'center' => [
590 566 'title' => esc_html__( 'Center', 'elementor' ),
@@ -589,10 +565,10 @@
589 565 'center' => [
590 566 'title' => esc_html__( 'Center', 'elementor' ),
591 567 'icon' => 'eicon-text-align-center',
592 568 ],
593 - 'end' => [
594 - 'title' => esc_html__( 'End', 'elementor' ),
569 + 'right' => [
570 + 'title' => esc_html__( 'Right', 'elementor' ),
595 571 'icon' => 'eicon-text-align-right',
596 572 ],
597 573 'justify' => [
598 574 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -598,13 +574,8 @@
598 574 'title' => esc_html__( 'Justified', 'elementor' ),
599 575 'icon' => 'eicon-text-align-justify',
600 576 ],
601 577 ],
602 - 'classes' => 'elementor-control-start-end',
603 - 'selectors_dictionary' => [
604 - 'left' => is_rtl() ? 'end' : 'start',
605 - 'right' => is_rtl() ? 'start' : 'end',
606 - ],
607 578 'default' => '',
608 579 'selectors' => [
609 580 '{{WRAPPER}} .widget-image-caption' => 'text-align: {{VALUE}};',
610 581 ],
@@ -675,9 +646,9 @@
675 646 'max' => 10,
676 647 ],
677 648 ],
678 649 'selectors' => [
679 - '{{WRAPPER}} .widget-image-caption' => 'margin-block-start: {{SIZE}}{{UNIT}};',
650 + '{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}};',
680 651 ],
681 652 ]
682 653 );
683 654
@@ -702,9 +673,9 @@
702 673 * Get the caption for current widget.
703 674 *
704 675 * @access private
705 676 * @since 2.3.0
706 - * @param array $settings
677 + * @param $settings
707 678 *
708 679 * @return string
709 680 */
710 681 private function get_caption( $settings ) {
@@ -831,9 +802,9 @@
831 802
832 803 var link_url;
833 804
834 805 if ( 'custom' === settings.link_to ) {
835 - link_url = settings.link?.url;
806 + link_url = settings.link.url;
836 807 }
837 808
838 809 if ( 'file' === settings.link_to ) {
839 810 link_url = settings.image.url;
@@ -849,9 +820,9 @@
849 820 #><figure class="wp-caption"><#
850 821 }
851 822
852 823 if ( link_url ) {
853 - #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ elementor.helpers.sanitizeUrl( link_url ) }}"><#
824 + #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ link_url }}"><#
854 825 }
855 826 #><img src="{{ image_url }}" class="{{ imgClass }}" /><#
856 827
857 828 if ( link_url ) {