From ccf5e61a075c35d24befc175994b5cb8957ca322 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 26 Aug 2026 21:45:53 +0000
Subject: [PATCH] =Extra JVB() calls replaced, minor tweaks
---
inc/managers/VerifyEntryManager.php | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/inc/managers/VerifyEntryManager.php b/inc/managers/VerifyEntryManager.php
index 69bfb01..ac742dc 100644
--- a/inc/managers/VerifyEntryManager.php
+++ b/inc/managers/VerifyEntryManager.php
@@ -5,19 +5,26 @@
exit;
}
+use JVBase\Instance;
use JVBase\registrar\Registrar;
use JVBase\managers\CustomTable;
+use JVBase\rest\Rest;
+use JVBase\rest\routes\ApprovalRoutes;
+
class VerifyEntryManager {
+ use Instance;
protected CustomTable $table;
protected int $max = 3;
- public function __construct()
+ protected Rest $route;
+ private function __construct()
{
+ $this->route = ApprovalRoutes::getInstance();
$this->defineTables();
}
protected function defineTables():void
{
- $types = implode(',', array_map(function($item) { return "`{$item}`"; },Registrar::getFeatured('verify_entry')));
+ $types = implode(',', array_map(function($item) { return "`{$item}`"; },Registrar::withFeature('verify_entry')));
$table = CustomTable::for('verify_entry');
@@ -113,7 +120,7 @@
]);
if ($request && !empty($owners)) {
- JVB()->notification()->notify($owners,'entry_requested',$userID, [
+ NotificationManager::getInstance()->notify($owners,'entry_requested',$userID, [
'target_id' => $termID,
'target_type' => $taxonomy
]);
@@ -143,9 +150,9 @@
wp_set_object_terms($request['content_id'], $termID, jvbCheckBase($request['taxonomy']));
}
- JVB()->notification()?->notify($request['user_id'],$approve ? 'entry_approved' : 'entry_denied',$userID);
+ NotificationManager::getInstance()?->notify($request['user_id'],$approve ? 'entry_approved' : 'entry_denied',$userID);
//TODO: What if there are multiple managers, and one approved the request? Do we just delete the notification?
- JVB()->notification()?->unnotify($owners, 'entry_requested', $request['user_id'], [
+ NotificationManager::getInstance()?->unnotify($owners, 'entry_requested', $request['user_id'], [
'target_id' => $termID,
'target_type' => $request['taxonomy']
]);
--
Gitblit v1.10.0