Jake Vanderwerf
2025-12-21 3aada9949d51024a92a8b5c6cb70d12f9c3cac16
inc/managers/EmailManager.php
@@ -338,12 +338,12 @@
      $message = apply_filters('jvbNewUserEmail', $message, $user);
      $message .= $this->signature;
      $wp_new_user_notification_email['message'] = $this->getEmailTemplate($message, JVB_EMAIL['subjects']['newUser']);
      $wp_new_user_notification_email['message'] = $this->getEmailTemplate($message, JVB_EMAIL['types']['newUser']['subject']?:'New User');
        // Change the subject line
      $prefix = JVB_EMAIL['types']['newUser']['showPrefix']??true;
      $prefix = ($prefix) ? $this->prefix : '';
        $wp_new_user_notification_email['subject'] = $prefix.JVB_EMAIL['types']['newUser']['subject'];
        $wp_new_user_notification_email['subject'] = $prefix.JVB_EMAIL['types']['newUser']['subject']?:'New User';
        return $wp_new_user_notification_email;
    }
@@ -394,8 +394,8 @@
         <p>This password reset link is only valid for 24 hours.</p>',
         $user->display_name,
         $user_login,
         jvbMailButton($reset_url,'Reset Password'),
         jvbEmailLink($reset_url)
         JVB()->email()->button($reset_url,'Reset Password'),
         JVB()->email()->link($reset_url)
      );
      $content = apply_filters('jvbPasswordResetEmail', $content, $user_login, $user, $reset_url);
      $content .= $this->signature;
@@ -413,7 +413,7 @@
    {
      $prefix = JVB_EMAIL['types']['resetPass']['showPrefix']??true;
      $prefix = ($prefix) ? $this->prefix : '';
      return $prefix.JVB_EMAIL['types']['resetPass']['subject'];
      return $prefix.JVB_EMAIL['types']['resetPass']['subject']?:'Password Reset';
   }
@@ -438,14 +438,14 @@
         $newUser['first_name'],
         $oldUser['user_email'],
         $newUser['user_email'],
         jvbMailButton(wp_login_url(), 'Log In To Your Account')
         JVB()->email()->button(wp_login_url(), 'Log In To Your Account')
      );
      $content = apply_filters('jvbEmailChangeRequestEmail', $content, $oldUser, $newUser);
        $content .= $this->signature;
        $email_change_email['message'] = $this->getEmailTemplate($content, 'Email Address Changed');
      $prefix = JVB_EMAIL['types']['emailChange']['showPrefix']??true;
      $prefix = ($prefix) ? $this->prefix : '';
      $email_change_email['subject'] = $prefix.JVB_EMAIL['types']['emailChange']['subject'];
      $email_change_email['subject'] = $prefix.JVB_EMAIL['types']['emailChange']['subject']?:'Email Address Changed';
        return $email_change_email;
@@ -469,8 +469,8 @@
         %s
         <p>Or copy and paste this link into your browser:</p>
         %s',
         jvbMailButton($confirm_url, 'Confirm this Email'),
         jvbEmailLink($confirm_url)
         JVB()->email()->button($confirm_url, 'Confirm this Email'),
         JVB()->email()->link($confirm_url)
      );
      $content = apply_filters('jvbEmailChangedEmail', $content, $confirm_url);
@@ -499,7 +499,7 @@
         <p>You can <a href="sms:+18259257398">text us</a>, or reply to this email.</p>
         %s',
         $oldUser['first_name'],
         jvbMailButton(wp_login_url(), 'Log In to Your Account')
         JVB()->email()->button(wp_login_url(), 'Log In to Your Account')
      );
      $content = apply_filters('jvbPasswordChangeEmail', $content, $oldUser, $newUser);
        $content .= $this->signature;
@@ -507,7 +507,7 @@
        $pass_change_email['message'] = $this->getEmailTemplate($content, 'Password Changed');
      $prefix = JVB_EMAIL['types']['passwordChange']['showPrefix']??true;
      $prefix = ($prefix) ? $this->prefix : '';
      $pass_change_email['subject'] = $prefix.JVB_EMAIL['types']['passwordChange']['subject'];
      $pass_change_email['subject'] = $prefix.JVB_EMAIL['types']['passwordChange']['subject']?:'Password Changed';
        return $pass_change_email;
    }
@@ -545,8 +545,8 @@
         <p>Or copy and paste this link into your browser:</p>
         %s',
         $request_name,
         jvbMailButton($confirm_url, 'Confirm'),
         jvbEmailLink($confirm_url)
         JVB()->email()->button($confirm_url, 'Confirm'),
         JVB()->email()->link($confirm_url)
      );
      $message = apply_filters('jvbPersonalDataExport', $message, $request_type, $confirm_url, $email_data);
@@ -579,8 +579,8 @@
         %s
         <div class="divider"></div>
         <p><strong>Important:</strong> For privacy and security, this link will expire at %s.</p>',
         jvbMailButton($download_url, 'Download Your Data'),
         jvbEmailLink($download_url),
         JVB()->email()->button($download_url, 'Download Your Data'),
         JVB()->email()->link($download_url),
         $expiresAt
      );
      $message = apply_filters('jvbPersonalDataExported', $message, $download_url, $expiresAt, $email_data);
@@ -588,6 +588,29 @@
        return $this->getEmailTemplate($message, 'Your Personal Data Export');
    }
   public function signature():string
   {
      return $this->signature;
   }
   public function button(string $link, string $title):string
   {
      return sprintf(
         '<p style="text-align: center;"><a href="%s" class="button">%s</a></p>',
         $link,
         $title
      );
   }
   public function link(string $link):string
   {
      return sprintf(
         '<p style="user-select:all;">%s</p>',
         $link
      );
   }
}
new EmailManager();