| | |
| | | */ |
| | | function jvbNotificationMenu():string |
| | | { |
| | | if (jvbSiteHasNotifications() && is_user_logged_in()) { |
| | | if (Features::forMembership()->has('notifications') && is_user_logged_in()) { |
| | | |
| | | ob_start(); |
| | | ?> |
| | |
| | | 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>'; |
| | | } |
| | | |
| | |
| | | |
| | | ?> |
| | | <nav id="<?=$id?>" class="on-this-page index"> |
| | | <label>Jump to: |
| | | <button type="button" aria-label="Show Index" title="Show Index" class="toggle" aria-expanded="false"> |
| | | <?= jvbIcon('plus-square') ?> |
| | | </button> |
| | | </label> |
| | | <button type="button" aria-label="Show Index" title="Show Index" class="toggle main" aria-expanded="false"> |
| | | <span>Jump To:</span><?= jvbIcon('plus-square') ?> |
| | | </button> |
| | | <ul> |
| | | <li> |
| | | <li id="back-to-top"> |
| | | <a href="#top" title="Back to Top"> |
| | | <?= jvbIcon('caret-circle-up') ?> |
| | | <?= jvbIcon('caret-circle-up') ?><span>Back to Top</span> |
| | | </a> |
| | | </li> |
| | | <?php |
| | |
| | | <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'])); |
| | | } |
| | | |