PluginProbe
Elementor Website Builder – more than just a page builder / 3.19.2
Elementor Website Builder – more than just a page builder v3.19.2
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 +14 -60 4.0.83.19.2 View file →
@@ -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 *
@@ -145,11 +123,9 @@
145 123 Group_Control_Image_Size::get_type(),
146 124 [
147 125 'name' => 'image', // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `image_size` and `image_custom_dimension`.
148 126 'default' => 'large',
149 - 'condition' => [
150 - 'image[url]!' => '',
151 - ],
127 + 'separator' => 'none',
152 128 ]
153 129 );
154 130
155 131 $this->add_control(
@@ -162,11 +138,8 @@
162 138 'attachment' => esc_html__( 'Attachment Caption', 'elementor' ),
163 139 'custom' => esc_html__( 'Custom Caption', 'elementor' ),
164 140 ],
165 141 'default' => 'none',
166 - 'condition' => [
167 - 'image[url]!' => '',
168 - ],
169 142 ]
170 143 );
171 144
172 145 $this->add_control(
@@ -176,9 +149,8 @@
176 149 'type' => Controls_Manager::TEXT,
177 150 'default' => '',
178 151 'placeholder' => esc_html__( 'Enter your image caption', 'elementor' ),
179 152 'condition' => [
180 - 'image[url]!' => '',
181 153 'caption_source' => 'custom',
182 154 ],
183 155 'dynamic' => [
184 156 'active' => true,
@@ -196,11 +168,8 @@
196 168 'none' => esc_html__( 'None', 'elementor' ),
197 169 'file' => esc_html__( 'Media File', 'elementor' ),
198 170 'custom' => esc_html__( 'Custom URL', 'elementor' ),
199 171 ],
200 - 'condition' => [
201 - 'image[url]!' => '',
202 - ],
203 172 ]
204 173 );
205 174
206 175 $this->add_control(
@@ -211,9 +180,8 @@
211 180 'dynamic' => [
212 181 'active' => true,
213 182 ],
214 183 'condition' => [
215 - 'image[url]!' => '',
216 184 'link_to' => 'custom',
217 185 ],
218 186 'show_label' => false,
219 187 ]
@@ -236,9 +204,8 @@
236 204 'yes' => esc_html__( 'Yes', 'elementor' ),
237 205 'no' => esc_html__( 'No', 'elementor' ),
238 206 ],
239 207 'condition' => [
240 - 'image[url]!' => '',
241 208 'link_to' => 'file',
242 209 ],
243 210 ]
244 211 );
@@ -258,10 +225,10 @@
258 225 [
259 226 'label' => esc_html__( 'Alignment', 'elementor' ),
260 227 'type' => Controls_Manager::CHOOSE,
261 228 'options' => [
262 - 'start' => [
263 - 'title' => esc_html__( 'Start', 'elementor' ),
229 + 'left' => [
230 + 'title' => esc_html__( 'Left', 'elementor' ),
264 231 'icon' => 'eicon-text-align-left',
265 232 ],
266 233 'center' => [
267 234 'title' => esc_html__( 'Center', 'elementor' ),
@@ -266,18 +233,13 @@
266 233 'center' => [
267 234 'title' => esc_html__( 'Center', 'elementor' ),
268 235 'icon' => 'eicon-text-align-center',
269 236 ],
270 - 'end' => [
271 - 'title' => esc_html__( 'End', 'elementor' ),
237 + 'right' => [
238 + 'title' => esc_html__( 'Right', 'elementor' ),
272 239 'icon' => 'eicon-text-align-right',
273 240 ],
274 241 ],
275 - 'classes' => 'elementor-control-start-end',
276 - 'selectors_dictionary' => [
277 - 'left' => is_rtl() ? 'end' : 'start',
278 - 'right' => is_rtl() ? 'start' : 'end',
279 - ],
280 242 'selectors' => [
281 243 '{{WRAPPER}}' => 'text-align: {{VALUE}};',
282 244 ],
283 245 ]
@@ -387,9 +349,8 @@
387 349 '' => esc_html__( 'Default', 'elementor' ),
388 350 'fill' => esc_html__( 'Fill', 'elementor' ),
389 351 'cover' => esc_html__( 'Cover', 'elementor' ),
390 352 'contain' => esc_html__( 'Contain', 'elementor' ),
391 - 'scale-down' => esc_html__( 'Scale Down', 'elementor' ),
392 353 ],
393 354 'default' => '',
394 355 'selectors' => [
395 356 '{{WRAPPER}} img' => 'object-fit: {{VALUE}};',
@@ -417,10 +378,9 @@
417 378 'selectors' => [
418 379 '{{WRAPPER}} img' => 'object-position: {{VALUE}};',
419 380 ],
420 381 'condition' => [
421 - 'height[size]!' => '',
422 - 'object-fit' => [ 'cover', 'contain', 'scale-down' ],
382 + 'object-fit' => 'cover',
423 383 ],
424 384 ]
425 385 );
426 386
@@ -569,9 +529,8 @@
569 529 [
570 530 'label' => esc_html__( 'Caption', 'elementor' ),
571 531 'tab' => Controls_Manager::TAB_STYLE,
572 532 'condition' => [
573 - 'image[url]!' => '',
574 533 'caption_source!' => 'none',
575 534 ],
576 535 ]
577 536 );
@@ -581,10 +540,10 @@
581 540 [
582 541 'label' => esc_html__( 'Alignment', 'elementor' ),
583 542 'type' => Controls_Manager::CHOOSE,
584 543 'options' => [
585 - 'start' => [
586 - 'title' => esc_html__( 'Start', 'elementor' ),
544 + 'left' => [
545 + 'title' => esc_html__( 'Left', 'elementor' ),
587 546 'icon' => 'eicon-text-align-left',
588 547 ],
589 548 'center' => [
590 549 'title' => esc_html__( 'Center', 'elementor' ),
@@ -589,10 +548,10 @@
589 548 'center' => [
590 549 'title' => esc_html__( 'Center', 'elementor' ),
591 550 'icon' => 'eicon-text-align-center',
592 551 ],
593 - 'end' => [
594 - 'title' => esc_html__( 'End', 'elementor' ),
552 + 'right' => [
553 + 'title' => esc_html__( 'Right', 'elementor' ),
595 554 'icon' => 'eicon-text-align-right',
596 555 ],
597 556 'justify' => [
598 557 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -598,13 +557,8 @@
598 557 'title' => esc_html__( 'Justified', 'elementor' ),
599 558 'icon' => 'eicon-text-align-justify',
600 559 ],
601 560 ],
602 - 'classes' => 'elementor-control-start-end',
603 - 'selectors_dictionary' => [
604 - 'left' => is_rtl() ? 'end' : 'start',
605 - 'right' => is_rtl() ? 'start' : 'end',
606 - ],
607 561 'default' => '',
608 562 'selectors' => [
609 563 '{{WRAPPER}} .widget-image-caption' => 'text-align: {{VALUE}};',
610 564 ],
@@ -675,9 +629,9 @@
675 629 'max' => 10,
676 630 ],
677 631 ],
678 632 'selectors' => [
679 - '{{WRAPPER}} .widget-image-caption' => 'margin-block-start: {{SIZE}}{{UNIT}};',
633 + '{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}};',
680 634 ],
681 635 ]
682 636 );
683 637
@@ -702,9 +656,9 @@
702 656 * Get the caption for current widget.
703 657 *
704 658 * @access private
705 659 * @since 2.3.0
706 - * @param array $settings
660 + * @param $settings
707 661 *
708 662 * @return string
709 663 */
710 664 private function get_caption( $settings ) {
@@ -831,9 +785,9 @@
831 785
832 786 var link_url;
833 787
834 788 if ( 'custom' === settings.link_to ) {
835 - link_url = settings.link?.url;
789 + link_url = settings.link.url;
836 790 }
837 791
838 792 if ( 'file' === settings.link_to ) {
839 793 link_url = settings.image.url;
@@ -849,9 +803,9 @@
849 803 #><figure class="wp-caption"><#
850 804 }
851 805
852 806 if ( link_url ) {
853 - #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ elementor.helpers.sanitizeUrl( link_url ) }}"><#
807 + #><a class="elementor-clickable" data-elementor-open-lightbox="{{ settings.open_lightbox }}" href="{{ link_url }}"><#
854 808 }
855 809 #><img src="{{ image_url }}" class="{{ imgClass }}" /><#
856 810
857 811 if ( link_url ) {