From b38f03c0e7218762d90fa5092696b127f24f36db Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 25 Jan 2026 07:07:26 +0000
Subject: [PATCH] =Some logical flaws in Queue.php, Queue.js, ContentExecutor.php, UploadExecutor.php - particularly with timeline ordering, frontend queue updates, etc
---
inc/helpers/renderFields.php | 59 +++++++++++++++++++++++++----------------------------------
1 files changed, 25 insertions(+), 34 deletions(-)
diff --git a/inc/helpers/renderFields.php b/inc/helpers/renderFields.php
index 3f83bff..4930917 100644
--- a/inc/helpers/renderFields.php
+++ b/inc/helpers/renderFields.php
@@ -4,7 +4,8 @@
exit;
}
-use JVBase\managers\CacheManager;
+use JVBase\forms\TaxonomySelector;
+use JVBase\managers\Cache;
use JVBase\meta\MetaForm;
use JVBase\meta\MetaManager;
@@ -64,7 +65,7 @@
*/
function jvbRenderLinks(int $ID, MetaManager|null $meta = null):string
{
- $cache = CacheManager::for('user_links', WEEK_IN_SECONDS)->connectTo('post')->connectTo('taxonomy');
+ $cache = Cache::for('user_links', WEEK_IN_SECONDS)->connect('post')->connect('taxonomy')->connect('user');
$cached = $cache->get($ID);
if ($cached) {
return $cached;
@@ -140,7 +141,7 @@
*/
function jvbRenderContactInfo(int $ID, MetaManager|null $meta = null):string
{
- $cache = CacheManager::for('contact', WEEK_IN_SECONDS)->connectTo('post')->connectTo('taxonomy');
+ $cache = Cache::for('contact', WEEK_IN_SECONDS)->connect('post')->connect('taxonomy');
$cached = $cache->get($ID);
if($cached){
@@ -331,13 +332,13 @@
return '';
}
}
- $cache = CacheManager::for($term->taxonomy);
- $key = $term->term_id.'-link';
+ $cache = Cache::for($term->taxonomy.'_link')->connect('taxonomy');
+ $key = $term->term_id;
return $cache->remember(
$key,
function() use ($term) {
- return '<a href="'.get_term_link($term->term_id, $term->taxonomy).'" title="'.$term->name.'">'.
- $term->name.
+ return '<a href="'.get_term_link($term->term_id, $term->taxonomy).'" title="'.html_entity_decode($term->name).'">'.
+ html_entity_decode($term->name).
'</a>';
}
);
@@ -547,7 +548,7 @@
<?php
}
if (wp_script_is('jvb-selector')) {
- \JVBase\forms\TaxonomySelector::class::outputSelectorModal();
+ TaxonomySelector::class::outputSelectorModal();
}
}
@@ -557,39 +558,29 @@
$dataID = ($ID) ? ['image-id' => $ID] : false;
$addID = ($ID) ? '-'.$ID : '';
-
- $defaultFields = [
+ $config = [
'image-title'.$addID => [
- 'type' => 'text',
- 'label' => 'Image Title',
- 'value' => $title,
- 'data' => $dataID
+ 'type' => 'text',
+ 'label' => 'Image Title',
+ 'value' => $title,
+ 'data' => $dataID
],
'image-alt-text'.$addID => [
- 'type' => 'text',
- 'label' => 'Alt Text',
- 'value' => $alt,
- 'hint' => 'Alt text helps the visually impaired, as well as some benefits for SEO.',
- 'data' => $dataID
+ 'type' => 'text',
+ 'label' => 'Alt Text',
+ 'value' => $alt,
+ 'hint' => 'Alt text helps the visually impaired, as well as some benefits for SEO.',
+ 'data' => $dataID
],
'image-caption'.$addID => [
- 'type' => 'textarea',
- 'value' => $caption,
- 'label' => 'Image Caption',
- 'data' => $dataID
+ 'type' => 'textarea',
+ 'value' => $caption,
+ 'label' => 'Image Caption',
+ 'data' => $dataID
]
];
- $fields = array_merge($defaultFields, $fields);
- $config = [
- 'type' => 'group',
- 'wrap' => 'details',
- 'label' => 'Image Info',
- 'hint' => 'These will be automatically generated if left blank.',
- 'fields' => $fields
- ];
-
- return $form->render('image_data',null, $config,false, true);
+ return $form->render('image_data', null, $config, false, true);
}
@@ -599,7 +590,7 @@
return '';
}
- $cache = CacheManager::for('locations')->connectTo('taxonomy');
+ $cache = Cache::for('locations')->connect('taxonomy');
$key = $cache->generateKey($location);
$cached = false;
--
Gitblit v1.10.0