From e9967fa22781d922ba4eb8fb44fe72d200ac4b14 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 10 Nov 2025 21:04:10 +0000
Subject: [PATCH] =IconsManager.php update

---
 inc/meta/MetaManager.php |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/inc/meta/MetaManager.php b/inc/meta/MetaManager.php
index 7ed3bc6..f8081aa 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,10 @@
 
 	protected function getFields(): array
 	{
+		if (!empty($this->fields)) {
+			return $this->fields;
+		}
+		$type = false;
 		switch ($this->object_type) {
 			case 'post':
 				$type = get_post_type((int)$this->object_id);
@@ -515,6 +520,9 @@
 			case 'options':
 				return jvbGetFields('options');
 		}
+		if (!$type) {
+			return [];
+		}
 
 		return jvbGetFields($type, $this->object_type);
 	}
@@ -542,6 +550,7 @@
 
 	protected function getSections():array
 	{
+		$type = false;
 		switch ($this->object_type) {
 			case 'post':
 				$type = get_post_type((int)$this->object_id);
@@ -601,6 +610,11 @@
         }
     }
 
+	public function setFieldConfig(array $fields):void
+	{
+		$this->fields = $fields;
+	}
+
     protected function getFieldConfig(string $name):array|false
     {
         $fields = $this->getFields();
@@ -749,7 +763,7 @@
 		}
 
 
-		echo (jvbCheck('submit', $options)) ? '<button type="submit">'.jvbIcon('save').'Save</button>' : '';
+		echo (jvbCheck('submit', $options)) ? '<button type="submit">'.jvbIcon('floppy-disk').'Save</button>' : '';
 		echo '</form>';
 
         $out = ob_get_clean();
@@ -793,7 +807,7 @@
 				$out = '<p class="'.$name.'">'.jvbIcon('calendar').'<span></span></p>';
 				break;
 			case 'time':
-				$out = '<p class="'.$name.'">'.jvbIcon('time').'<time></time></p>';
+				$out = '<p class="'.$name.'">'.jvbIcon('clock').'<time></time></p>';
 				break;
 			case 'true_false':
 				$out = '<p class="'.$name.'"></p>';

--
Gitblit v1.10.0