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.

---
 jvb.php |   37 ++++++-------------------------------
 1 files changed, 6 insertions(+), 31 deletions(-)

diff --git a/jvb.php b/jvb.php
index aee9ced..21bc092 100644
--- a/jvb.php
+++ b/jvb.php
@@ -11,7 +11,8 @@
 
 use JVBase\JVB;
 use JVBase\managers\IconsManager;
-use JVBase\utility\Checker;
+use JVBase\registrar\Registrar;
+
 use JVBase\utility\Features;
 
 //security
@@ -102,32 +103,12 @@
 
 
 require(JVB_DIR.'/base/_setup.php');
-//error_log('###############################################');
-//error_log('Registered Base');
-//error_log('###############################################');
-//error_log('BASE: '.print_r(BASE, true));
-//error_log('JVB_SITE: '.print_r(JVB_SITE, true));
-//error_log('JVB_OPTIONS: '.print_r(JVB_OPTIONS, true));
-//error_log('JVB_CONTENT: '.print_r(JVB_CONTENT, true));
-//error_log('JVB_TAXONOMY: '.print_r(JVB_TAXONOMY, true));
-//error_log('JVB_LOGIN: '.print_r(JVB_LOGIN, true));
-//error_log('JVB_MEMBERSHIP: '.print_r(JVB_MEMBERSHIP, true));
-//error_log('JVB_USER: '.print_r(JVB_USER, true));
-
 
 if (empty(JVB_SITE)) {
     return;
 }
 require(JVB_DIR.'/inc/utility/setup.php');
 require(JVB_DIR.'/checks.php');
-require(JVB_DIR.'/globals.php');
-
-$jvb_feed        = jvbGlobalFeedContent();
-$jvb_taxonomy_for= jvbGlobalTaxonomyFor();
-$jvb_responses     = jvbGlobalResponses();
-
-global $jvb_everything;
-$jvb_everything = array_merge(JVB_CONTENT, JVB_TAXONOMY);
 
 
 require(JVB_DIR . '/inc/registry/_setup.php');
@@ -237,7 +218,7 @@
     }
 }
 
-require(JVB_DIR . '/inc/users/UserSettings.php');
+//require(JVB_DIR . '/inc/users/UserSettings.php');
 
 
 require(JVB_DIR . '/inc/templates.php');
@@ -260,10 +241,6 @@
 }
 
 
-function checkIf(): Checker
-{
-	return JVBase\utility\Checker::getInstance();
-}
 
 require(JVB_DIR . '/inc/blocks/_setup.php');
 
@@ -320,9 +297,7 @@
 	if (Features::forSite()->has('favourites')) {
 		$interactions[] = 'favourites';
 	}
-	if (Features::anyContentHas('karma') ||
-		Features::anyTaxonomyHas('karma') ||
-		Features::anyUserHas('karma')) {
+	if (!empty(Registrar::getFeatured('karma'))) {
 		$interactions[] = 'karma';
 	}
 	if (Features::forSite()->has('notifications')) {
@@ -340,7 +315,7 @@
 	$queue = [
 		'api' => rest_url('jvb/v1/'),
 		'redirect' => get_home_url(null, '/login/'),
-		'labels' => jvbGetLabels(),
+		'labels' => Registrar::getLabels(),
 	];
 
     wp_localize_script('jvb-auth', 'jvbSettings', $queue);
@@ -378,7 +353,7 @@
 		}';
 	}
 
-	if (Features::anyContentHas('karma') || Features::anyTaxonomyHas('karma') || Features::anyUserHas('karma')) {
+	if (!empty(Registrar::getFeatured('karma'))) {
 		wp_enqueue_script('jvb-votes');
 		$initUserSettings .= '// Fetch user votes
         try {

--
Gitblit v1.10.0