From 56a9a1ccf764ff7a6af8f8a2292cb07443cb4aa7 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 28 May 2026 18:19:57 +0000
Subject: [PATCH] =New Gitbit setpu

---
 inc/registrar/config/seo/Schema.php |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/inc/registrar/config/seo/Schema.php b/inc/registrar/config/seo/Schema.php
index 6b01794..6e67534 100644
--- a/inc/registrar/config/seo/Schema.php
+++ b/inc/registrar/config/seo/Schema.php
@@ -23,6 +23,7 @@
 
 	protected array $properties = [];
 	protected array $referenceProperties = [];
+	protected array $extras = [];
 	protected array $defaultReference = [
 		'name'	=> '{{post_title}}',
 		'url'	=> '{{post_permalink}}',
@@ -67,6 +68,8 @@
 			}
 			$this->defaultArchive['description'] = '{{registrar.'.$slug.'.description}}';
 		}
+
+		$this->extras = apply_filters(BASE.ucfirst($slug).'Extras', []);
 		$this->initFilters();
 		$this->registerHooks();
 	}
@@ -295,6 +298,7 @@
 					$class->setMainEntity($itemList);
 
 					$schema = $class->outputSchema();
+
 					if (JVB_TESTING) {
 //						error_log('Generated archive schema: '.print_r($schema, true));
 					}
@@ -659,4 +663,20 @@
 		$page->setMainEntity($termset);
 		return $page->outputSchema();
 	}
+
+	public function extra():array
+	{
+		if (empty($this->extras)) {
+			return [];
+		}
+		$out = [];
+		foreach ($this->extras as $config) {
+			$schema = SchemaHelper::classFromConfig($config);
+			$output = $schema->outputSchema();
+			if (!empty($output)) {
+				$out[] = $output;
+			}
+		}
+		return $out;
+	}
 }

--
Gitblit v1.10.0