From 275c0d74cd68677622a5431505c5c870c473063d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 29 Mar 2026 21:40:15 +0000
Subject: [PATCH] =Seems to be working, huzzah! Added some changes for on-this-page nav

---
 inc/helpers/terms.php |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/inc/helpers/terms.php b/inc/helpers/terms.php
index bf1c00c..e30cc9b 100644
--- a/inc/helpers/terms.php
+++ b/inc/helpers/terms.php
@@ -1,5 +1,7 @@
 <?php
 
+use JVBase\registrar\Registrar;
+
 if (!defined('ABSPATH')) {
 	exit;
 }
@@ -41,6 +43,29 @@
     return $out;
 }
 
+function jvbMetaTermList(string $value, string $tax, bool $icon = true):string
+{
+	if ($value === '') {
+		return '';
+	}
+	$tax = jvbCheckBase($tax);
+	$terms = array_map('absint', explode(',', $value));
+	$out = [];
+	foreach ($terms as $t) {
+		$term = get_term($t, $tax);
+		if ($term && !is_wp_error($term)) {
+			$url = get_term_link($t, $tax);
+			$out[] = '<li><a href="'.$url.'" title="View more in '.$term->name.'" rel="tag">'.$term->name.'</a></li>';
+		}
+	}
+
+	$registrar = Registrar::getInstance($tax);
+	$icon = ($icon && $registrar) ? $registrar->getIcon() : '';
+	$icon = ($icon === '') ? '' : jvbIcon($icon);
+	$title = $registrar ? '<li class="title">'.$icon.$registrar->getSingular().'</li>' : '';
+	return (!empty($out)) ? '<ul class="term-list '.jvbNoBase($tax).'">'.$title.implode('',$out).'</ul>' : '';
+}
+
 /**
  * @param int $artistID
  * @param string $taxonomy

--
Gitblit v1.10.0