From 58e8ae0759ccfa97c478ccae4e0778bdce70966f Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 22 Jan 2026 22:40:02 +0000
Subject: [PATCH] =DirectoryManager.php updates, some javascript tweaks for CRUD.js, and minor style changes

---
 inc/blocks/SummaryBlock.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/inc/blocks/SummaryBlock.php b/inc/blocks/SummaryBlock.php
index 7e92262..84d99b3 100644
--- a/inc/blocks/SummaryBlock.php
+++ b/inc/blocks/SummaryBlock.php
@@ -25,6 +25,9 @@
     {
         $this->cache = CacheManager::for('summary_block', WEEK_IN_SECONDS);
         add_action('init', [ $this, 'registerBlock' ]);
+		if (JVB_TESTING) {
+			$this->cache->clear();
+		}
     }
 
     public function registerBlock()
@@ -55,7 +58,7 @@
         $this->config = $this->getConfig();
         $key = $this->generateKey();
         $cache = $this->cache->get($key);
-        $cache = false;
+
         if ($cache) {
             return $cache;
         }
@@ -178,7 +181,7 @@
         if (empty($this->type)) {
             $this->type = match (true) {
                 is_tax()                => jvbNoBase(get_queried_object()->taxonomy),
-                is_post_type_archive()  => jvbNoBase(get_post_type()),
+                is_post_type_archive()  => jvbNoBase(get_queried_object()->name),
                 default                 => jvbNoBase(get_queried_object()->post_type),
             };
         }

--
Gitblit v1.10.0