From 07282da9671de8fb2601e9e641decb2655439ad8 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 23:20:54 +0000
Subject: [PATCH] =FeedRoutes.php: fixed the extractTaxonomies method

---
 JVBase.php |   94 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 71 insertions(+), 23 deletions(-)

diff --git a/JVBase.php b/JVBase.php
index e6fe838..0b63b08 100644
--- a/JVBase.php
+++ b/JVBase.php
@@ -1,13 +1,21 @@
 <?php
 namespace JVBase;
 
+use JVBase\blocks\CustomBlocks;
 use JVBase\integrations\BlueSky;
+use JVBase\managers\CacheManager;
+use JVBase\managers\EmailManager;
 use JVBase\managers\ErrorHandler;
+use JVBase\managers\LoginManager;
+use JVBase\managers\MagicLinkManager;
 use JVBase\managers\OperationQueue;
 use JVBase\managers\DashboardManager;
+use JVBase\managers\DirectoryManager;
 use JVBase\managers\ReferralManager;
 use JVBase\managers\RoleManager;
-use JVBase\managers\SchemaManager;
+//use JVBase\managers\SchemaManager;
+use JVBase\managers\SEO\SchemaOutputManager;
+use JVBase\managers\SEO\SEOAdminPage;
 use JVBase\managers\AdminPages;
 use JVBase\managers\NotificationManager;
 use JVBase\managers\UserTermsManager;
@@ -21,9 +29,11 @@
 use JVBase\rest\routes\BioRoutes;
 use JVBase\rest\routes\SettingsRoutes;
 use JVBase\rest\routes\ShopRoutes;
+use JVBase\rest\routes\SEORoutes;
 use JVBase\rest\routes\QueueRoutes;
 use JVBase\rest\routes\ErrorRoutes;
 use JVBase\rest\routes\FormRoutes;
+use JVBase\rest\routes\LoginRoutes;
 use JVBase\rest\routes\NewsRoutes;
 use JVBase\rest\routes\ReferralRoutes;
 use JVBase\rest\routes\MagicLinkRoutes;
@@ -49,6 +59,7 @@
 	protected array $integrations = [];
     protected array $blocks = [];
     protected array $routes = [];
+	protected CustomBlocks $customBlocks;
 
 	protected array $serviceMap = [
 		'maps' => 'JVBase\integrations\GoogleMaps',
@@ -60,6 +71,7 @@
 		'gmb' => 'JVBase\integrations\GoogleMyBusiness',
 		'cloudflare' => 'JVBase\integrations\Cloudflare',
 		'umami' => 'JVBase\integrations\Umami',
+		'postmark' => 'JVBase\integrations\PostMark',
 	];
 
     public static function getInstance():JVB
