From 46d681c6b825d21b3f698d793c4e630c687d90ad Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 21 May 2026 21:41:53 +0000
Subject: [PATCH] =Major CustomBlocks.php overhaul, expanding block support and customization from the editor. theme.json should now be updated on new themes to set brand colours, etc. Also note: major change to .col vs .row alignment: simplifying it to .top .bottom vs the confusion of the differences for .col/.row .start and .a-start

---
 inc/managers/CRUDManager.php |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/inc/managers/CRUDManager.php b/inc/managers/CRUDManager.php
index 7ad84df..c6b6266 100644
--- a/inc/managers/CRUDManager.php
+++ b/inc/managers/CRUDManager.php
@@ -1,6 +1,7 @@
 <?php
 namespace JVBase\managers;
 
+use JVBase\base\Site;
 use JVBase\registrar\Registrar;
 use JVBase\ui\CRUDSkeleton;
 
@@ -75,7 +76,12 @@
 			$this->skeleton->setCalendar();
 		}
 
-		$this->skeleton->setDefaultStatus();
+		if ($this->registrar && $this->registrar->getType() === 'post') {
+			$this->skeleton->setDefaultStatus();
+		} else {
+			$this->skeleton->setStatuses([]);
+		}
+
 
 		// Views
 		$this->skeleton
@@ -94,7 +100,7 @@
 		$this->skeleton->addCapabilities(['view', 'edit', 'create', 'delete']);
 
 		$plural = strtolower($this->registrar->getPlural() ?? $this->content . 's');
-		$canPublish = jvbUserIsVerified() && user_can($this->user_id, "publish_{$plural}");
+		$canPublish = $this->userIsVerified() && user_can($this->user_id, "publish_{$plural}");
 		$this->skeleton->userCanPublish($canPublish);
 
 		// Bulk actions
@@ -117,6 +123,11 @@
 		add_filter('jvbAdditionalActions', [$this, 'createItem']);
 	}
 
+	protected function userIsVerified():bool {
+		$membership = Site::membership();
+
+		return !($membership && $membership->has('member_verified')) || current_user_can('skip_moderation');
+	}
 	/**
 	 * Setup uploader configuration
 	 */
@@ -154,7 +165,7 @@
 	 * Initialize taxonomies from WordPress config
 	 */
 	protected function initTaxonomies(): void {
-		$this->taxonomies = $this->registrar->registrar->taxonomies;
+		$this->taxonomies = ($this->registrar->getType() === 'post') ? $this->registrar->registrar->taxonomies : [];
 	}
 
 	/**

--
Gitblit v1.10.0