From d7e7d248cbe41cd7a9ef9c2fb022b6c4831f99a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 31 May 2026 15:22:56 +0000
Subject: [PATCH] =jakevan complete
---
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