| @@ -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 | ] |
| @@ -581,10 +558,10 @@ | ||
| 581 | 558 | [ |
| 582 | 559 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 583 | 560 | 'type' => Controls_Manager::CHOOSE, |
| 584 | 561 | 'options' => [ |
| 585 | - 'start' => [ | |
| 586 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 562 | + 'left' => [ | |
| 563 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 587 | 564 | 'icon' => 'eicon-text-align-left', |
| 588 | 565 | ], |
| 589 | 566 | 'center' => [ |
| 590 | 567 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -589,10 +566,10 @@ | ||
| 589 | 566 | 'center' => [ |
| 590 | 567 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 591 | 568 | 'icon' => 'eicon-text-align-center', |
| 592 | 569 | ], |
| 593 | - 'end' => [ | |
| 594 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 570 | + 'right' => [ | |
| 571 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 595 | 572 | 'icon' => 'eicon-text-align-right', |
| 596 | 573 | ], |
| 597 | 574 | 'justify' => [ |
| 598 | 575 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| @@ -598,13 +575,8 @@ | ||
| 598 | 575 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| 599 | 576 | 'icon' => 'eicon-text-align-justify', |
| 600 | 577 | ], |
| 601 | 578 | ], |
| 602 | - 'classes' => 'elementor-control-start-end', | |
| 603 | - 'selectors_dictionary' => [ | |
| 604 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 605 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 606 | - ], | |
| 607 | 579 | 'default' => '', |
| 608 | 580 | 'selectors' => [ |
| 609 | 581 | '{{WRAPPER}} .widget-image-caption' => 'text-align: {{VALUE}};', |
| 610 | 582 | ], |
| @@ -675,9 +647,9 @@ | ||
| 675 | 647 | 'max' => 10, |
| 676 | 648 | ], |
| 677 | 649 | ], |
| 678 | 650 | 'selectors' => [ |
| 679 | - '{{WRAPPER}} .widget-image-caption' => 'margin-block-start: {{SIZE}}{{UNIT}};', | |
| 651 | + '{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}};', | |
| 680 | 652 | ], |
| 681 | 653 | ] |
| 682 | 654 | ); |
| 683 | 655 | |
| @@ -702,9 +674,9 @@ | ||
| 702 | 674 | * Get the caption for current widget. |
| 703 | 675 | * |
| 704 | 676 | * @access private |
| 705 | 677 | * @since 2.3.0 |
| 706 | - * @param array $settings | |
| 678 | + * @param $settings | |
| 707 | 679 | * |
| 708 | 680 | * @return string |
| 709 | 681 | */ |
| 710 | 682 | private function get_caption( $settings ) { |
| @@ -831,9 +803,9 @@ | ||
| 831 | 803 | |
| 832 | 804 | var link_url; |
| 833 | 805 | |
| 834 | 806 | if ( 'custom' === settings.link_to ) { |
| 835 | - link_url = settings.link?.url; | |
| 807 | + link_url = settings.link.url; | |
| 836 | 808 | } |
| 837 | 809 | |
| 838 | 810 | if ( 'file' === settings.link_to ) { |
| 839 | 811 | link_url = settings.image.url; |
| @@ -849,9 +821,9 @@ | ||
| 849 | 821 | #><figure class="wp-caption"><# |
| 850 | 822 | } |
| 851 | 823 | |
| 852 | 824 | if ( link_url ) { |
| 853 | - #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ elementor.helpers.sanitizeUrl( link_url ) }}"><# | |
| 825 | + #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ link_url }}"><# | |
| 854 | 826 | } |
| 855 | 827 | #><img src="{{ image_url }}" class="{{ imgClass }}" /><# |
| 856 | 828 | |
| 857 | 829 | if ( link_url ) { |