| @@ -2,54 +2,17 @@ | ||
| 2 | 2 | <div class="mgl-icon"> |
| 3 | 3 | <div class="mgl-img-container"> |
| 4 | 4 | <?php if ( !$isPreview && $linkUrl ): ?> |
| 5 | 5 | <a href="<?php echo esc_url( $linkUrl ) ?>"> |
| 6 | - <?= | |
| 7 | - wp_kses( $imgSrc, [ | |
| 8 | - 'img' => [ | |
| 9 | - 'src' => true, | |
| 10 | - 'srcset' => true, | |
| 11 | - 'loading' => true, | |
| 12 | - 'sizes' => true, | |
| 13 | - 'class' => true, | |
| 14 | - 'id' => true, | |
| 15 | - 'width' => true, | |
| 16 | - 'height' => true, | |
| 17 | - 'alt' => true, | |
| 18 | - 'align' => true, | |
| 19 | - ] | |
| 20 | - ] | |
| 21 | - ); | |
| 22 | - ?> | |
| 6 | + <?php echo wp_kses_post( $imgSrc ) ?> | |
| 23 | 7 | </a> |
| 24 | 8 | <?php else: ?> |
| 25 | - <?= | |
| 26 | - wp_kses( $imgSrc, [ | |
| 27 | - 'img' => [ | |
| 28 | - 'src' => true, | |
| 29 | - 'srcset' => true, | |
| 30 | - 'loading' => true, | |
| 31 | - 'sizes' => true, | |
| 32 | - 'class' => true, | |
| 33 | - 'id' => true, | |
| 34 | - 'width' => true, | |
| 35 | - 'height' => true, | |
| 36 | - 'alt' => true, | |
| 37 | - 'align' => true, | |
| 38 | - ] | |
| 39 | - ] | |
| 40 | - ); | |
| 41 | - ?> | |
| 9 | + <?php echo wp_kses_post( $imgSrc ) ?> | |
| 42 | 10 | <?php endif; ?> |
| 43 | 11 | </div> |
| 44 | 12 | </div> |
| 45 | - <?php if ( !empty( $caption ) ): ?> | |
| 13 | + <?php if ( $caption ): ?> | |
| 46 | 14 | <figcaption class="mgl-caption"> |
| 47 | - <p><?php echo wp_kses($caption, [ | |
| 48 | - 'strong' => [], // Bold | |
| 49 | - 'b' => [], // Bold alternative | |
| 50 | - 'em' => [], // Italic | |
| 51 | - 'i' => [] // Italic alternative | |
| 52 | - ]) ?></p> | |
| 15 | + <p><?php echo wp_kses_post( $caption ) ?></p> | |
| 53 | 16 | </figcaption> |
| 54 | 17 | <?php endif; ?> |
| 55 | 18 | </figure> |