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/registrar/helpers/MakeCalendarType.php | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/inc/registrar/helpers/MakeCalendarType.php b/inc/registrar/helpers/MakeCalendarType.php
index b7a68b8..c17f1ad 100644
--- a/inc/registrar/helpers/MakeCalendarType.php
+++ b/inc/registrar/helpers/MakeCalendarType.php
@@ -301,9 +301,8 @@
if ($post->post_type === $this->postType) {
$get = ['year', 'month','day'];
$values = Meta::forPost($post->ID)->getAll($get);
-
foreach ($values as $key => $value) {
- if (!empty($value)) {
+ if (!empty($value) && $value !== 0) {
$url = str_replace("%e$key%", $value, $url);
} else {
$url = str_replace("/%e$key%", '', $url);
--
Gitblit v1.10.0