Jake Vanderwerf
2026-01-06 2c955cebb5f1e01fbdb866b50d296fe9fbd852b8
inc/meta/MetaForm.php
@@ -1351,13 +1351,12 @@
    * Generic selector field renderer
    * Handles both taxonomy and post selectors with consistent structure
    */
   private function renderSelectorField(string $name, mixed $value, array $field, string $type): void
   public function renderSelectorField(string $name, mixed $value, array $field, string $type): void
   {
      $conditional = $this->handleConditionalField($field);
      $validationAttrs = $this->buildValidationAttributes($field);
      $describedBy = (!empty($field['description'])) ? ' aria-describedby="' . $name . '-help"' : '';
      $isSimple = (array_key_exists('mode', $field) && $field['mode']==='simple');
      // Parse selected values
      $value = (is_array($value)) ? array_filter(array_map('absint', $value)): $value;
      $selected = ($value === '') ? [] : (is_array($value) ? $value : explode(',', $value));
@@ -1408,9 +1407,10 @@
      }
      ?>
      <div class="field <?= esc_attr($type) ?> <?= esc_attr($name) ?>"
      <div class="field selector <?= esc_attr($type) ?> <?= esc_attr($name) ?>"
         <?= $conditional ?>
          data-field="<?= esc_attr($name) ?>"
          data-type="selector" data-subtype="<?= esc_attr($type)?>"
         <?= $validationAttrs ?>
         <?= $describedBy ?>>