Jake Vanderwerf
2026-09-13 1aa7c404dae63c9518468fe9b579fad819f8d871
inc/registrar/helpers/AddCustomFields.php
@@ -23,7 +23,7 @@
   {
      switch ($this->registrar->getType()) {
         case 'post':
            add_action('save_post', [$this, 'checkPostFields']);
            add_action('save_post', [$this, 'checkPostFields'], 10, 2);
            add_action('enqueue_block_editor_assets', [$this, 'enqueue']);
            break;
         case 'term':
@@ -92,11 +92,13 @@
            ? $this->determineSchema($config)
            : true;
         $schema = is_array($rawSchema) ? $this->schema($rawSchema) : $rawSchema;
         //Allow for null
         if ($metaType === 'object') {
            $metaType = ['object', 'null'];
            $rawSchema['type'] = ['object', 'null'];
         }
         $schema = is_array($rawSchema) ? $this->schema($rawSchema) : $rawSchema;
         register_post_meta($this->registrar->getBased(), jvbCheckBase($name), [
            'single'            => true,
            'type'              => $metaType,
@@ -104,7 +106,6 @@
            'sanitize_callback' => fn($value) => (Sanitizer::sanitize($value, $config)),
            'auth_callback'     => fn($allowed, $key, $postID) => current_user_can('edit_post', $postID),
            'show_in_rest'      => $schema,
            'revisions_enabled' => true,
         ]);
      }
   }