From ba1e1ccf869b818f7a7a897264dfea05563a7796 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 07 Jun 2026 20:10:20 +0000
Subject: [PATCH] =Major overhaul of Integrations. Playing around with adding fields to post types through Registrar from an integrations' class file.

---
 inc/registrar/config/SEO.php |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/inc/registrar/config/SEO.php b/inc/registrar/config/SEO.php
index 7617b7b..5248bb7 100644
--- a/inc/registrar/config/SEO.php
+++ b/inc/registrar/config/SEO.php
@@ -33,7 +33,24 @@
 
 	protected function initSchema():void
 	{
-		if (!array_key_exists('type', $this->config['schema'])){
+		if (!array_key_exists('type', $this->config['schema'])) {
+			$registrar = Registrar::getInstance($this->slug);
+			if ($registrar) {
+				switch ($registrar->getType()) {
+					case 'term':
+						$this->config['schema']['type'] = 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage';
+						break;
+					case 'post':
+						$this->config['schema']['type'] = 'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork';
+						break;
+					case 'user':
+						$this->config['schema']['type'] = 'JVBase\managers\SEO\render\Thing\CreativeWork\WebPage\ProfilePage';
+						break;
+				}
+
+			}
+		}
+		if (!array_key_exists('type', $this->config['schema'])) {
 			error_log('Missing schema type');
 			return;
 		}

--
Gitblit v1.10.0