From 772462eeca3002a1d52508aeba485aab2b4742ad Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 03 Mar 2026 19:06:19 +0000
Subject: [PATCH] =MAJOR OVERHAUL. Likely should have made a new branch ages ago. Key changes: Registrar.php is the base for custom post types, taxonomies, and user roles. Replaces JVB_CONTENT, JVB_TAXONOMY, and JVB_USER constants, eliminates most of Features.php (except for JVB_SITE, JVB_MEMBERSHIP), and has built in sanitizing and validation via sub-classes. Also started a major overhaul of the Schema output. Created a shit ton of property traits and classes to help sanitize and ensure proper data for different schema types. Still a bunch to do, but better to be starting committing changes here on this other branch.
---
inc/utility/Checker.php | 47 +----------------------------------------------
1 files changed, 1 insertions(+), 46 deletions(-)
diff --git a/inc/utility/Checker.php b/inc/utility/Checker.php
index 90804fa..2cb420f 100644
--- a/inc/utility/Checker.php
+++ b/inc/utility/Checker.php
@@ -5,6 +5,7 @@
exit;
}
/**
+ * @deprecated Use Registrar.php directly
* Centralized registry for all content types, taxonomies, and user roles
* Provides a single source of truth and caching layer
*/
@@ -39,9 +40,6 @@
private function initialize(): void
{
// Build initial caches
- $this->buildContentCache();
- $this->buildTaxonomyCache();
- $this->buildUserRoleCache();
$this->buildRelationships();
// Set up WordPress hooks for cache invalidation
@@ -151,49 +149,6 @@
};
}
- /**
- * Build content type cache
- */
- private function buildContentCache(): void
- {
- $this->cache[self::CACHE_CONTENT] = JVB_CONTENT;
-
- // Add computed properties
- foreach ($this->cache[self::CACHE_CONTENT] as $slug => &$config) {
- $config['_slug'] = $slug;
- $config['_post_type'] = BASE . $slug;
- $config['_supports_dashboard'] = $this->computesDashboardSupport($config);
- $config['_is_user_type'] = $this->computesUserType($config);
- }
- }
-
- /**
- * Build taxonomy cache
- */
- private function buildTaxonomyCache(): void
- {
- $this->cache[self::CACHE_TAXONOMIES] = JVB_TAXONOMY;
-
- foreach ($this->cache[self::CACHE_TAXONOMIES] as $slug => &$config) {
- $config['_slug'] = $slug;
- $config['_taxonomy'] = BASE . $slug;
- $config['_is_hierarchical'] = $config['hierarchical'] ?? true;
- }
- }
-
- /**
- * Build user role cache
- */
- private function buildUserRoleCache(): void
- {
- $this->cache[self::CACHE_USER_ROLES] = JVB_USER;
-
- foreach ($this->cache[self::CACHE_USER_ROLES] as $slug => &$config) {
- $config['_slug'] = $slug;
- $config['_role'] = BASE . $slug;
- $config['_creatable_content'] = $this->extractCreatableContent($config);
- }
- }
/**
* Build relationships between types
--
Gitblit v1.10.0