PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
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 +20 -0 4.0.94.3.0-beta3 View file →
@@ -499,5 +499,25 @@
499 499 ?>
500 500 </div>
501 501 <?php
502 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 + }
503 523 }