From c348d35c7ecb6c74f71cf90b982412f267c5d807 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 10 Feb 2026 02:19:05 +0000
Subject: [PATCH] =minor fixes to schema system
---
inc/managers/SEO/ConfigManager.php | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/inc/managers/SEO/ConfigManager.php b/inc/managers/SEO/ConfigManager.php
index c66bba3..7fe9718 100644
--- a/inc/managers/SEO/ConfigManager.php
+++ b/inc/managers/SEO/ConfigManager.php
@@ -72,10 +72,35 @@
protected function getMetaFor(string $type): array
{
$default = $this->registry->getDefaultMetaValues();
+
+ // Check if content/taxonomy config has SEO meta defined
+ $configMeta = $this->getDefaultConfig($type, 'meta');
+ if (!empty($configMeta)) {
+ $configMeta = $this->normalizeMetaKeys($configMeta);
+ $default = array_merge($default, $configMeta);
+ }
+
return get_option($this->metaKey, $default);
}
/**
+ * Normalize content-defined meta keys to system keys
+ */
+ private function normalizeMetaKeys(array $meta): array
+ {
+ $map = [
+ 'title' => 'metaTitle',
+ 'description' => 'metaDescription',
+ ];
+
+ $normalized = [];
+ foreach ($meta as $key => $value) {
+ $normalized[$map[$key] ?? $key] = $value;
+ }
+ return $normalized;
+ }
+
+ /**
* Get default schema configuration for a type
*/
protected function getConfigFor(string $type): array
--
Gitblit v1.10.0