Jake Vanderwerf
2025-11-04 42fa8304ddb811b0f725f245130f70c0f5e86a6c
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();