From 88d9e0e2b7997eb0c96dc737082c91b4e3f7ca6e Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 17 Jun 2026 15:10:37 +0000
Subject: [PATCH] =Fixed for single image upload fields populating the image meta. Need to check galleries now.
---
inc/registrar/config/Section.php | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/inc/registrar/config/Section.php b/inc/registrar/config/Section.php
index d5d6c51..10ac615 100644
--- a/inc/registrar/config/Section.php
+++ b/inc/registrar/config/Section.php
@@ -13,11 +13,10 @@
protected string $description = '';
protected string $icon = '';
protected array $fields = [];
- protected Registrar $registrar;
+ private Registrar $registrar;
- public function __construct(string $title, Registrar $registrar) {
- $this->title = $title;
- $this->slug = sanitize_title($title);
+ public function __construct(string $slug, Registrar $registrar) {
+ $this->slug = sanitize_title($slug);
$this->registrar = $registrar;
}
@@ -27,7 +26,7 @@
}
public function getTitle():string
{
- return $this->title;
+ return $this->title ?? ucwords(implode(' ', explode('-', $this->slug)));
}
public function setDescription(string $description):self
@@ -45,6 +44,10 @@
$this->icon = $icon;
return $this;
}
+ public function getIcon():string
+ {
+ return $this->icon;
+ }
protected function checkFields(string|array $fields):string|array
{
--
Gitblit v1.10.0