From c32ed859f4abd1591c882f4f2a6ee16b1ec275e2 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 12 May 2026 14:03:27 +0000
Subject: [PATCH] =A little form recovery magic
---
inc/admin/Integrations.php | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/inc/admin/Integrations.php b/inc/admin/Integrations.php
index a774548..fea51c0 100644
--- a/inc/admin/Integrations.php
+++ b/inc/admin/Integrations.php
@@ -1,6 +1,9 @@
<?php
namespace JVBase\admin;
+use JVBase\managers\IconsManager;
+use JVBase\registrar\Registrar;
+
if (!defined('ABSPATH')) {
exit;
}
@@ -64,20 +67,32 @@
wp_enqueue_script(
'jvb-admin-scripts',
JVB_URL . 'assets/js/min/integrations.min.js',
- [],
+ ['jvb-auth'],
'1.0.0',
true
);
- wp_localize_script(
- 'jvb-admin-scripts',
- 'jvbSettings',
- [
- 'api' => rest_url('jvb/v1/'),
- 'currentUser' => get_current_user_id(),
- 'nonce' => wp_create_nonce('wp_rest'),
- ]
- );
+ IconsManager::for()->enqueueIconStyles();
+ IconsManager::for('dash')->enqueueIconStyles();
+ IconsManager::for('forms')->enqueueIconStyles();
+
+ $queue = [
+ 'api' => rest_url('jvb/v1/'),
+ 'redirect' => wp_login_url(home_url(add_query_arg(null, null))),
+ 'labels' => Registrar::getLabels(),
+ ];
+
+ wp_localize_script('jvb-auth', 'jvbSettings', $queue);
+//
+// wp_localize_script(
+// 'jvb-admin-scripts',
+// 'jvbSettings',
+// [
+// 'api' => rest_url('jvb/v1/'),
+// 'currentUser' => get_current_user_id(),
+// 'nonce' => wp_create_nonce('wp_rest'),
+// ]
+// );
}
/**
--
Gitblit v1.10.0