From 01e9a8e40351a87f6548a4f55de842d6f6918ad0 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 15 Sep 2026 02:44:28 +0000
Subject: [PATCH] =Found little glitch with auto-adding rewrite rules to taxonomy Registrar instances where we have the post type as the base in the url rewrite

---
 base/Options.php |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/base/Options.php b/base/Options.php
index 1eb2092..5000c5c 100644
--- a/base/Options.php
+++ b/base/Options.php
@@ -17,7 +17,7 @@
 
 
 class Options {
-	protected static options $instance;
+	protected static Options $instance;
 	protected array $resetFields = [];
 	protected string $resetInterval = 'daily';
 	protected Fields $fields;
@@ -93,6 +93,11 @@
 	public function getConfig(string $fieldName):?array
 	{
 		$allFields = $this->fields->getFields();
+		if (str_contains($fieldName, '|')) {
+			$fieldName = strtok($fieldName, '|');
+		}elseif(str_contains($fieldName, ':')) {
+			$fieldName = strtok($fieldName, ':');
+		}
 		if (array_key_exists($fieldName, $allFields)) {
 			return $allFields[$fieldName]->getConfig();
 		}
@@ -119,10 +124,10 @@
 		return self::$values[$fieldName];
 	}
 
-	public static function getAll():array
+	public static function getAll(array $fields = []):array
 	{
 		$meta = Meta::forOptions();
-		return $meta->getAll();
+		return $meta->getAll($fields);
 	}
 	public static function delete(string $fieldName):void
 	{
@@ -171,4 +176,9 @@
 			$this->fields->getFields()
 		);
 	}
+
+	public static function clear():void
+	{
+		self::$values = [];
+	}
 }

--
Gitblit v1.10.0