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

---
 base/Site.php |   79 ++++++++++++++++++++++++---------------
 1 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/base/Site.php b/base/Site.php
index dfdff4d..e082012 100644
--- a/base/Site.php
+++ b/base/Site.php
@@ -14,11 +14,21 @@
 	protected static Membership $membershipConfig;
 	protected static Site $instance;
 	protected static string $icons = 'regular';
+	/**
+	 * @var array Dashboard  config
+	 */
+	protected static string $dashboardTitle;
 
 	/**
 	 * @var bool $is_directory Whether this is a membership directory
 	 */
 	protected static bool $is_directory = false;
+	protected static string $directory_singular;
+	protected static string $directory_plural;
+	/**
+	 * @var bool Whether to add a help menu to the header
+	 */
+	protected static bool $help_menu = false;
 	/**
 	 * @var bool $has_membership Whether this site has membership
 	 */
@@ -31,6 +41,7 @@
 	 * @var bool $referrals Whether to implement a referral system, with rewards
 	 */
 	protected static bool $referrals = false;
+	protected static string $defaultReferralRole = BASE.'client';
 	/**
 	 * @var bool $magic_link Whether users can login without a password
 	 */
@@ -200,35 +211,41 @@
 		}
 		return self::$membershipConfig;
 	}
+
+	public function setDashboardTitle(string $title):void
+	{
+		self::$dashboardTitle = $title;
+	}
+
+	public static function dashboardTitle():bool|string
+	{
+		return self::$dashboardTitle ?? false;
+	}
+
+	public function setDirectorySingular(string $title):void
+	{
+		self::$directory_singular = $title;
+	}
+	public static function getDirectorySingular():bool|string
+	{
+		return self::$directory_singular ?? false;
+	}
+
+	public function setDirectoryPlural(string $title):void
+	{
+		self::$directory_plural = $title;
+	}
+	public static function getDirectoryPlural():bool|string
+	{
+		return self::$directory_plural ?? false;
+	}
+
+	public static function setDefaultReferralRole(string $role):void
+	{
+		self::$defaultReferralRole = $role;
+	}
+	public static function getDefaultReferralRole():string
+	{
+		return self::$defaultReferralRole;
+	}
 }
-
-
-$defaults = [
-	'icons'               => 'light',
-	'directory'        => false,        //as in, a membership directory
-	'membership'      => false,
-	'has_map'             => false,			//TODO: migrate to integrations['gmb']
-	'dashboard'           => false,
-	'support'         => false,
-	'feed_block'      => false,
-	'email_notifications' => false,
-	'integrations'  => [
-		'bluesky'     => false,
-		'cloudflare'  => false,
-		'facebook'    => false,
-		'maps'        => false,
-		'gmb'         => false,
-		'helcim'      => false,
-		'instagram'   => false,
-		'square'      => false,
-		'umami'       => false,
-	],
-	'is_restaurant'       => false,
-	'limit_hours'         => false,
-	'enthusiast'          => false,
-	'favourites'          => false,    			//optional flag to allow enthusiasts, but not favourites
-];
-
-$jvb_site = array_merge($defaults, apply_filters('jvb_site', []));
-
-define('JVB_SITE', $jvb_site);

--
Gitblit v1.10.0