From 01e9a8e40351a87f6548a4f55de842d6f6918ad0 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 15 Sep 2026 02:44:28 +0000
Subject: [PATCH] =Found little glitch with auto-adding rewrite rules to taxonomy Registrar instances where we have the post type as the base in the url rewrite
---
inc/blocks/SimpleCalendarBlock.php | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/inc/blocks/SimpleCalendarBlock.php b/inc/blocks/SimpleCalendarBlock.php
index 41eaa2b..24e8a5d 100644
--- a/inc/blocks/SimpleCalendarBlock.php
+++ b/inc/blocks/SimpleCalendarBlock.php
@@ -72,7 +72,7 @@
if (is_post_type_archive($registered)) {
$this->params = ['all'];
} elseif (is_tax($taxonomies)) {
- $this->params = [];
+ $this->params = ['tax'];
} else {
$this->params = [];
}
@@ -348,15 +348,14 @@
protected function getCurrentPostTypes():array
{
- if (is_post_type_archive()) {
+ if (is_post_type_archive() && !is_tax()) {
return [get_queried_object()->name];
}
if (is_singular()) {
return [get_queried_object()->post_type];
}
if (is_tax()) {
- $tax = get_queried_object();
- jvbDump($tax, 'taxonomy');
+ return [get_post_type()];
}
return [];
}
@@ -367,7 +366,7 @@
if (is_singular()) {
return $this->formatSingular();
}
-
+
$items = new WP_Query($this->buildArgs($past));
$events = implode('', array_map([$this, 'formatItem'], $items->posts));
--
Gitblit v1.10.0