From 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 25 Aug 2026 22:57:22 +0000
Subject: [PATCH] =It's been a minute. I went through the Routes and associated Managers and ensured they played together well. Reworked the Cache.php, and I think I caught all the references. Moving away from JVBase() root class, to individuall classes that are Instanced. Double checked for the ABSPATH check in every file, and added index.php to every directory that didn't already have it. Also still working on the MenuBlock to work with WooCommerce for now for Northeh
---
inc/managers/queue/executors/ContentExecutor.php | 30 +++++++++++-------------------
1 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/inc/managers/queue/executors/ContentExecutor.php b/inc/managers/queue/executors/ContentExecutor.php
index 3d5ef56..2755eb9 100644
--- a/inc/managers/queue/executors/ContentExecutor.php
+++ b/inc/managers/queue/executors/ContentExecutor.php
@@ -67,7 +67,7 @@
private function processContentUpdate(Operation $operation, array $data, Progress $progress): Result
{
$posts = $data['posts'] ?? [];
-
+ error_log('Processing Content Update: '.print_r($posts, true));
if (empty($posts)) {
return new Result(
outcome: 'success',
@@ -125,7 +125,7 @@
// Send notification
// if (jvbSiteHasNotifications()) {
-// JVB()->notification()->addNotification(
+// NotificationManager::getInstance()->addNotification(
// $this->userId,
// 'content_update_complete',
// null,
@@ -249,12 +249,7 @@
return [];
}
- $children = get_children([
- 'post_parent' => $parentID,
- 'posts_per_page' => -1,
- 'post_status' => ['publish', 'draft'],
- ]);
-
+ $children = jvbTimelinePoints($parentID, $parent->post_type, ['publish', 'draft']);
if (count($children) === 0) {
return [];
@@ -348,6 +343,10 @@
}
}
}
+ $isUpdate = $meta->get('is_update');
+ if (!(bool) $isUpdate) {
+ $meta->set('number', $index);
+ }
if ($lastKey === $index) {
$latestTimestamp = strtotime($post->post_date);
@@ -461,11 +460,7 @@
$meta = Meta::forPost($parentID);
$values = $meta->getAll($shared);
- $children = get_children([
- 'post_parent' => $parentID,
- 'posts_per_page' => -1,
- 'fields' => 'ids',
- ]);
+ $children = jvbTimelinePoints($parentID, get_post_type($parentID), ['any']);
if (empty($children)) {
continue;
@@ -484,11 +479,8 @@
});
foreach ($updates as $parentID => $status) {
- $children = get_children([
- 'post_parent' => $parentID,
- 'posts_per_page' => -1,
- 'fields' => 'ids'
- ]);
+ $children = jvbTimelinePoints($parentID, get_post_type($parentID), ['any']);
+
if (!empty($children)) {
foreach($children as $child) {
if ($status === 'trash') {
@@ -604,7 +596,7 @@
{
error_log('Handling term '.$ID.' with data: '.print_r($data, true));
//Existing term update
- if ($registrar->hasFeature('is_ownable') && (!JVB()->roles()->isOwner($this->userId, $ID) && !JVB()->roles()->isManager($this->userId, $ID))) {
+ if ($registrar->hasFeature('is_ownable') && (!Roles::getInstance()()->isOwner($this->userId, $ID) && !Roles::getInstance()()->isManager($this->userId, $ID))) {
error_log('Term is ownable. User does not own this term.');
$progress->failItem($ID, 'No permission to modify this term');
$results['errors'][$ID] = 'No permission';
--
Gitblit v1.10.0