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/forms/PostSelector.php |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/inc/forms/PostSelector.php b/inc/forms/PostSelector.php
index ee18b9a..5fa2026 100644
--- a/inc/forms/PostSelector.php
+++ b/inc/forms/PostSelector.php
@@ -1,7 +1,7 @@
 <?php
 namespace JVBase\forms;
 
-use JVBase\managers\CacheManager;
+use JVBase\managers\Cache;
 use WP_REST_Request;
 use WP_REST_Response;
 use WP_Query;
@@ -18,12 +18,12 @@
 {
 	protected string $post_type;
 	protected array $config;
-	protected CacheManager $cache;
+	protected Cache $cache;
 
 	public function __construct(string $post_type, array $config = [])
 	{
 		$this->post_type = $post_type;
-		$this->cache = new CacheManager('posts');
+		$this->cache = Cache::for(jvbNoBase($post_type), WEEK_IN_SECONDS)->connect('post', true);
 
 		$this->config = wp_parse_args($config, [
 			'multiple' => true,
@@ -48,9 +48,6 @@
 	 */
 	public function render(array $selected = [], string $containerId = ''): string
 	{
-		// Mark that selectors are present for footer output
-		TaxonomySelector::markSelectorsPresent();
-
 		// Process selected posts
 		$processedSelected = $this->processSelectedPosts($selected);
 
@@ -267,7 +264,7 @@
 	}
 
 	/**
-	 * Render post selector field for MetaForm integration
+	 * Render post selector field for Meta's Form integration
 	 *
 	 * @param string $name Field name
 	 * @param mixed $value Current value

--
Gitblit v1.10.0