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/blocks/CustomBlocks.php |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/inc/blocks/CustomBlocks.php b/inc/blocks/CustomBlocks.php
index aa3cd91..2612fbd 100644
--- a/inc/blocks/CustomBlocks.php
+++ b/inc/blocks/CustomBlocks.php
@@ -1,14 +1,12 @@
 <?php
 namespace JVBase\blocks;
 
-use DateTime;
 use DOMDocument;
+use JVBase\Instance;
 use JVBase\managers\Cache;
-use JVBase\managers\LoginManager;
+use JVBase\managers\Login;
 use JVBase\managers\SEO\BreadcrumbManager;
-use JVBase\managers\SEO\render\Thing\CreativeWork\MediaObject\VideoObject;
 use JVBase\utility\Image;
-use JVBase\utility\Video;
 use WP_Block;
 use WP_Query;
 
@@ -18,6 +16,7 @@
 
 class CustomBlocks
 {
+	use Instance;
     protected Cache $cache;
 
 	protected static ?WP_Query $currentLoop = null;
@@ -31,11 +30,10 @@
 	protected static array $pendingClass = [];
 	protected static bool $renderGallery = false;
 
-    public function __construct()
+    private function __construct()
     {
-        $this->cache = Cache::for('blocks', WEEK_IN_SECONDS);
-		$this->cache->connect('post')->connect('taxonomy');
-		$this->cache->flush();
+//        $this->cache = Cache::for('blocks', null,WEEK_IN_SECONDS);
+
 		add_filter('pre_render_block', [$this, 'prerender'], 10, 3);
 		add_filter('render_block', [$this, 'render'], 10, 2);
 
@@ -113,6 +111,9 @@
 	protected function checkMethods(?string $content, array $block, ?WP_Block $parent = null, bool $isPrerender = false):?string
 	{
 		$blockName = $this->sanitizeBlockName($block);
+		if (str_starts_with($blockName, 'woocommerce')) {
+			return $content;
+		}
 
 		$base = ($isPrerender) ? 'prerender_' : 'render_';
 		$method = $base.$blockName;
@@ -135,6 +136,7 @@
 			//Ignore for both
 			$base = [
 				'core/null',
+				'core/pattern',
 				'core/list-item',
 				'core/post-content',
 				'jvb/drawer-menu',
@@ -820,8 +822,8 @@
 		}
 
 		if (array_key_exists('displayLoginAsForm', $attrs) && $attrs['displayLoginAsForm']) {
-			LoginManager::getInstance()->setAction($action);
-			return LoginManager::getInstance()->renderLoginForm($action, $redirect, '<h2>Login</h2>');
+			Login::getInstance()->setAction($action);
+			return Login::getInstance()->renderLoginForm($action, $redirect, '<h2>Login</h2>');
 
 		}
 

--
Gitblit v1.10.0