From a24a06002081ad71a78ffeff9072725ba39cf121 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 17 Feb 2026 20:05:31 +0000
Subject: [PATCH] =minor changes, particularly around the JVB_CHILD_URL pattern
---
inc/managers/DashboardManager.php | 61 +++++++++++++++---------------
1 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/inc/managers/DashboardManager.php b/inc/managers/DashboardManager.php
index 5a25ea0..49a3762 100644
--- a/inc/managers/DashboardManager.php
+++ b/inc/managers/DashboardManager.php
@@ -1,8 +1,10 @@
<?php
namespace JVBase\managers;
-use JVBase\forms\TaxonomySelector;use JVBase\managers\CRUD;
-use JVBase\meta\MetaManager;
+use JVBase\forms\TaxonomySelector;
+use JVBase\managers\CRUD;
+use JVBase\meta\Form;
+use JVBase\meta\Meta;
use JVBase\utility\Features;
use JVBase\ui\Navigation;
use WP_User;
@@ -29,6 +31,7 @@
if (!$this->isRegistered()) {
add_action('init', [$this, 'buildDashboard']);
}
+ $this->cache->flush();
$this->user = wp_get_current_user();
$this->role = jvbUserRole($this->user->ID);
$this->userLink = (int)get_user_meta($this->user->ID, BASE.'link', true);
@@ -514,8 +517,8 @@
if (!is_singular(BASE.'dash') && !is_post_type_archive(BASE.'dash')) {
return;
}
- wp_enqueue_style('jvb-icons-dash');
- wp_enqueue_style('jvb-icons-forms');
+ IconsManager::for('forms')->enqueueIconStyles();
+ IconsManager::for('dash')->enqueueIconStyles();
wp_enqueue_script('jvb-form');
wp_enqueue_script('jvb-selector');
@@ -536,28 +539,28 @@
break;
case 'admin':
case 'dash':
- if (current_user_can('manage_options') && apply_filters('jvbAdminDashboard', '') === '') {
- wp_enqueue_script(
- 'jvb-admin',
- JVB_URL . 'assets/js/min/admin.min.js',
- [
- 'jvb-queue',
- 'jvb-loading'
- ],
- [
- 'strategy' => 'defer',
- 'in_footer' => true
- ]
- );
+// if (current_user_can('manage_options') && apply_filters('jvbAdminDashboard', '') === '') {
+// wp_enqueue_script(
+// 'jvb-admin',
+// JVB_URL . 'assets/js/min/admin.min.js',
+// [
+// 'jvb-queue',
+//// 'jvb-loading'
+// ],
+// [
+// 'strategy' => 'defer',
+// 'in_footer' => true
+// ]
+// );
- wp_localize_script(
- 'jvb-admin',
- 'jvbAdmin',
- [
- 'nonce' => wp_create_nonce('itsme')
- ]
- );
- }
+// wp_localize_script(
+// 'jvb-admin',
+// 'jvbAdmin',
+// [
+// 'nonce' => wp_create_nonce('itsme')
+// ]
+// );
+// }
break;
case 'seo':
wp_enqueue_script('jvb-schema');
@@ -871,7 +874,7 @@
echo '<h2>What would you like to do today?</h2>';
- echo '<ul>';
+ echo '<ul class="dashboard">';
foreach ($pages as $slug => $page) {
if ($page === 'dash') {
continue;
@@ -1127,7 +1130,6 @@
$jvb_everything = array_merge(JVB_CONTENT, JVB_TAXONOMY);
foreach ($jvb_everything as $type => $settings) {
- $meta = new MetaManager(null, 'form');
$fields = jvbGetFields($type);
?>
<template class="<?= $type ?>Table">
@@ -1197,7 +1199,7 @@
<?php
$config['type'] = 'text';
$config['description'] = '';
- $meta->render('form', $n, $config);
+ Form::render($n, null, $config);
?>
</td>
<?php
@@ -1212,10 +1214,9 @@
echo jvbNewModal(
'edit-modal '.$type,
'Edit '.ucfirst($type),
- $meta->renderForm('admin', [], $fields)
+ jvbRenderForm('admin', $fields)
);
}
-
return ob_get_clean();
}
--
Gitblit v1.10.0