From c19264ac916707096fe294d996a1b7fb85206b34 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 08 Mar 2026 19:55:31 +0000
Subject: [PATCH] =Furthering along the complete refactor. Added some basic setup for is_content taxonomies, including a page for an archive of the terms.
---
inc/ui/CRUDSkeleton.php | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/inc/ui/CRUDSkeleton.php b/inc/ui/CRUDSkeleton.php
index c8eeda1..5bb76e4 100644
--- a/inc/ui/CRUDSkeleton.php
+++ b/inc/ui/CRUDSkeleton.php
@@ -216,14 +216,18 @@
*/
public function addTaxonomyFilter(array $taxonomies, ?string $limit = null): self {
foreach($taxonomies as $taxonomy) {
+ error_log('Fetchinig taxonomy: '.print_r($taxonomy, true));
$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;
@@ -977,7 +981,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;
?>
@@ -1624,7 +1629,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