From 772462eeca3002a1d52508aeba485aab2b4742ad Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 03 Mar 2026 19:06:19 +0000
Subject: [PATCH] =MAJOR OVERHAUL. Likely should have made a new branch ages ago. Key changes: Registrar.php is the base for custom post types, taxonomies, and user roles. Replaces JVB_CONTENT, JVB_TAXONOMY, and JVB_USER constants, eliminates most of Features.php (except for JVB_SITE, JVB_MEMBERSHIP), and has built in sanitizing and validation via sub-classes. Also started a major overhaul of the Schema output. Created a shit ton of property traits and classes to help sanitize and ensure proper data for different schema types. Still a bunch to do, but better to be starting committing changes here on this other branch.
---
inc/managers/MagicLinkManager.php | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/inc/managers/MagicLinkManager.php b/inc/managers/MagicLinkManager.php
index f366c96..c8d0a88 100644
--- a/inc/managers/MagicLinkManager.php
+++ b/inc/managers/MagicLinkManager.php
@@ -16,8 +16,8 @@
*/
class MagicLinkManager
{
- protected CacheManager $cache;
- protected CacheManager $referral_cache;
+ protected Cache $cache;
+ protected Cache $referral_cache;
// Token settings
protected int $token_expiry = 900; // 15 minutes in seconds
@@ -32,8 +32,8 @@
public function __construct()
{
- $this->cache = CacheManager::for('magic_links', $this->token_expiry);
- $this->referral_cache = CacheManager::for('referral_magic_links', 14 * DAY_IN_SECONDS);
+ $this->cache = Cache::for('magic_links', $this->token_expiry);
+ $this->referral_cache = Cache::for('referral_magic_links', 14 * DAY_IN_SECONDS);
// Hook into WordPress auth flow
add_action('template_redirect', [$this, 'handleMagicLinkClick']);
@@ -129,9 +129,9 @@
// Delete token after verification (single use)
// Check which cache it's in and delete from the correct one
if ($token_data['type'] === 'referral') {
- $this->referral_cache->delete($token);
+ $this->referral_cache->forget($token);
} else {
- $this->cache->delete($token);
+ $this->cache->forget($token);
}
return $token_data;
--
Gitblit v1.10.0