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/fields/Field.php |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/inc/registrar/fields/Field.php b/inc/registrar/fields/Field.php
index c1d5e33..9ab19c8 100644
--- a/inc/registrar/fields/Field.php
+++ b/inc/registrar/fields/Field.php
@@ -21,6 +21,10 @@
 	protected int $maxLength;			// of characters
 	protected int $min;
 	protected int $max;
+	/**
+	 * @var float $step For number fields. Indicates the amount the number increases/decreases with the plus/minus buttons
+	 */
+	protected float $step;
 	protected string $subtype;
 	protected array $condition;
 	protected array $allowedSubtype = ['text', 'url','number','tel','email','number'];
@@ -55,7 +59,7 @@
 
 		foreach ($config as $key => $value) {
 			if (property_exists($class, $key)) {
-				$method = 'set'.implode('',array_map('ucfirst',explode('_', $key)));;
+				$method = 'set'.implode('',array_map('ucfirst',explode('_', $key)));
 				$class->$method($value);
 			} else {
 //				error_log('Instance: '.print_r($class, true));
@@ -64,6 +68,11 @@
 		}
 	}
 
+	public function getName():string
+	{
+		return $this->name;
+	}
+
 	public function setDescription(string $description):void
 	{
 		$this->description = $description;
@@ -99,6 +108,10 @@
 	public function setHidden(bool $hidden):void{
 		$this->hidden = $hidden;
 	}
+	public function isHidden():bool
+	{
+		return $this->hidden;
+	}
 	public function setQuickEdit(bool $quickEdit):void{
 		$this->quickEdit = $quickEdit;
 	}
@@ -144,6 +157,14 @@
 	{
 		return $this->max??null;
 	}
+	public function setStep(float $step):void
+	{
+		$this->step = $step;
+	}
+	public function getStep():?float
+	{
+		return $this->step??null;
+	}
 	public function setMaxLength(int $maxLength):void
 	{
 		$this->maxLength = $maxLength;

--
Gitblit v1.10.0