Jake Vanderwerf
2026-09-04 c16a4d78d07e81ecdd2ff9b1b9090560ab2fe488
inc/blocks/FeedBlockOld.php
@@ -22,9 +22,7 @@
   {
      // Initialize cache with connections
      $this->cache = Cache::for('feed_block', WEEK_IN_SECONDS);
      if (JVB_TESTING) {
         $this->cache->flush();
      }
      add_action('init', [$this, 'registerBlock']);
   }
@@ -117,7 +115,7 @@
      $this->config = $this->buildParams($attributes);
      return $this->cache->remember(
         $this->cache->generateKey($this->config),
         $this->config,
         function() {
            return $this->renderBlock();
         }
@@ -483,17 +481,14 @@
   protected function defaultFieldTemplate(string $fieldType, string $fieldName):string
   {
      $data = ' data-field="'.$fieldName.'"';
      switch ($fieldName) {
         case 'post_title':
            return '<h3'.$data.'></h3>';
         case 'post_date':
         case 'post_modified':
            return '<time'.$data.'></time>';
      }
      return match($fieldType) {
         'upload' => '<img'.$data.' width="300px" height="300px" sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 800px" loading="lazy" decoding="async">',
         'taxonomy'  => '<ul'.$data.'><li><a><i></i></a></li></ul>',
         default  =>  '<p'.$data.'></p>',
      return match ($fieldName) {
         'post_title' => '<h3' . $data . '></h3>',
         'post_date', 'post_modified' => '<time' . $data . '></time>',
         default => match ($fieldType) {
            'upload' => '<img' . $data . ' width="300px" height="300px" sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 800px" loading="lazy" decoding="async">',
            'taxonomy' => '<ul' . $data . '><li><a><i></i></a></li></ul>',
            default => '<p' . $data . '></p>',
         },
      };
   }
   /**