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
---
base/Options.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/base/options.php b/base/Options.php
similarity index 95%
rename from base/options.php
rename to base/Options.php
index ed3fa19..1eb2092 100644
--- a/base/options.php
+++ b/base/Options.php
@@ -17,7 +17,7 @@
class Options {
- protected static Options $instance;
+ protected static options $instance;
protected array $resetFields = [];
protected string $resetInterval = 'daily';
protected Fields $fields;
@@ -31,7 +31,7 @@
}
}
- public static function getInstance():Options {
+ public static function getInstance():options {
if (!isset(self::$instance)) {
self::$instance = new self();
do_action('jvb_define_options');
@@ -90,13 +90,13 @@
return $this->fields;
}
- public function getConfig(string $fieldName):array
+ public function getConfig(string $fieldName):?array
{
$allFields = $this->fields->getFields();
if (array_key_exists($fieldName, $allFields)) {
return $allFields[$fieldName]->getConfig();
}
- return [];
+ return null;
}
public function resetOptions():void
--
Gitblit v1.10.0