Jake Vanderwerf
2026-09-13 1aa7c404dae63c9518468fe9b579fad819f8d871
inc/registrar/Fields.php
@@ -437,37 +437,37 @@
      $business->setHasOfferCatalogField($this);
   }
   public function registerPostFields():void
   {
      $postType = $this->registrar->getBased();
      add_meta_box(
         $postType.'_fields',
         'Extra Fields',
         [$this, 'renderMyMetaBox'],
         $postType,
         'side',
         'high'
      );
   }
   public function renderMyMetaBox():void
   {
      $ID = get_the_ID();
      $meta = match ($this->type) {
         'post'   => Meta::forPost($ID),
         'term'   => Meta::forTerm($ID),
         'user'   => Meta::forUser($ID),
      };
      $defaults = array_keys(match($this->type) {
         'post'   => $this->defaultPostFields(),
         'term'   => $this->defaultTermFields(),
         'user'   => $this->defaultUserFields()
      });
      foreach ($this->fields as $fName => $field){
         if (!in_array($fName, $defaults)){
            echo Form::render($fName, $meta->get($fName),$field->getConfig());
         }
      }
   }
// public function registerPostFields():void
// {
//    $postType = $this->registrar->getBased();
//    add_meta_box(
//       $postType.'_fields',
//       'Extra Fields',
//       [$this, 'renderMyMetaBox'],
//       $postType,
//       'side',
//       'high'
//    );
// }
// public function renderMyMetaBox():void
// {
//    $ID = get_the_ID();
//    $meta = match ($this->type) {
//       'post'   => Meta::forPost($ID),
//       'term'   => Meta::forTerm($ID),
//       'user'   => Meta::forUser($ID),
//    };
//    $defaults = array_keys(match($this->type) {
//       'post'   => $this->defaultPostFields(),
//       'term'   => $this->defaultTermFields(),
//       'user'   => $this->defaultUserFields()
//    });
//    foreach ($this->fields as $fName => $field){
//       if (!in_array($fName, $defaults)){
//          echo Form::render($fName, $meta->get($fName),$field->getConfig());
//       }
//    }
// }
   public static function getUserFields():array
   {