@@ -73,21 +85,34 @@
 
     public function __construct()
     {
+		$this->customBlocks = new CustomBlocks();
         $this->managers = [
             'errors'        => new ErrorHandler(),
             'queue'         => new OperationQueue(),
 //            'dash'          => new DashboardManager(),
             'roles'         => new RoleManager(),
 //            'forms'         => new FormManager(),
-            'schema'        => new SchemaManager(),
+            'schema'        => new SchemaOutputManager(),
             'admin'         => new AdminPages(),
+			'seoAdmin'		=> new SEOAdminPage(),
 //			'uploads'		=> new UploadManager(),
 			'userTerms'		=> new UserTermsManager(),
+			'email'			=> new EmailManager(),
         ];
 
+		$this->routes = [
+			'login'			=> new LoginRoutes(),
+			'integrations'	=> new IntegrationsRoutes(),
+			'seo'  			=> new SEORoutes(),
+			'queue'  		=> new QueueRoutes(),
+			'settings'		=> new SettingsRoutes(),
+			'upload' 		=> new UploadRoutes(),
+			'forms'			=> new FormRoutes()
+		];
 
 		if (Features::forSite()->has('magicLink')) {
 			$this->routes['magicLink'] = new MagicLinkRoutes();
+			$this->managers['magicLink'] = new MagicLinkManager();
 		}
 		if (Features::forSite()->has('referrals')) {
 			$this->managers['referral'] = new ReferralManager();
@@ -102,24 +127,23 @@
 			$this->routes['square'] = new IntegrationsSquareRoutes();
 		}
 
-        $this->routes = [
-			'integrations'	=> new IntegrationsRoutes(),
-		];
-        if (jvbSiteUsesFeedBlock()) {
+        if (Features::forSite()->has('feed_block')) {
             $this->routes['feed'] = new FeedRoutes();
         }
         if (jvbSiteHasNotifications()) {
 			$this->managers['notifications'] = new NotificationManager();
             $this->routes['notifications'] = new NotificationsRoutes();
         }
-        if (jvbSiteUsesFeedBlock() || jvbSiteHasDashboard()) {
+        if (Features::forSite()->has('feed_block') || jvbSiteHasDashboard()) {
             $this->routes['term'] = new TermRoutes();
         }
 
+		if (Features::forSite()->has('is_directory')) {
+			$this->managers['directory'] = new DirectoryManager();
+		}
+
+
         if (jvbSiteHasDashboard()) {
-            $this->routes['upload'] = new UploadRoutes();
-            $this->routes['settings']= new SettingsRoutes();
-            $this->routes['queue']  = new QueueRoutes();
             $this->routes['error']  = new ErrorRoutes();
             $this->routes['admin']  = new AdminRoutes();
             $this->routes['content']= new ContentRoutes();
@@ -127,7 +151,6 @@
             $this->routes['shop']   = new ShopRoutes();
             $this->routes['options']= new OptionsRoutes();
         }
-		$this->routes['forms']= new FormRoutes();
 
         if (jvbSiteHasFavourites()) {
             $this->routes['favourites'] = new FavouritesRoutes();
@@ -179,11 +202,15 @@
     {
         return array_merge(array_keys($this->content), array_keys($this->taxonomies));
     }
-    public function dashboard()
+    public function dashboard():DashboardManager|false
     {
-        return $this->managers['dash'];
+        return $this->managers['dash']??false;
     }
-    public function error()
+	public function directories():DirectoryManager|false
+	{
+		return $this->managers['directory']??false;
+	}
+    public function error():ErrorHandler
     {
         return $this->managers['errors'];
     }
@@ -191,11 +218,11 @@
     {
         return $this->managers['file'];
     }
-    public function cache()
+    public function cache():CacheManager
     {
         return $this->managers['cache'];
     }
-    public function queue()
+    public function queue():OperationQueue
     {
         return $this->managers['queue'];
     }
@@ -203,9 +230,9 @@
 //    {
 //        return $this->managers['forms'];
 //    }
-    public function notification()
+    public function notification():NotificationManager|false
     {
-        return $this->managers['notifications'];
+        return $this->managers['notifications']??false;
     }
     public function routes($route):mixed
     {
@@ -214,7 +241,7 @@
         }
         return false;
     }
-    public function roles()
+    public function roles():RoleManager
     {
         return $this->managers['roles'];
     }
@@ -222,10 +249,14 @@
     {
         return $this->managers['admin'];
     }
+	public function seoAdmin()
+	{
+		return $this->managers['seoAdmin'];
+	}
 
     public function getFields($type):array
     {
-        $content = JVB_CONTENT[$type]??JVB_TAXONOMY[$type]??JVB_USER[$type]??null;
+        $content = JVB_CONTENT[$type]??JVB_TAXONOMY[$type]??JVB_USER[$type]??[];
         return $content['fields']??[];
     }
     public function getContent($type):mixed
@@ -259,7 +290,6 @@
 
     public function activate():void
     {
-        error_log('Activate!');
         // Activate roles - will be properly initialized after post types are registered
         $this->roles()->activate();
     }
@@ -269,13 +299,26 @@
 		$this->routes[$slug] = $class;
 	}
 
-	public function referrals():ReferralManager
+	public function email():EmailManager
 	{
-		return $this->managers['referral'];
+		return $this->managers['email'];
+	}
+
+	public function referrals():ReferralManager|false
+	{
+		return $this->managers['referral']??false;
+	}
+
+	public function magicLink():MagicLinkManager|false
+	{
+		return $this->managers['magicLink']??false;
 	}
 
 	public function additionalActions():void
 	{
+		if (LoginManager::isLogin()) {
+			return;
+		}
 		$extras = apply_filters('jvbAdditionalActions', []);
 		$extras = array_filter($extras, function ($extra) {
 			return is_array($extra) && array_key_exists('button', $extra) && array_key_exists('content', $extra);
@@ -303,4 +346,9 @@
 			<?php
 		}
 	}
+
+	public function blocks():CustomBlocks|bool
+	{
+		return $this->customBlocks??false;
+	}
 }

--
Gitblit v1.10.0