From 86c6cd3cc099d2480932ede03c12cea01e625c94 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 26 Apr 2026 21:56:28 +0000
Subject: [PATCH] =Requiring files based on Site class settings
---
inc/registrar/Fields.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/inc/registrar/Fields.php b/inc/registrar/Fields.php
index 7386cd7..e1e4928 100644
--- a/inc/registrar/Fields.php
+++ b/inc/registrar/Fields.php
@@ -121,7 +121,7 @@
'label' => 'Description',
]
];
- if ($this->registrar->args()['hierarchical']??false && $this->registrar->args()['hierarchical'] === true){
+ if ($this->registrar->args()['hierarchical']??false){
$fields['parent'] = [
'type' => 'taxonomy',
'isReference' => true,
@@ -166,8 +166,9 @@
public function modifyField(string $name, string $property, mixed $value):void
{
+ $property = 'set'.implode('',array_map('ucfirst',explode('_', $property)));
$field = $this->fields[$name];
- $field->$property = $value;
+ $field->$property($value);
}
public function getFields():array
--
Gitblit v1.10.0