From 48721c85ebcfa973ee81719d2467ca80e4253dc9 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 01 May 2026 17:30:03 +0000
Subject: [PATCH] =Edmonton Ink hard test begins! Real testing of the managers and reset routes will commence. So far, just ensuring our classes are all loaded correctly: Site() and its sub-classes Membership, Login, etc. Care should be taken to load conditionally on 'init', as we finish defining most settings by 'plugins_loaded' at priority 5

---
 inc/admin/ContentTaxonomy.php |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/inc/admin/ContentTaxonomy.php b/inc/admin/ContentTaxonomy.php
index 5064df1..73476d4 100644
--- a/inc/admin/ContentTaxonomy.php
+++ b/inc/admin/ContentTaxonomy.php
@@ -5,7 +5,7 @@
 	exit;
 }
 
-use JVBase\registry\TaxonomyRegistrar;
+use JVBase\registrar\Registrar;
 use WP_Error;
 use Exception;
 
@@ -17,7 +17,7 @@
 {
     public function __construct()
     {
-		if (!jvbSiteHasTermContent()){
+		if (empty(Registrar::getFeatured('is_content', 'term'))){
 			return;
 		}
         add_filter(BASE.'handle_bulk_operation', [ $this, 'processOperation' ], 10, 3);
@@ -50,8 +50,8 @@
         // Handle individual taxonomy rebuild
         if (isset($_POST['rebuild_taxonomy']) && wp_verify_nonce($_POST['_wpnonce'], 'rebuild_taxonomy')) {
             $taxonomy = sanitize_text_field($_POST['taxonomy']);
-
-            if (isset(JVB_TAXONOMY[$taxonomy]) && (JVB_TAXONOMY[$taxonomy]['is_content'] ?? false)) {
+			$registrar = Registrar::getInstance($taxonomy);
+            if ($registrar && $registrar->hasFeature('is_content')) {
                 $results = $this->rebuildCustomTable($taxonomy);
                 // Store results in transient to display after redirect
                 set_transient('jvb_rebuild_results_' . $taxonomy, $results, 300); // 5 minutes
@@ -123,16 +123,17 @@
                     </tr>
                     </thead>
                     <tbody>
-                    <?php foreach (JVB_TAXONOMY as $slug => $config): ?>
-                        <?php if (!($config['is_content'] ?? false)) continue; ?>
-                        <?php
+                    <?php
+					$taxonomies = Registrar::getFeatured('is_content', 'term');
+					foreach ($taxonomies as $slug):
+						$registrar = Registrar::getInstance($slug);
                         $taxonomy = BASE . $slug;
                         $table_info = $this->getTableInfo($slug);
                         $term_count = wp_count_terms($taxonomy, ['hide_empty' => false]);
                         ?>
                         <tr>
                             <td>
-                                <strong><?= esc_html($config['plural'] ?? ucfirst($slug)) ?></strong><br>
+                                <strong><?= esc_html($registrar->getPlural()) ?></strong><br>
                                 <code><?= esc_html($taxonomy) ?></code>
                             </td>
                             <td>
@@ -314,8 +315,6 @@
      */
     public function rebuildCustomTable(string $taxonomy):array
     {
-        global $wpdb;
-
         $results = [
             'success' => 0,
             'errors' => 0,
@@ -324,11 +323,13 @@
         ];
 
         // Check if this is a content taxonomy
-        if (!(JVB_TAXONOMY[$taxonomy]['is_content'] ?? false)) {
+		$registrar = Registrar::getInstance($taxonomy);
+		if (!$registrar->hasFeature('is_content')) {
             $results['messages'][] = "Taxonomy {$taxonomy} is not a content taxonomy";
             return $results;
         }
 
+		global $wpdb;
         $table = $wpdb->prefix . BASE . 'content_' . $taxonomy;
 
         // Check if table exists

--
Gitblit v1.10.0