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 | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/inc/blocks/SummaryBlock.php b/inc/blocks/SummaryBlock.php
index fd55561..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;
}
@@ -66,7 +69,7 @@
);
/**
* The h1 title element, excluding the h1 tag.
- * Can include additonal html (like <small> or <b>)
+ * Can include additional html (like <small> or <b>)
*/
$this->header = apply_filters(
'jvbSummaryHeader',
@@ -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