From a58a2e7ca4700d3e23341fde767060a4c2c704a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 30 Aug 2026 21:04:37 +0000
Subject: [PATCH] =Minor tweaks to MenuBlock.php
---
build/summary/render.php | 31 ++++++++++++-------------------
1 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/build/summary/render.php b/build/summary/render.php
index b5645eb..3be4bb3 100644
--- a/build/summary/render.php
+++ b/build/summary/render.php
@@ -19,12 +19,10 @@
// Buffer output
if (is_tax()) {
- switch (get_queried_object()->taxonomy) {
- case BASE.'shop':
- return jvbRenderShopSummary();
- default:
- return jvbRenderTermSummary();
- }
+ return match (get_queried_object()->taxonomy) {
+ BASE . 'shop' => jvbRenderShopSummary(),
+ default => jvbRenderTermSummary(),
+ };
} elseif (is_singular()) {
return jvbRenderArtistSummary();
}
@@ -152,7 +150,7 @@
<h2>Contact <?=$artist['name']?></h2>
<?php
echo jvbRenderContactInfo($current->ID, 'post');
- echo jvbRenderLinks($current->ID, 'post');
+ echo jvbRenderLinks($current->ID);
?>
</section>
<?php
@@ -165,7 +163,7 @@
{
$current = get_queried_object();
- $cache = Cache::for('shop_bio', WEEK_IN_SECONDS)->connect('taxonomy');
+ $cache = Cache::for('shop_bio', 'term',WEEK_IN_SECONDS);
$key = $current->term_id;
$cached = $cache->get($key);
if ($cached !== false) {
@@ -285,7 +283,7 @@
function jvbRenderTermSummary()
{
$current = get_queried_object();
- $cache = Cache::for('term_summary', WEEK_IN_SECONDS)->connect('taxonomy');
+ $cache = Cache::for('term_summary', 'term',WEEK_IN_SECONDS);
$key = $current->ID;
$cached = $cache->get($key);
if ($cached !== false) {
@@ -294,16 +292,11 @@
ob_start();
$tax = jvbNoBase($current->taxonomy);
- switch ($tax) {
- case 'style':
- $title = 'Tattoo Artists';
- break;
- case 'theme':
- $title = 'Tattoos';
- break;
- default:
- $title = '';
- }
+ $title = match ($tax) {
+ 'style' => 'Tattoo Artists',
+ 'theme' => 'Tattoos',
+ default => '',
+ };
$meta = Meta::forTerm($current->ID);
$fields = $meta->getAll();
--
Gitblit v1.10.0