From 47e77f9fac1155c536b2b87fec552c7fcce66fa6 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 01 Jun 2026 18:06:34 +0000
Subject: [PATCH] =Timeline block fixes. Next up: adding article schema classes
---
inc/meta/Sanitizer.php | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/inc/meta/Sanitizer.php b/inc/meta/Sanitizer.php
index 869065d..218a1ac 100644
--- a/inc/meta/Sanitizer.php
+++ b/inc/meta/Sanitizer.php
@@ -14,7 +14,6 @@
public static function sanitize(mixed $value, array $field_config): mixed
{
$callback = static::getCallback($field_config);
-
if (is_array($callback)) {
return call_user_func([static::class, $callback[1]], $value, $field_config);
}
@@ -173,10 +172,13 @@
return $sanitized;
}
- protected static function sanitizeSelector(string $value, array $config):string
+ protected static function sanitizeSelector(string|array $value, array $config):string
{
- if (array_key_exists('type', $config)) {
- return match ($config['type']) {
+ if (is_array($value)) {
+ $value = implode(',', $value);
+ }
+ if (array_key_exists('subtype', $config)) {
+ return match ($config['subtype']) {
'user' => self::sanitizeUser($value, $config),
'taxonomy'=> self::sanitizeTaxonomy($value, $config),
'post' => self::sanitizePost($value, $config),
--
Gitblit v1.10.0