From 48721c85ebcfa973ee81719d2467ca80e4253dc9 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 01 May 2026 17:30:03 +0000
Subject: [PATCH] =Edmonton Ink hard test begins! Real testing of the managers and reset routes will commence. So far, just ensuring our classes are all loaded correctly: Site() and its sub-classes Membership, Login, etc. Care should be taken to load conditionally on 'init', as we finish defining most settings by 'plugins_loaded' at priority 5
---
inc/registrar/config/Section.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/inc/registrar/config/Section.php b/inc/registrar/config/Section.php
index 15e2def..d5d6c51 100644
--- a/inc/registrar/config/Section.php
+++ b/inc/registrar/config/Section.php
@@ -13,10 +13,12 @@
protected string $description = '';
protected string $icon = '';
protected array $fields = [];
+ protected Registrar $registrar;
- public function __construct(string $title) {
+ public function __construct(string $title, Registrar $registrar) {
$this->title = $title;
$this->slug = sanitize_title($title);
+ $this->registrar = $registrar;
}
public function setTitle(string $title): self {
@@ -46,7 +48,7 @@
protected function checkFields(string|array $fields):string|array
{
- $allFields = Registrar::getInstance($this->slug)->getFields();
+ $allFields = $this->registrar->getFields();
if (is_array($fields)){
foreach ($fields as $index =>$fieldName){
if (!array_key_exists($fieldName, $allFields)){
--
Gitblit v1.10.0