| | |
| | | function jvbImageCaption(int $imgID, string $start = 'tiny', string $end = 'large', bool $addLink = true, ?string $postSlug = null):string |
| | | { |
| | | $caption = wp_get_attachment_caption($imgID); |
| | | $caption = ($caption && $caption !== '') ? '<figcaption>'.apply_filters('the_content', $caption).'</figcaption>' : ''; |
| | | $caption = ($caption && $caption !== '') ? '<figcaption>'.jvb_filter_content( $caption).'</figcaption>' : ''; |
| | | return '<figure>'.jvbFormatImage($imgID, $start, $end, $addLink, $postSlug).$caption.'</figure>'; |
| | | } |
| | | |
| | |
| | | <h2>'.$config['title'].'</h2>'; |
| | | if ( array_key_exists('description', $config)) { |
| | | if (!is_array($config['description'])) { |
| | | $content .= apply_filters('the_content', $config['description']); |
| | | $content .= jvb_filter_content( $config['description']); |
| | | } else { |
| | | // foreach ($config['description'] as $desc) { |
| | | // $content .= apply_filters('the_content', $desc); |
| | | // $content .= jvb_filter_content( $desc); |
| | | // } |
| | | $content .= implode('',array_map(function ($paragraph) { |
| | | return apply_filters('the_content', $paragraph); |
| | | return jvb_filter_content( $paragraph); |
| | | }, $config['description'])); |
| | | } |
| | | |