From ad052f72a6c994dfb2fe0aa11970c9d110564004 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 10 Feb 2026 17:50:45 +0000
Subject: [PATCH] =Fix for FAQpage schema not outputting correctly, as well as Form.php status radios and editForm on CRUDSkeleton.php
---
inc/managers/SEO/SchemaFieldHelpers.php | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/inc/managers/SEO/SchemaFieldHelpers.php b/inc/managers/SEO/SchemaFieldHelpers.php
index a4bf981..e3d544c 100644
--- a/inc/managers/SEO/SchemaFieldHelpers.php
+++ b/inc/managers/SEO/SchemaFieldHelpers.php
@@ -981,6 +981,26 @@
return $formatted;
}
+
+ /**
+ * Build a JSON-LD @id reference
+ * String → ['@id' => $value], array with @id → pass through
+ */
+ public static function reference(mixed $value): array|string
+ {
+ if (is_array($value) && isset($value['@id'])) {
+ return $value;
+ }
+
+ if (is_string($value) && !empty($value)) {
+ return ['@id' => $value];
+ }
+
+ return $value;
+ }
+
+
+
/**
* Build SiteNavigationElement array from navigation items
*/
--
Gitblit v1.10.0