From 3baf3d2545ba6ece6b74a64c0def59bd0774cf54 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 10 Jun 2026 16:34:12 +0000
Subject: [PATCH] =Laid the groundwork for an improved DashboardManager.php setup. Have to put it aside so I can get the dang Northeh done though.

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

diff --git a/inc/helpers/terms.php b/inc/helpers/terms.php
index bf1c00c..6c0f7c0 100644
--- a/inc/helpers/terms.php
+++ b/inc/helpers/terms.php
@@ -1,9 +1,24 @@
 <?php
 
+use JVBase\registrar\Registrar;
+
 if (!defined('ABSPATH')) {
 	exit;
 }
 
+
+function jvbGetTermOwners(int $termID, bool $includeManagers = true):array
+{
+	$owners = get_term_meta($termID, BASE.'owners', true);
+	$owners = empty($owners) ? [] : $owners;
+	if ($includeManagers) {
+		$managers = get_term_meta($termID, BASE.'managers', true);
+		$managers = empty($managers) ? [] : $managers;
+		$owners = array_merge($owners, $managers);
+	}
+	return $owners;
+
+}
 /**
  * @param string $term
  * @param int|false $ID
@@ -41,6 +56,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 row left '.jvbNoBase($tax).'">'.$title.implode('',$out).'</ul>' : '';
+}
+
 /**
  * @param int $artistID
  * @param string $taxonomy
@@ -103,7 +141,8 @@
     if ($users === '') {
         $term = get_term($termID);
         $taxonomy = $term->taxonomy;
-        if (taxIsJVBContentTax($taxonomy)) {
+		$registrar = Registrar::getInstance($taxonomy);
+        if ($registrar->hasFeature('is_content')) {
             $posts = new WP_Query([
                 'post_type'    => jvbCheckBase($user),
                 'posts_per_page'    => -1,

--
Gitblit v1.10.0