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/ui/Tabs.php | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/inc/ui/Tabs.php b/inc/ui/Tabs.php
index 2009727..909184a 100644
--- a/inc/ui/Tabs.php
+++ b/inc/ui/Tabs.php
@@ -48,7 +48,7 @@
return '';
}
- $header = '<nav class="tabs row start" role="tablist">';
+ $header = '<nav class="tabs row left" role="tablist">';
$content = '';
$i = 0;
@@ -63,26 +63,40 @@
$selected = ($i === 0) ? 'true' : 'false';
$hidden = $tab->isHidden() ? ' hidden' : '';
- $header .= '<button type="button" class="button tab' . $active . '" data-tab="' . $slug . '" role="tab" aria-selected="' . $selected . '"' . $hidden . '>
- <h2 class="row">';
+ $header .= sprintf(
+ '<button type="button" class="button tab%s" data-tab="%s" role="tab" aria-selected="%s"%s>',
+ $active,
+ $slug,
+ $selected,
+ $hidden
+ );
if ($tab->getIcon()) {
$header .= jvbIcon($tab->getIcon());
}
- $header .= $tab->getTitle() . '</h2>
- </button>';
+ $header .= sprintf('%s
+ </button>',
+ $tab->getTitle()
+ );
// Content
$ariaHidden = ($i === 0) ? 'false' : 'true';
- $content .= '<div class="tab-content' . $active . '" data-tab="' . $slug . '" role="tabpanel" aria-hidden="' . $ariaHidden . '"';
+ $content .= sprintf(
+ '<div class="tab-content%s" data-tab="%s" role="tabpanel" aria-hidden="%s"',
+ $active,
+ $slug,
+ $ariaHidden
+ );
if ($i !== 0) {
$content .= ' hidden';
}
- $content .= '>
- <h2>' . $tab->getTitle() . '</h2>';
+ $content .= sprintf('>
+ <h2>%s</h2>',
+ $tab->getTitle(),
+ );
// Description
if ($tab->getDescription()) {
@@ -96,8 +110,9 @@
}
}
- $content .= $tab->getContent() . '
- </div>';
+ $content .= sprintf('%s
+ </div>',
+ $tab->getContent());
$i++;
}
--
Gitblit v1.10.0