| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | wp_kses( $imgSrc, [ |
| 8 | 8 | 'img' => [ |
| 9 | 9 | 'src' => true, |
| 10 | 10 | 'srcset' => true, |
| 11 | + 'loading' => true, | |
| 11 | 12 | 'sizes' => true, |
| 12 | 13 | 'class' => true, |
| 13 | 14 | 'id' => true, |
| 14 | 15 | 'width' => true, |
| @@ -25,8 +26,9 @@ | ||
| 25 | 26 | wp_kses( $imgSrc, [ |
| 26 | 27 | 'img' => [ |
| 27 | 28 | 'src' => true, |
| 28 | 29 | 'srcset' => true, |
| 30 | + 'loading' => true, | |
| 29 | 31 | 'sizes' => true, |
| 30 | 32 | 'class' => true, |
| 31 | 33 | 'id' => true, |
| 32 | 34 | 'width' => true, |
| @@ -39,10 +41,15 @@ | ||
| 39 | 41 | ?> |
| 40 | 42 | <?php endif; ?> |
| 41 | 43 | </div> |
| 42 | 44 | </div> |
| 43 | - <?php if ( $caption ): ?> | |
| 45 | + <?php if ( !empty( $caption ) ): ?> | |
| 44 | 46 | <figcaption class="mgl-caption"> |
| 45 | - <p><?php echo wp_kses_post( $caption ) ?></p> | |
| 47 | + <p><?php echo wp_kses($caption, [ | |
| 48 | + 'strong' => [], // Bold | |
| 49 | + 'b' => [], // Bold alternative | |
| 50 | + 'em' => [], // Italic | |
| 51 | + 'i' => [] // Italic alternative | |
| 52 | + ]) ?></p> | |
| 46 | 53 | </figcaption> |
| 47 | 54 | <?php endif; ?> |
| 48 | 55 | </figure> |