From 42fa8304ddb811b0f725f245130f70c0f5e86a6c Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 04 Nov 2025 06:12:02 +0000
Subject: [PATCH] =Refactored LoginManager to be more extensible and configurable, as well as an AjaxRateLimiter
---
JVBase.php | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/JVBase.php b/JVBase.php
index 7191fff..8fd1666 100644
--- a/JVBase.php
+++ b/JVBase.php
@@ -3,6 +3,7 @@
use JVBase\integrations\BlueSky;
use JVBase\managers\ErrorHandler;
+use JVBase\managers\LoginManager;
use JVBase\managers\OperationQueue;
use JVBase\managers\DashboardManager;
use JVBase\managers\ReferralManager;
@@ -13,6 +14,7 @@
use JVBase\managers\UserTermsManager;
use JVBase\rest\routes\FeedRoutes;
use JVBase\rest\routes\FavouritesRoutes;
+use JVBase\rest\routes\IntegrationsSquareRoutes;
use JVBase\rest\routes\NotificationsRoutes;
use JVBase\rest\routes\ContentRoutes;
use JVBase\rest\routes\TermRoutes;
@@ -84,7 +86,6 @@
'userTerms' => new UserTermsManager(),
];
- add_action('wp_footer', [$this, 'additionalActions']);
if (Features::forSite()->has('magicLink')) {
$this->routes['magicLink'] = new MagicLinkRoutes();
@@ -98,6 +99,10 @@
$this->managers['dash'] = new DashboardManager();
}
+ if (Features::hasIntegration('square')){
+ $this->routes['square'] = new IntegrationsSquareRoutes();
+ }
+
$this->routes = [
'integrations' => new IntegrationsRoutes(),
];
@@ -148,6 +153,8 @@
}
$this->setupIntegrations();
+
+ add_action('wp_footer', [$this, 'additionalActions']);
// $this->managers['notifications'] = new NotificationManager();
// Register activation hook
register_activation_hook(JVB_DIR . '/jvb.php', [$this, 'activate']);
@@ -270,6 +277,9 @@
public function additionalActions():void
{
+ if (LoginManager::isLogin()) {
+ return;
+ }
$extras = apply_filters('jvbAdditionalActions', []);
$extras = array_filter($extras, function ($extra) {
return is_array($extra) && array_key_exists('button', $extra) && array_key_exists('content', $extra);
--
Gitblit v1.10.0