From 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 25 Aug 2026 22:57:22 +0000
Subject: [PATCH] =It's been a minute. I went through the Routes and associated Managers and ensured they played together well. Reworked the Cache.php, and I think I caught all the references. Moving away from JVBase() root class, to individuall classes that are Instanced. Double checked for the ABSPATH check in every file, and added index.php to every directory that didn't already have it. Also still working on the MenuBlock to work with WooCommerce for now for Northeh

---
 base/SchemaHelper.php |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/base/SchemaHelper.php b/base/SchemaHelper.php
index 6a329d5..a3ea785 100644
--- a/base/SchemaHelper.php
+++ b/base/SchemaHelper.php
@@ -1,18 +1,22 @@
 <?php
 namespace JVBase\base;
+use JVBase\Instance;
 use JVBase\meta\Meta;
 use JVBase\registrar\config\seo\Resolver;
 use JVBase\registrar\Registrar;
-
+if (!defined('ABSPATH')) {
+	exit;
+}
 class SchemaHelper
 {
+	use Instance;
 	protected static array $allowedTypes;
 	protected static array $allowedFormats = ['schema', 'archive', 'meta', 'reference'];
 	protected static array $schemas = [];
 	protected static array $metas = [];
 	protected static array $archives = [];
 	protected static array $references = [];
-	public function __construct()
+	protected function __construct()
 	{
 		self::$allowedTypes = array_merge(['website', 'organization'], Registrar::getRegistered());
 	}
@@ -125,6 +129,7 @@
 			default => [],
 		};
 
+
 		$result = apply_filters(BASE.ucfirst($type).ucfirst($format).'Default', $defaults);
 		if ($format === 'reference' && empty($result)) {
 			$full = self::getDefault($type, 'schema');
@@ -274,6 +279,10 @@
 		$className = $config['type'];
 		unset($config['type']);
 		$class = new $className();
+		if (array_key_exists('id', $config)) {
+			$class->setId($config['id']);
+			unset($config['id']);
+		}
 
 
 		foreach ($config as $property => $value) {
@@ -294,4 +303,10 @@
 		}
 		return $class;
 	}
+
+	public static function reset(string $type, string $format):bool
+	{
+		$default = self::getDefault($type, $format);
+		return self::update($type, $format, $default);
+	}
 }

--
Gitblit v1.10.0