Jake Vanderwerf
2026-07-10 f94860aacd6200fb24c9e7431eb379a368cb392d
inc/integrations/Cloudflare.php
@@ -1,7 +1,6 @@
<?php
namespace JVBase\integrations;
use JVBase\meta\MetaManager;
use WP_Error;
if (!defined('ABSPATH')) {
   exit;
@@ -14,7 +13,17 @@
   private string $theme = 'light';
   private string $size = 'normal';
   public function __construct()
   protected static array $instances = [];
   public static function getInstance(?int $userID = null):self
   {
      $key = is_null($userID) ? 'base' : $userID;
      if (!array_key_exists($key, self::$instances)) {
         self::$instances[$key] = new self($userID);
      }
      return self::$instances[$key];
   }
   protected function __construct()
   {
      $this->service_name = 'cloudflare';
      $this->title = 'Cloudflare Turnstile';
@@ -254,10 +263,4 @@
      // Cloudflare Turnstile uses POST parameters, not headers
      return [];
   }
   protected function getApiUrl(string $endpoint, ?string $baseKey = null): string
   {
      // Only used for direct API calls, not through base class methods
      return 'https://challenges.cloudflare.com/turnstile/v0/siteverify';
   }
}