From 32ce5c542c90be348895328078e392dde2052957 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 04 Sep 2026 19:15:16 +0000
Subject: [PATCH] =Working at adding defined fields to a dedicated panel in the gutenberg editor. Registrar now has AddCustomFields.php, which currently only supports post fields. Added a @wordpress/plugins base _meta/fields in /build and /src that successfully creates a panel. Next steps: determine sections and fields, group fields by section (each section to a panel), and save output
---
inc/blocks/CustomBlocks.php | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/inc/blocks/CustomBlocks.php b/inc/blocks/CustomBlocks.php
index 2443f94..7650d91 100644
--- a/inc/blocks/CustomBlocks.php
+++ b/inc/blocks/CustomBlocks.php
@@ -111,7 +111,8 @@
protected function checkMethods(?string $content, array $block, ?WP_Block $parent = null, bool $isPrerender = false):?string
{
$blockName = $this->sanitizeBlockName($block);
- if (str_starts_with($blockName, 'woocommerce')) {
+
+ if (str_starts_with($blockName, 'woocommerce') ) {
return $content;
}
@@ -2304,6 +2305,10 @@
), jvbSearch($placeholder, uniqid(), $label, $buttonText, $isInside, $hideInput));
}
//core_shortcode
+ public function prerender_core_shortcode(array $block, ?string $content, ?WP_Block $parent):?string
+ {
+ return do_shortcode($block['innerHTML']??'');
+ }
public function prerender_core_social_link(array $block, ?string $content, ?WP_Block $parent):?string
{
// jvbDump($block, 'social link');
@@ -2447,7 +2452,6 @@
}
$content = '';
foreach ($block['innerBlocks'] as $b) {
-
$rendered = $parent
? $this->checkMethods(null, $b, $parent, true)
: render_block($b);
--
Gitblit v1.10.0