From 86c6cd3cc099d2480932ede03c12cea01e625c94 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 26 Apr 2026 21:56:28 +0000
Subject: [PATCH] =Requiring files based on Site class settings

---
 inc/rest/routes/LoginRoutes.php |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/inc/rest/routes/LoginRoutes.php b/inc/rest/routes/LoginRoutes.php
index 10e448f..6f78184 100644
--- a/inc/rest/routes/LoginRoutes.php
+++ b/inc/rest/routes/LoginRoutes.php
@@ -4,7 +4,7 @@
 use JVBase\registrar\Registrar;
 use JVBase\rest\Rest;
 use JVBase\rest\Route;
-use JVBase\utility\Features;
+use JVBase\base\Site;
 use WP_REST_Request;
 use WP_REST_Response;
 use WP_Error;
@@ -31,7 +31,7 @@
 
 		parent::__construct();
 
-		$this->hasMagicLink = Features::forSite()->has('magicLink');
+		$this->hasMagicLink = Site::has('magicLink');
 	}
 
 	public function registerRoutes(): void
@@ -262,7 +262,7 @@
 		]);
 
 		// Process referral code if provided
-		if (!empty($referral_code) && Features::forSite()->has('referrals')) {
+		if (!empty($referral_code) && Site::has('referrals')) {
 			$this->processReferralCode($user_id, $referral_code);
 		}
 
@@ -649,7 +649,7 @@
 	 */
 	protected function processReferralCode(int $user_id, string $referral_code): void
 	{
-		if (!Features::forSite()->has('referrals')) {
+		if (!Site::has('referrals')) {
 			return;
 		}
 
@@ -734,16 +734,16 @@
 		$nonces = [
 			'wp_rest'	=> wp_create_nonce('wp_rest'),
 		];
-		if (Features::forSite()->has('dashboard')) {
+		if (Site::has('dashboard')) {
 			$nonces['dash'] = wp_create_nonce('dash-'.$userID);
 		}
-		if (Features::forSite()->has('favourites')) {
+		if (Site::has('favourites')) {
 			$nonces['favourites'] = wp_create_nonce('favourites-'.$userID);
 		}
 		if (!empty(Registrar::getFeatured('karma'))) {
 			$nonces['votes'] = wp_create_nonce('votes-'.$userID);
 		}
-		if (Features::forSite()->has('notifications')) {
+		if (Site::has('notifications')) {
 			$nonces['notifications'] = wp_create_nonce('notifications-'.$userID);
 		}
 		return $nonces;

--
Gitblit v1.10.0