From 747d741293e064a979d7bf6c143ef969ea6d7629 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 24 May 2026 20:49:44 +0000
Subject: [PATCH] =GMBReview block minor tweaks. Refactored ReferralManager.php and ReferralRoutes.php to utilize the manager for all logic, and CustomTable for table interactions.
---
inc/managers/DirectoryManager.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/inc/managers/DirectoryManager.php b/inc/managers/DirectoryManager.php
index c81010d..a4ebc71 100644
--- a/inc/managers/DirectoryManager.php
+++ b/inc/managers/DirectoryManager.php
@@ -85,6 +85,7 @@
public function getDirectories():array
{
$directories = get_option(BASE.'directories');
+
if (!$directories) {
$directories = [];
//content
@@ -134,7 +135,7 @@
$title = $config['title'];
//Bail early if we've already created the page
$existing = new WP_Query([
- 'post_type' => BASE.'dash',
+ 'post_type' => BASE.'directory',
'name' => sanitize_title($title),
'posts_per_page' => 1,
]);
@@ -228,7 +229,6 @@
// ];
// }
// }
-
if (!empty($created)) {
update_option(BASE.'directory_ids', $created);
}
@@ -240,6 +240,7 @@
protected function buildDirectoryList():array
{
$saved = get_option(BASE.'directory_list', []);
+
if (empty($saved)) {
$all = new WP_Query([
'post_type' => BASE.'directory',
--
Gitblit v1.10.0