Jake Vanderwerf
2026-09-06 eef16f5a0f5af0aea313e411534643678ba4bea1
inc/registrar/helpers/AddCustomFields.php
@@ -35,7 +35,7 @@
      wp_enqueue_script(
         'jvb-editor-fields',
         JVB_URL.'/build/_meta/fields.js',
         JVB_URL.'build/_meta/fields.js',
         $asset['dependencies'],
         $asset['version'],
         true
@@ -44,13 +44,21 @@
      wp_add_inline_script(
         'jvb-editor-fields',
         'window.jvbFieldConfig = '.wp_json_encode([
            'postType' => $this->registrar->getBased(),
            'fields'   => array_map(function($f) {
               $f['name'] = jvbCheckBase($f['name']);
               $f['id'] = jvbCheckBase($f['name']);
               if ($f['type'] === 'selector') {
                  $f['taxonomy'] = jvbCheckBase($f['taxonomy']);
               }
               return $f;
            },array_values($this->registrar->getFields(false))),
            'sections'  => $this->registrar->getSections(),
            'base'  => BASE
            'sections'  => array_map(function ($s) {
               $s['id'] = jvbCheckBase($s['slug']);
               $s['fields'] = array_map(function ($f) {
                  return jvbCheckBase($f);
               }, $s['fields']);
               return $s;
            },$this->registrar->getSections()),
         ]).';',
         'before'
      );