From ba1e1ccf869b818f7a7a897264dfea05563a7796 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 07 Jun 2026 20:10:20 +0000
Subject: [PATCH] =Major overhaul of Integrations. Playing around with adding fields to post types through Registrar from an integrations' class file.
---
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