| | |
| | | public function __construct() |
| | | { |
| | | $this->cache = CacheManager::for('timelines', WEEK_IN_SECONDS)->connectTo('post', 'timeline'); |
| | | $this->cache->clear(); |
| | | add_action('init', [ $this, 'registerBlock' ]); |
| | | add_action('wp_footer', 'jvbRenderGallery'); |
| | | } |
| | |
| | | $many = count($terms) > 1; |
| | | ?> |
| | | <li class="<?=$slug?>"> |
| | | <?=jvbIcon($config['icon']??'triangle')?> |
| | | <?=jvbIcon($config['icon']??jvbDefaultIcon())?> |
| | | |
| | | <?php |
| | | if ($many) { echo '<ul>'; } |
| | |
| | | ?> |
| | | <div class="info"> |
| | | <header> |
| | | <h2><?=jvbIcon('logo-triangle')?><?= $title?></h2> |
| | | <?= array_key_exists('post_date', $fields) && $fields['date'] !== '' ? '<time>'.date('F Y', strtotime($fields['post_date'])).'</time>' : '' ?> |
| | | <h2><?=jvbIcon(jvbLogoIcon())?><?= $title?></h2> |
| | | <?= array_key_exists('post_date', $fields) && $fields['post_date'] !== '' ? '<time>'.date('F Y', strtotime($fields['post_date'])).'</time>' : '' ?> |
| | | <?= array_key_exists('timeline', $fields) && $fields['timeline'] !== '' ? $this->outputTimelineTax($ID) : '' ?> |
| | | <?= array_key_exists('post_content', $fields) && $fields['post_content'] !== '' ? '<div class="content">'.wptexturize(wp_kses_post( wpautop($fields['post_content']))).'</div>' : '' ?> |
| | | </header> |