| @@ -88,31 +88,9 @@ | ||
| 88 | 88 | public function get_keywords() { |
| 89 | 89 | return [ 'image', 'photo', 'visual' ]; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - protected function is_dynamic_content(): bool { | |
| 93 | - return false; | |
| 94 | - } | |
| 95 | - | |
| 96 | 92 | /** |
| 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 | 93 | * Register image widget controls. |
| 116 | 94 | * |
| 117 | 95 | * Adds different input fields to allow the user to change and customize the widget settings. |
| 118 | 96 | * |
| @@ -258,10 +236,10 @@ | ||
| 258 | 236 | [ |
| 259 | 237 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 260 | 238 | 'type' => Controls_Manager::CHOOSE, |
| 261 | 239 | 'options' => [ |
| 262 | - 'start' => [ | |
| 263 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 240 | + 'left' => [ | |
| 241 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 264 | 242 | 'icon' => 'eicon-text-align-left', |
| 265 | 243 | ], |
| 266 | 244 | 'center' => [ |
| 267 | 245 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -266,18 +244,13 @@ | ||
| 266 | 244 | 'center' => [ |
| 267 | 245 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 268 | 246 | 'icon' => 'eicon-text-align-center', |
| 269 | 247 | ], |
| 270 | - 'end' => [ | |
| 271 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 248 | + 'right' => [ | |
| 249 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 272 | 250 | 'icon' => 'eicon-text-align-right', |
| 273 | 251 | ], |
| 274 | 252 | ], |
| 275 | - 'classes' => 'elementor-control-start-end', | |
| 276 | - 'selectors_dictionary' => [ | |
| 277 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 278 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 279 | - ], | |
| 280 | 253 | 'selectors' => [ |
| 281 | 254 | '{{WRAPPER}}' => 'text-align: {{VALUE}};', |
| 282 | 255 | ], |
| 283 | 256 | ] |
| @@ -387,9 +360,8 @@ | ||
| 387 | 360 | '' => esc_html__( 'Default', 'elementor' ), |
| 388 | 361 | 'fill' => esc_html__( 'Fill', 'elementor' ), |
| 389 | 362 | 'cover' => esc_html__( 'Cover', 'elementor' ), |
| 390 | 363 | 'contain' => esc_html__( 'Contain', 'elementor' ), |
| 391 | - 'scale-down' => esc_html__( 'Scale Down', 'elementor' ), | |
| 392 | 364 | ], |
| 393 | 365 | 'default' => '', |
| 394 | 366 | 'selectors' => [ |
| 395 | 367 | '{{WRAPPER}} img' => 'object-fit: {{VALUE}};', |
| @@ -418,9 +390,9 @@ | ||
| 418 | 390 | '{{WRAPPER}} img' => 'object-position: {{VALUE}};', |
| 419 | 391 | ], |
| 420 | 392 | 'condition' => [ |
| 421 | 393 | 'height[size]!' => '', |
| 422 | - 'object-fit' => [ 'cover', 'contain', 'scale-down' ], | |
| 394 | + 'object-fit' => 'cover', | |
| 423 | 395 | ], |
| 424 | 396 | ] |
| 425 | 397 | ); |
| 426 | 398 | |
| @@ -581,10 +553,10 @@ | ||
| 581 | 553 | [ |
| 582 | 554 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 583 | 555 | 'type' => Controls_Manager::CHOOSE, |
| 584 | 556 | 'options' => [ |
| 585 | - 'start' => [ | |
| 586 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 557 | + 'left' => [ | |
| 558 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 587 | 559 | 'icon' => 'eicon-text-align-left', |
| 588 | 560 | ], |
| 589 | 561 | 'center' => [ |
| 590 | 562 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -589,10 +561,10 @@ | ||
| 589 | 561 | 'center' => [ |
| 590 | 562 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 591 | 563 | 'icon' => 'eicon-text-align-center', |
| 592 | 564 | ], |
| 593 | - 'end' => [ | |
| 594 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 565 | + 'right' => [ | |
| 566 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 595 | 567 | 'icon' => 'eicon-text-align-right', |
| 596 | 568 | ], |
| 597 | 569 | 'justify' => [ |
| 598 | 570 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| @@ -598,13 +570,8 @@ | ||
| 598 | 570 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| 599 | 571 | 'icon' => 'eicon-text-align-justify', |
| 600 | 572 | ], |
| 601 | 573 | ], |
| 602 | - 'classes' => 'elementor-control-start-end', | |
| 603 | - 'selectors_dictionary' => [ | |
| 604 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 605 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 606 | - ], | |
| 607 | 574 | 'default' => '', |
| 608 | 575 | 'selectors' => [ |
| 609 | 576 | '{{WRAPPER}} .widget-image-caption' => 'text-align: {{VALUE}};', |
| 610 | 577 | ], |
| @@ -675,9 +642,9 @@ | ||
| 675 | 642 | 'max' => 10, |
| 676 | 643 | ], |
| 677 | 644 | ], |
| 678 | 645 | 'selectors' => [ |
| 679 | - '{{WRAPPER}} .widget-image-caption' => 'margin-block-start: {{SIZE}}{{UNIT}};', | |
| 646 | + '{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}};', | |
| 680 | 647 | ], |
| 681 | 648 | ] |
| 682 | 649 | ); |
| 683 | 650 | |
| @@ -702,9 +669,9 @@ | ||
| 702 | 669 | * Get the caption for current widget. |
| 703 | 670 | * |
| 704 | 671 | * @access private |
| 705 | 672 | * @since 2.3.0 |
| 706 | - * @param array $settings | |
| 673 | + * @param $settings | |
| 707 | 674 | * |
| 708 | 675 | * @return string |
| 709 | 676 | */ |
| 710 | 677 | private function get_caption( $settings ) { |
| @@ -831,9 +798,9 @@ | ||
| 831 | 798 | |
| 832 | 799 | var link_url; |
| 833 | 800 | |
| 834 | 801 | if ( 'custom' === settings.link_to ) { |
| 835 | - link_url = settings.link?.url; | |
| 802 | + link_url = settings.link.url; | |
| 836 | 803 | } |
| 837 | 804 | |
| 838 | 805 | if ( 'file' === settings.link_to ) { |
| 839 | 806 | link_url = settings.image.url; |
| @@ -849,9 +816,9 @@ | ||
| 849 | 816 | #><figure class="wp-caption"><# |
| 850 | 817 | } |
| 851 | 818 | |
| 852 | 819 | if ( link_url ) { |
| 853 | - #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ elementor.helpers.sanitizeUrl( link_url ) }}"><# | |
| 820 | + #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ link_url }}"><# | |
| 854 | 821 | } |
| 855 | 822 | #><img src="{{ image_url }}" class="{{ imgClass }}" /><# |
| 856 | 823 | |
| 857 | 824 | if ( link_url ) { |