From e729f920139f0c65902be2d6b2c32466b08375e8 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 20 Oct 2025 17:54:52 +0000
Subject: [PATCH] =Form updates
---
inc/meta/MetaManager.php | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/inc/meta/MetaManager.php b/inc/meta/MetaManager.php
index 7ed3bc6..e4644f2 100644
--- a/inc/meta/MetaManager.php
+++ b/inc/meta/MetaManager.php
@@ -19,6 +19,7 @@
public MetaForm $form;
protected int|null $object_id;
public object|null $data;
+ protected array $fields =[];
protected string $field;
protected mixed $value;
protected string|null $object_type;
@@ -502,6 +503,9 @@
protected function getFields(): array
{
+ if (!empty($this->fields)) {
+ return $this->fields;
+ }
switch ($this->object_type) {
case 'post':
$type = get_post_type((int)$this->object_id);
@@ -601,6 +605,11 @@
}
}
+ public function setFieldConfig(array $fields):void
+ {
+ $this->fields = $fields;
+ }
+
protected function getFieldConfig(string $name):array|false
{
$fields = $this->getFields();
--
Gitblit v1.10.0