Jake Vanderwerf
3 days ago ba1e1ccf869b818f7a7a897264dfea05563a7796
inc/registrar/config/Integration.php
@@ -2,7 +2,7 @@
namespace JVBase\registrar\config;
use JVBase\registrar\Registrar;
use JVBase\utility\Features;
use JVBase\base\Site;
if (!defined('ABSPATH')) {
   exit;
@@ -31,13 +31,14 @@
   public function __construct(string $service) {
      if (!Features::hasIntegration($service)) {
      if (!Site::hasIntegration($service)) {
         error_log('Could not link with integration, as it is not enabled: '.$service);
         return;
      }
      $this->service_name = $service;
   }
   public function getService_name():string
   {
      return $this->service_name;
@@ -47,9 +48,14 @@
    * @param string $content must match what integration expects
    * @return self
    */
   public function setContent_type(string $content):self
   public function setContentType(string $content):self
   {
      $allowed = JVB()->connect($this->service_name)->allowedContent();
      $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;