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/blocks/FormBlock.php | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/inc/blocks/FormBlock.php b/inc/blocks/FormBlock.php
index 216857d..0d447da 100644
--- a/inc/blocks/FormBlock.php
+++ b/inc/blocks/FormBlock.php
@@ -3,7 +3,7 @@
use JVBase\managers\Cache;
use JVBase\meta\Form;
-use JVBase\utility\Features;
+use JVBase\base\Site;
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
@@ -34,10 +34,11 @@
public function __construct()
{
$this->cache = Cache::for('forms', WEEK_IN_SECONDS);
+
// Initialize forms from filter
$this->forms = $this->registerForms();
$this->form_contact = apply_filters('jvb_form_contact', '');
-
+
// Hook into the CustomBlocks render system
add_filter('jvb_render_block_jvb_forms', [$this, 'render'], 10, 2);
@@ -58,7 +59,7 @@
}
// Enqueue Turnstile if needed
- if (Features::forSite()->hasIntegration('cloudflare')) {
+ if (Site::hasIntegration('cloudflare')) {
$cloudflare = JVB()->connect('cloudflare');
if ($cloudflare->isSetUp()) {
$cloudflare->enqueueTurnstileScripts();
@@ -323,7 +324,7 @@
// Render navigation if multiple sections
if (count($sections) > 1) {
- echo '<nav class="tabs row start" role="tablist">';
+ echo '<nav class="tabs row left" role="tablist">';
$i = 1;
foreach ($sections as $slug => $section) {
$active_class = $i === 1 ? ' active' : '';
@@ -366,7 +367,7 @@
}
// Add step navigation buttons
- echo '<div class="step-navigation row btw">';
+ echo '<div class="step-navigation row x-btw">';
if ($i > 0) {
echo '<button type="button" class="button secondary prev-step" data-action="prev-step">';
@@ -401,7 +402,7 @@
*/
protected function renderTurnstile(): void
{
- if (!Features::hasIntegration('cloudflare')) {
+ if (!Site::hasIntegration('cloudflare')) {
return;
}
--
Gitblit v1.10.0