From c68aefb847b09daa0697de7684d3451e2e68ce1e Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 09 Jul 2026 23:10:23 +0000
Subject: [PATCH] =Refactor of Integrations.php to be a bit more useful with a suite of methods for create, update, delete back and forths for integrations where sharing is enabled. Also considering a single instance with a connect method to connect as the site (no user) vs connecting as an individual user - rather than recreating instances for every user.
---
inc/admin/Integrations.php | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/inc/admin/Integrations.php b/inc/admin/Integrations.php
index 15abaf2..e190ac2 100644
--- a/inc/admin/Integrations.php
+++ b/inc/admin/Integrations.php
@@ -15,6 +15,7 @@
// Hook into WordPress admin
add_action('admin_menu', [$this, 'registerAdminPages']);
add_action('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);
+ add_action(BASE.'dashboard_page_integrations', [$this, 'renderDashPage'], 10);
}
/**
@@ -95,6 +96,10 @@
// );
}
+ public function renderDashPage():void
+ {
+ $this->renderPage();
+ }
/**
* Render the main integrations page
*/
@@ -107,7 +112,10 @@
<div class="jvb-admin-content">
<?php
// Display any admin notices from form submissions
- settings_errors('jvb_integrations');
+ if (is_admin()) {
+ settings_errors('jvb_integrations');
+ }
+
$this->displayNotices();
?>
@@ -123,7 +131,9 @@
</div>
</div>
- <?php $this->renderStyles(); ?>
+ <?php if (is_admin()) {
+ $this->renderStyles();
+ } ?>
<?php
}
--
Gitblit v1.10.0