Jake Vanderwerf
2026-08-25 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a
inc/blocks/SummaryBlock.php
@@ -25,7 +25,7 @@
    public function __construct()
    {
        $this->cache = Cache::for('summary_block', WEEK_IN_SECONDS);
        $this->cache = Cache::for('summary_block', 'post', WEEK_IN_SECONDS);
        add_action('init', [ $this, 'registerBlock' ]);
      add_action('wp_enqueue_scripts', [$this, 'enqueueScripts']);
      if (JVB_TESTING) {
@@ -65,7 +65,15 @@
    {
        $this->config = $this->getConfig();
        $key = $this->generateKey();
        $cache = $this->cache->get($key);
      if (is_tax()) {
         $this->cache = Cache::for('summary_tax', 'term', WEEK_IN_SECONDS);
      } elseif (is_author()) {
         $this->cache = Cache::for('summary_auth', 'user', WEEK_IN_SECONDS);
      } else {
         $this->cache = Cache::for('summary_post', 'post', WEEK_IN_SECONDS);
      }
        $cache = $this->cache->get(get_queried_object_id());
        if ($cache) {
            return $cache;
@@ -173,8 +181,8 @@
        }
      $open = $this->isOpen ? ' open' : '';
        ?>
        <details class="info"<?=$open?>>
            <summary class="row btw"><?= $this->detailsTitle ?></summary>
        <section><details class="info"<?=$open?>>
            <summary class="row x-btw"><?= $this->detailsTitle ?></summary>
            <?php
            foreach ($this->details as $key => $details) {
                if ($details === '') {
@@ -187,7 +195,7 @@
            <?php
            }
            ?>
        </details>
        </details></section>
        <?php
    }