From d7dbe7fee362d587dfc334135d9581b6216a4295 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 23 Nov 2025 04:13:56 +0000
Subject: [PATCH] =Timeline block, and feed block updated. DataStore.js refactored to not block rendering

---
 inc/rest/RestRouteManager.php |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/inc/rest/RestRouteManager.php b/inc/rest/RestRouteManager.php
index 96ccfb7..3d9b2a4 100644
--- a/inc/rest/RestRouteManager.php
+++ b/inc/rest/RestRouteManager.php
@@ -6,6 +6,7 @@
 use JVBase\managers\OperationQueue;
 use JVBase\managers\CacheManager;
 use JVBase\managers\NotificationManager;
+use JVBase\utility\Features;
 use WP_REST_Request;
 use WP_Error;
 use Exception;
@@ -36,7 +37,7 @@
     protected NotificationManager $notifications;
     protected string $cache_name ='';
     protected int $cache_ttl = 3600; //1 hour default
-
+	protected array $response_headers = [];
 
     // Error code constants for consistency
     const ERROR_MISSING_PARAMS = 'missing_parameters';
@@ -906,6 +907,19 @@
 		$lock_key = 'op_lock_' . md5($operation_key);
 		delete_transient($lock_key);
 	}
+
+	protected function verifyTurnstile(string $token): bool
+	{
+		if (!Features::hasIntegration('cloudflare') || !JVB()->connect('cloudflare')->isSetUp()) {
+			return true;
+		}
+
+		if (empty($token)) {
+			return false;
+		}
+
+		return JVB()->connect('cloudflare')->verifyTurnstile($token);
+	}
 }
 //
 //Simple example:

--
Gitblit v1.10.0