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/templates.php | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/inc/templates.php b/inc/templates.php
index 7e85162..319618e 100644
--- a/inc/templates.php
+++ b/inc/templates.php
@@ -1,4 +1,7 @@
<?php
+
+use JVBase\meta\Form;
+
if (!defined('ABSPATH')) {
exit;
}
@@ -10,7 +13,7 @@
{
return '<template class="response">
<details class="response" open>
- <summary class="row btw">
+ <summary class="row x-btw">
<div class="header">
</div>
@@ -31,25 +34,27 @@
*/
function jvbGetReplyToTemplate():string
{
- $meta = new JVBase\meta\MetaManager();
- ob_start();
- $meta->render('form', 'response', ['quill' => true, 'label'=>'Your Response']);
- $textarea = ob_get_clean();
- return '
+
+
+ $textarea = Form::render('response', null, ['type' => 'textarea','quill' => true, 'label'=>'Your Response']);
+ return sprintf('
<dialog class="create-response">
<div class="wrap col">
<h2>Write your Response</h2>
<div class="original"></div>
<div class="reply">
- '.$textarea.'
+ %s
</div>
<div class="actions row">
- <button type="button" class="cancel">'.jvbIcon('close', ['title'=>'Cancel']).'</button>
+ <button type="button" class="cancel">%s</button>
<button type="submit" class="create">Reply</button>
</div>
</div>
</dialog>
- ';
+ ',
+ $textarea,
+ jvbIcon('x', ['title'=>'Cancel'])
+ );
}
/**
@@ -60,7 +65,7 @@
{
return '<template class="responses">
<details class="responses">
- <summary class="row btw">
+ <summary class="row x-btw">
Comments
</summary>
</details>
@@ -86,8 +91,8 @@
<div class="upload-status">
<div class="upload-progress"></div>
</div>
- <button type="button" class="remove-preview" title="Remove Image">'.jvbIcon('delete').'</button>
- <button type="button" class="move-image" title="Reorder Image">'.jvbIcon('grab').'</button>
+ <button type="button" class="remove-preview" title="Remove Image">'.jvbIcon('trash').'</button>
+ <button type="button" class="move-image" title="Reorder Image">'.jvbIcon('dots-six-vertical').'</button>
</div>
</template>';
}
@@ -107,7 +112,7 @@
<h4>'.__('From:', 'jvb').'</h4>
<div class="source-info col">
<div class="source-day"></div>
- <div class="source-hours row start"></div>
+ <div class="source-hours row left"></div>
</div>
</div>
--
Gitblit v1.10.0