From 5b5f37de365ff84fc231e414a719d1b2ff4ceff6 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 22:38:58 +0000
Subject: [PATCH] =further feed block testing
---
inc/managers/MagicLinkManager.php | 60 +++++++++++++++++++++++++++---------------------------------
1 files changed, 27 insertions(+), 33 deletions(-)
diff --git a/inc/managers/MagicLinkManager.php b/inc/managers/MagicLinkManager.php
index 880fe9c..f366c96 100644
--- a/inc/managers/MagicLinkManager.php
+++ b/inc/managers/MagicLinkManager.php
@@ -507,60 +507,54 @@
protected function getLoginEmailTemplate(string $name, string $magic_url): string
{
- $content = '<h2>Hey ' . esc_html($name) . '!</h2>';
- $content .= '<p>Click the button below to sign in to your account. This link expires in 15 minutes.</p>';
- $content .= JVB()->email()->button($magic_url, 'Sign In');
- $content .= '<p>Or copy and paste this link into your browser of choice:</p>';
+ $content = JVB()->email()->h2('Hey ' . esc_html($name) . '!');
+ $content .= '<p>Click the button below to sign in to your account instantly - no password needed!</p>';
+ $content .= JVB()->email()->button($magic_url, 'Sign In Now');
+ $content .= '<p>Or copy and paste this link into your browser:</p>';
$content .= JVB()->email()->link($magic_url);
- $content .= '<p>If you didn\'t request this, you can safely ignore this email. The link will expire in 15 minutes.</p>';
- $content .= JVB()->email()->signature();
-
+ $content .= JVB()->email()->divider();
+ $content .= '<p>If you didn\'t request this, you can safely ignore this email. This link expires in 15 minutes.</p>';
return $content;
}
protected function getSignupEmailTemplate(string $name, string $magic_url): string
{
- $content = '<h2>Welcome' . ($name ? ', ' . esc_html($name) : '') . '!</h2>';
- $content .= '<p>You\'re almost there! Click the button below to complete your registration and access your account.</p>';
+ $content = JVB()->email()->h2('Welcome' . ($name ? ', ' . esc_html($name) : '') . '!');
+ $content .= '<p>Click the button below to complete your registration and access your account!</p>';
$content .= JVB()->email()->button($magic_url, 'Complete Registration');
- $content .= '<p>Or copy and paste this link into your browser of choice:</p>';
+ $content .= '<p>Or copy and paste this link:</p>';
$content .= JVB()->email()->link($magic_url);
- $content .= '<p>This link expires in 15 minutes.</p>';
- $content .= JVB()->email()->signature();
-
+ $content .= JVB()->email()->spacer(10);
+ $content .= '<p><small>This link expires in 24 hours.</small></p>';
return $content;
}
protected function getReferralEmailTemplate(string $name, string $referrer_name, string $magic_url, string $reward_text, array $context): string
{
- $content = '<h2>Hey' . ($name ? ' ' . esc_html($name) : '') . '!</h2>';
- $content .= '<p><strong>' . esc_html($referrer_name) . '</strong> thinks you\'d love ' . get_bloginfo('name') . '!</p>';
+ $content = JVB()->email()->h2('Hey' . ($name ? ' ' . esc_html($name) : '') . '!');
+ $content .= sprintf(
+ '<p><strong>%s</strong> thinks you\'d love %s!</p>',
+ esc_html($referrer_name),
+ esc_html(get_bloginfo('name'))
+ );
- if (array_key_exists('message', $context) && $context['message']!== '') {
- $content .= wpautop($context['message']);
+ if (!empty($context['message'])) {
+ $content .= JVB()->email()->callout(nl2br(esc_html($context['message'])));
}
+
if ($reward_text) {
- $content .= '<p>' . esc_html($reward_text) . '</p>';
+ $content .= JVB()->email()->alert(
+ '<strong>Special Welcome Offer:</strong> ' . esc_html($reward_text),
+ 'success'
+ );
}
$content .= JVB()->email()->button($magic_url, 'Join Now');
- $content .= '<p>Or copy and paste this link into your browser of choice:</p>';
+ $content .= '<p>Or copy and paste this link:</p>';
$content .= JVB()->email()->link($magic_url);
- $content .= '<p>This link expires in 14 days.</p>';
- $content .= JVB()->email()->signature();
+ $content .= JVB()->email()->spacer(10);
+ $content .= '<p><small>This invitation expires in 14 days.</small></p>';
return $content;
}
-
- protected function getResetEmailTemplate(string $name, string $magic_url): string
- {
- $content = '<h2>Hey ' . esc_html($name) . '!</h2>';
- $content .= '<p>We received a request to reset your password. Click the button below to sign in and update your password.</p>';
- $content .= JVB()->email()->button($magic_url, 'Reset Password');
- $content .= '<p>Or copy and paste this link into your browser of choice:</p>';
- $content .= JVB()->email()->link($magic_url);
- $content .= '<p>If you didn\'t request this, you can safely ignore this email. This link expires in 15 minutes.</p>';
- $content .= JVB()->email()->signature();
- return $content;
- }
}
--
Gitblit v1.10.0