From 86c6cd3cc099d2480932ede03c12cea01e625c94 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 26 Apr 2026 21:56:28 +0000
Subject: [PATCH] =Requiring files based on Site class settings

---
 inc/ui/CRUDSkeleton.php |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/inc/ui/CRUDSkeleton.php b/inc/ui/CRUDSkeleton.php
index c8eeda1..4e6d8ba 100644
--- a/inc/ui/CRUDSkeleton.php
+++ b/inc/ui/CRUDSkeleton.php
@@ -217,13 +217,16 @@
 	public function addTaxonomyFilter(array $taxonomies, ?string $limit = null): self {
 		foreach($taxonomies as $taxonomy) {
 			$registrar = Registrar::getInstance($taxonomy);
-			$this->taxonomies[$taxonomy] = [
-				'type'	=> 'taxonomy',
-				'taxonomy'=> $taxonomy,
-				'limit'	=> $limit,
-				'label'	=> $registrar->getPlural(),
-				'icon'	=> $registrar->getIcon()
-			];
+
+			if ($registrar) {
+				$this->taxonomies[$taxonomy] = [
+					'type'	=> 'taxonomy',
+					'taxonomy'=> $taxonomy,
+					'limit'	=> $limit,
+					'label'	=> $registrar->getPlural(),
+					'icon'	=> $registrar->getIcon()
+				];
+			}
 		}
 
 		return $this;
@@ -898,7 +901,7 @@
 		if ($limit) {
 			if ($limit === 'user') {
 				$manager = new UserTermsManager();
-				return $manager->getUserTerms($this->user_id, $taxonomy);
+				return $manager->fetchUserTerms($this->user_id, $taxonomy);
 			} else {
 				$limit = (int)$limit;
 			}
@@ -977,7 +980,8 @@
 					<option value="<?=$control?>"<?=$disabled?>><?=$label?></option>
 					<?php
 				}
-				foreach ($this->taxonomies as $taxonomy) {
+
+				foreach ($this->taxonomies as $taxonomy =>$config) {
 					$registrar = Registrar::getInstance($taxonomy);
 					if (!$registrar) continue;
 					?>
@@ -1550,7 +1554,10 @@
 			<input type="hidden" name="content" value="<?=$this->dataType?>" />
 			<div class="fields">
 				<?php
-				echo Form::render('post_status', '', $this->getStatusFieldConfig('edit-'));
+				if (!empty($this->statuses)) {
+					echo Form::render('post_status', '', $this->getStatusFieldConfig('edit-'));
+				}
+
 
 
 				if (!empty($this->sections)) {
@@ -1624,7 +1631,6 @@
 						$section = (array_key_exists('section', $config)) ? $config['section'] : 'basic';
 						$tabs[$section]['content'] .= Form::render($n, '', $config);
 					} else {
-						jvbDump($config, $n);
 						echo Form::render($n, '', $config);
 					}
 				}

--
Gitblit v1.10.0