From 7a9054bb3f033c98067b3196378311dae54c5fbf Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 20 Jan 2026 01:31:53 +0000
Subject: [PATCH] =OperationQueue refactor to the JVBase/managers/queue namespace
---
inc/rest/routes/Invitations.php | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/inc/rest/routes/Invitations.php b/inc/rest/routes/Invitations.php
index 8758609..5c7638a 100644
--- a/inc/rest/routes/Invitations.php
+++ b/inc/rest/routes/Invitations.php
@@ -86,16 +86,14 @@
$toTerm = (array_key_exists('to_term', $data)) ? (int)$data['to_term'] : false;
$taxonomy = (array_key_exists('taxonomy', $data) && in_array($data['taxonomy'], $this->inviteTypes[$role]['to_terms']??[])) ? $data['taxonomy'] : false;
- $args = [
- 'user' => (array_key_exists('user', $data)) ? (int)$data['user'] : false,
- 'role' => $role,
- 'to_term' => $toTerm,
- 'taxonomy' => $taxonomy,
- 'status' => array_key_exists('status', $data) && in_array($data['status'], ['all', 'pending', 'accepted', 'rejected', 'expired', 'revoked']) ? $data['status'] : 'all',
- 'page' => array_key_exists('page', $data) ? (int)$data['page'] : 1,
- ];
-
- return $args;
+ return [
+ 'user' => (array_key_exists('user', $data)) ? (int)$data['user'] : false,
+ 'role' => $role,
+ 'to_term' => $toTerm,
+ 'taxonomy' => $taxonomy,
+ 'status' => array_key_exists('status', $data) && in_array($data['status'], ['all', 'pending', 'accepted', 'rejected', 'expired', 'revoked']) ? $data['status'] : 'all',
+ 'page' => array_key_exists('page', $data) ? (int)$data['page'] : 1,
+ ];
}
/**
* @param object $request the request object
@@ -758,9 +756,9 @@
}
$toContentTax = implode(' ', $toContentTax);
- $button = jvbMailButton($signup_url, 'Join the Scene!');
- $link = jvbEmailLink($signup_url);
- $signature = jvbSignature();
+ $button = JVB()->email()->button($signup_url, 'Join the Scene!');
+ $link = JVB()->email()->link($signup_url);
+ $signature = JVB()->email()->signature();
$message = sprintf(
'<p>Hi %s!</p>
@@ -802,7 +800,7 @@
);
- $success = jvbMail($email, $subject, $message);
+ $success = JVB()->email()->sendEmail($email, $subject, $message);
if (!$success) {
@@ -850,7 +848,7 @@
$name
);
- $success = jvbMail($email, $subject, $content, 'INVITATION REVOKED');
+ $success = JVB()->email()->sendEmail($email, $subject, $content, 'INVITATION REVOKED');
if (!$success) {
JVB()->error()->log(
'invitation_revoke_email',
@@ -1009,7 +1007,6 @@
$key = $this->cache->generateKey($args);
$cache = $this->cache->get($key);
- $cache = false;
if ($cache) {
return new WP_REST_Response($cache);
}
--
Gitblit v1.10.0