From ba1e1ccf869b818f7a7a897264dfea05563a7796 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 07 Jun 2026 20:10:20 +0000
Subject: [PATCH] =Major overhaul of Integrations. Playing around with adding fields to post types through Registrar from an integrations' class file.
---
inc/registrar/config/Integration.php | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/inc/registrar/config/Integration.php b/inc/registrar/config/Integration.php
index a25324d..8a829d5 100644
--- a/inc/registrar/config/Integration.php
+++ b/inc/registrar/config/Integration.php
@@ -38,6 +38,7 @@
$this->service_name = $service;
}
+
public function getService_name():string
{
return $this->service_name;
@@ -49,7 +50,12 @@
*/
public function setContentType(string $content):self
{
- $allowed = JVB()->connect($this->service_name)->getAllowedContent();
+ $connection = JVB()->connect($this->service_name);
+ if (!$connection){
+ error_log('[Integration]::setContentType Service is not setup. '.$this->service_name);
+ return $this;
+ }
+ $allowed = $connection->getAllowedContent();
if (!in_array($content, $allowed)) {
error_log($this->service_name.' Connection does not support this content: '.$content);
return $this;
--
Gitblit v1.10.0