From 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 25 Aug 2026 22:57:22 +0000
Subject: [PATCH] =It's been a minute. I went through the Routes and associated Managers and ensured they played together well. Reworked the Cache.php, and I think I caught all the references. Moving away from JVBase() root class, to individuall classes that are Instanced. Double checked for the ABSPATH check in every file, and added index.php to every directory that didn't already have it. Also still working on the MenuBlock to work with WooCommerce for now for Northeh
---
inc/forms/PostSelector.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/inc/forms/PostSelector.php b/inc/forms/PostSelector.php
index 5fa2026..f6f564f 100644
--- a/inc/forms/PostSelector.php
+++ b/inc/forms/PostSelector.php
@@ -2,6 +2,7 @@
namespace JVBase\forms;
use JVBase\managers\Cache;
+use JVBase\managers\Roles;
use WP_REST_Request;
use WP_REST_Response;
use WP_Query;
@@ -23,7 +24,7 @@
public function __construct(string $post_type, array $config = [])
{
$this->post_type = $post_type;
- $this->cache = Cache::for(jvbNoBase($post_type), WEEK_IN_SECONDS)->connect('post', true);
+ $this->cache = Cache::for(jvbNoBase($post_type), 'post',WEEK_IN_SECONDS);
$this->config = wp_parse_args($config, [
'multiple' => true,
@@ -237,7 +238,7 @@
'methods' => 'GET',
'callback' => [new self('post'), 'searchPosts'],
'permission_callback' => function($request) {
- return JVB()->roles()->checkRole(get_current_user(), $request->get_param('post_type'));
+ return Roles::getInstance()()->checkRole(get_current_user(), $request->get_param('post_type'));
},
'args' => [
'post_type' => [
--
Gitblit v1.10.0