Jake Vanderwerf
2026-08-26 ccf5e61a075c35d24befc175994b5cb8957ca322
inc/blocks/TimelineBlock.php
@@ -4,7 +4,7 @@
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')) {
@@ -30,7 +30,7 @@
    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();
      }
@@ -59,13 +59,7 @@
        }
      $this->content = jvbNoBase($post->post_type);
      $this->children = get_children([
         'post_parent'  => $this->parentID,
         'post_status'  => 'publish',
         'orderby'      => 'date',
         'order'     => 'ASC',
         'fields'       => 'ids'
      ]);
      $this->children = jvbTimelinePoints($this->parentID,$post->post_type);
      $this->total = count($this->children);
        ob_start();
@@ -93,7 +87,7 @@
    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();
        ?>
@@ -177,7 +171,7 @@
   {
      $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);