From f94860aacd6200fb24c9e7431eb379a368cb392d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 10 Jul 2026 00:35:44 +0000
Subject: [PATCH] =Refactored CredentialsManager.php to utilize a CustomTable instance instead
---
inc/integrations/GoogleMaps.php | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/inc/integrations/GoogleMaps.php b/inc/integrations/GoogleMaps.php
index 2990c7e..545e323 100644
--- a/inc/integrations/GoogleMaps.php
+++ b/inc/integrations/GoogleMaps.php
@@ -5,6 +5,7 @@
*/
namespace JVBase\integrations;
+use JVBase\registrar\Registrar;
use WP_Error;
if (!defined('ABSPATH')) {
@@ -24,7 +25,17 @@
private const DEFAULT_ZOOM = 11; // City-wide view
private const DEFAULT_MAP_ID = '873aed4ca260b4203e45b6e3';
- public function __construct()
+ protected static self $instance;
+ public static function getInstance():self
+ {
+
+ if (!isset(self::$instance)) {
+ self::$instance = new self();
+ }
+ return self::$instance;
+ }
+
+ protected function __construct()
{
$this->service_name = 'maps';
$this->title = 'Google Maps';
@@ -541,7 +552,7 @@
return true;
}
- if (isJVBContentTax() && get_term_meta(get_queried_object_id(), BASE . 'has_map', true) === true) {
+ if (!empty(Registrar::withFeature('is_content', 'term')) && get_term_meta(get_queried_object_id(), BASE . 'has_map', true) === true) {
return true;
}
--
Gitblit v1.10.0