From a9b3b28d001941921aa70d37fdc87c758a163a44 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 05 Jun 2026 16:47:03 +0000
Subject: [PATCH] =Some hefty changes to FeedBlock. Transitioning to loading first page in php to save on extra requests. Got a bit to do yet, but I have to work on Northeh for a bit here.
---
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