| | |
| | | use JVBase\managers\Cache; |
| | | use JVBase\meta\Meta; |
| | | use JVBase\registrar\Registrar; |
| | | use JVBase\base\Site; |
| | | use JVBase\rest\routes\ContentRoutes; |
| | | use WP_Block; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | |
| | | |
| | | public function __construct() |
| | | { |
| | | $this->cache = Cache::for('timelines', WEEK_IN_SECONDS)->connect('post'); |
| | | $this->cache = Cache::for('timelines', 'post', WEEK_IN_SECONDS); |
| | | if (JVB_TESTING){ |
| | | $this->cache->flush(); |
| | | } |
| | |
| | | protected function renderHeader():void |
| | | { |
| | | $meta = Meta::forPost($this->parentID); |
| | | $sharedFields = JVB()->routes('content')->getTimelineSharedFields($this->content); |
| | | $sharedFields = ContentRoutes::getInstance()->getTimelineSharedFields($this->content); |
| | | $fields = $meta->getAll($sharedFields); |
| | | $extra = $meta->getAll(); |
| | | ?> |
| | |
| | | { |
| | | $all = $this->children; |
| | | array_unshift($all, $this->parentID); |
| | | $uniqueFields = JVB()->routes('content')->getTimelineUniqueFields($this->content); |
| | | $uniqueFields = ContentRoutes::getInstance()->getTimelineUniqueFields($this->content); |
| | | |
| | | foreach ($all as $i => $ID) { |
| | | $meta = Meta::forPost($ID); |
| | |
| | | |
| | | public function renderGallery():void |
| | | { |
| | | jvbRenderGallery(true); |
| | | jvbRenderGallery(); |
| | | } |
| | | } |