From 46d681c6b825d21b3f698d793c4e630c687d90ad Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 21 May 2026 21:41:53 +0000
Subject: [PATCH] =Major CustomBlocks.php overhaul, expanding block support and customization from the editor. theme.json should now be updated on new themes to set brand colours, etc. Also note: major change to .col vs .row alignment: simplifying it to .top .bottom vs the confusion of the differences for .col/.row .start and .a-start
---
inc/managers/SEO/BreadcrumbManager.php | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/inc/managers/SEO/BreadcrumbManager.php b/inc/managers/SEO/BreadcrumbManager.php
index 341debf..224569f 100644
--- a/inc/managers/SEO/BreadcrumbManager.php
+++ b/inc/managers/SEO/BreadcrumbManager.php
@@ -25,7 +25,6 @@
private function __construct()
{
$this->cache = Cache::for('breadcrumbs', MONTH_IN_SECONDS)->connect('post')->connect('taxonomy')->connect('user');
- $this->cache->flush();
if (JVB_TESTING) {
$this->cache->flush();
}
@@ -50,7 +49,9 @@
return [];
}
+
switch (true) {
+
case is_singular():
$key = get_queried_object_id();
break;
@@ -62,6 +63,10 @@
$obj = get_queried_object();
$key = $obj->taxonomy;
break;
+ case is_home():
+ $obj = get_queried_object();
+ $key = $obj->post_type;
+ break;
default:
$key = 'home';
break;
@@ -93,7 +98,7 @@
$obj = get_queried_object();
if (is_tax()) {
$crumbs = $this->addTaxonomyCrumbs($crumbs, $obj);
- } elseif (is_singular()) {
+ } elseif (is_singular() || is_home()) {
$crumbs = $this->addArchiveCrumbs($crumbs, $obj);
$hierarchy = $this->addSingularCrumbs($crumbs, $obj);
$crumbs = $crumbs + $hierarchy;
@@ -211,6 +216,9 @@
*/
private function addArchiveCrumbs(array $crumbs, object $obj): array
{
+ if (is_singular('page') || is_home()) {
+ return $crumbs;
+ }
$type = is_singular() ? $obj->post_type : $obj->name;
$name = jvbNoBase($type);
@@ -235,8 +243,9 @@
'url' => get_post_type_archive_link($type)
];
} else {
+ $postTypeObject = get_post_type_object($type);
$crumbs[] = [
- 'name' => $obj->label,
+ 'name' => $postTypeObject->label,
'url' => get_post_type_archive_link($type)
];
}
--
Gitblit v1.10.0