From f0645f805ecdd19cf5ed9842f9e6b69a86dbcdeb Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 27 Aug 2026 15:28:09 +0000
Subject: [PATCH] =Notifications and routes minor cleanup. needs more work

---
 inc/rest/Rest.php |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/inc/rest/Rest.php b/inc/rest/Rest.php
index 4238e96..9cc7e14 100644
--- a/inc/rest/Rest.php
+++ b/inc/rest/Rest.php
@@ -491,6 +491,16 @@
 		return $cache->remember($userId, fn() => (bool) get_userdata($userId));
 	}
 
+	protected function checkArray(string $value, array $search, bool $lowercase = true):string|false
+	{
+		if ($lowercase) {
+			$value = strtolower($value);
+		}
+
+		return in_array($value, $search) ? $value : false;
+
+	}
+
 	/**
 	 * Check if term exists (cached)
 	 */

--
Gitblit v1.10.0