PluginProbe
Elementor Website Builder – more than just a page builder / 3.23.0-dev3
Elementor Website Builder – more than just a page builder v3.23.0-dev3
4.3.0-beta3 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 All 452 releases
← All changes | includes/widgets/image-gallery.php +6 -89 4.2.03.23.0-dev3 View file →
@@ -76,22 +76,8 @@
76 76 return false;
77 77 }
78 78
79 79 /**
80 - * Get style dependencies.
81 - *
82 - * Retrieve the list of style dependencies the widget requires.
83 - *
84 - * @since 3.24.0
85 - * @access public
86 - *
87 - * @return array Widget style dependencies.
88 - */
89 - public function get_style_depends(): array {
90 - return [ 'widget-image-gallery' ];
91 - }
92 -
93 - /**
94 80 * Get widget upsale data.
95 81 *
96 82 * Retrieve the widget promotion data.
97 83 *
@@ -110,12 +96,8 @@
110 96 'upgrade_text' => esc_html__( 'Upgrade Now', 'elementor' ),
111 97 ];
112 98 }
113 99
114 - public function has_widget_inner_wrapper(): bool {
115 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
116 - }
117 -
118 100 /**
119 101 * Register image gallery widget controls.
120 102 *
121 103 * Adds different input fields to allow the user to change and customize the widget settings.
@@ -213,48 +195,8 @@
213 195 ],
214 196 'condition' => [
215 197 'gallery_link' => 'file',
216 198 ],
217 - 'assets' => [
218 - 'styles' => [
219 - [
220 - 'name' => 'e-swiper',
221 - 'conditions' => [
222 - 'terms' => [
223 - [
224 - 'name' => 'gallery_link',
225 - 'operator' => '===',
226 - 'value' => 'file',
227 - ],
228 - [
229 - 'name' => 'open_lightbox',
230 - 'operator' => '!==',
231 - 'value' => 'no',
232 - ],
233 - ],
234 - ],
235 - ],
236 - ],
237 - 'scripts' => [
238 - [
239 - 'name' => 'swiper',
240 - 'conditions' => [
241 - 'terms' => [
242 - [
243 - 'name' => 'gallery_link',
244 - 'operator' => '===',
245 - 'value' => 'file',
246 - ],
247 - [
248 - 'name' => 'open_lightbox',
249 - 'operator' => '!==',
250 - 'value' => 'no',
251 - ],
252 - ],
253 - ],
254 - ],
255 - ],
256 - ],
257 199 ]
258 200 );
259 201
260 202 $this->add_control(
@@ -282,9 +224,9 @@
282 224
283 225 $this->add_control(
284 226 'image_spacing',
285 227 [
286 - 'label' => esc_html__( 'Gap', 'elementor' ),
228 + 'label' => esc_html__( 'Spacing', 'elementor' ),
287 229 'type' => Controls_Manager::SELECT,
288 230 'options' => [
289 231 '' => esc_html__( 'Default', 'elementor' ),
290 232 'custom' => esc_html__( 'Custom', 'elementor' ),
@@ -299,9 +241,9 @@
299 241
300 242 $this->add_control(
301 243 'image_spacing_custom',
302 244 [
303 - 'label' => esc_html__( 'Custom Gap', 'elementor' ),
245 + 'label' => esc_html__( 'Custom Spacing', 'elementor' ),
304 246 'type' => Controls_Manager::SLIDER,
305 247 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
306 248 'range' => [
307 249 'px' => [
@@ -366,10 +308,10 @@
366 308 [
367 309 'label' => esc_html__( 'Alignment', 'elementor' ),
368 310 'type' => Controls_Manager::CHOOSE,
369 311 'options' => [
370 - 'start' => [
371 - 'title' => esc_html__( 'Start', 'elementor' ),
312 + 'left' => [
313 + 'title' => esc_html__( 'Left', 'elementor' ),
372 314 'icon' => 'eicon-text-align-left',
373 315 ],
374 316 'center' => [
375 317 'title' => esc_html__( 'Center', 'elementor' ),
@@ -374,10 +316,10 @@
374 316 'center' => [
375 317 'title' => esc_html__( 'Center', 'elementor' ),
376 318 'icon' => 'eicon-text-align-center',
377 319 ],
378 - 'end' => [
379 - 'title' => esc_html__( 'End', 'elementor' ),
320 + 'right' => [
321 + 'title' => esc_html__( 'Right', 'elementor' ),
380 322 'icon' => 'eicon-text-align-right',
381 323 ],
382 324 'justify' => [
383 325 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -383,13 +325,8 @@
383 325 'title' => esc_html__( 'Justified', 'elementor' ),
384 326 'icon' => 'eicon-text-align-justify',
385 327 ],
386 328 ],
387 - 'classes' => 'elementor-control-start-end',
388 - 'selectors_dictionary' => [
389 - 'left' => is_rtl() ? 'end' : 'start',
390 - 'right' => is_rtl() ? 'start' : 'end',
391 - ],
392 329 'default' => 'center',
393 330 'selectors' => [
394 331 '{{WRAPPER}} .gallery-item .gallery-caption' => 'text-align: {{VALUE}};',
395 332 ],
@@ -498,26 +435,6 @@
498 435 remove_filter( 'wp_get_attachment_link', [ $this, 'add_lightbox_data_to_image_link' ] );
499 436 ?>
500 437 </div>
501 438 <?php
502 - }
503 -
504 - public function render_markdown(): string {
505 - $settings = $this->get_settings_for_display();
506 - if ( empty( $settings['wp_gallery'] ) ) {
507 - return '';
508 - }
509 - $images = [];
510 - foreach ( $settings['wp_gallery'] as $image ) {
511 - $url = $image['url'] ?? '';
512 - if ( empty( $url ) ) {
513 - continue;
514 - }
515 - $alt = '';
516 - if ( ! empty( $image['id'] ) ) {
517 - $alt = get_post_meta( $image['id'], '_wp_attachment_image_alt', true );
518 - }
519 - $images[] = '![' . $alt . '](' . esc_url( $url ) . ')';
520 - }
521 - return implode( "\n\n", $images );
522 439 }
523 440 }