Jake Vanderwerf
2026-08-25 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a
inc/blocks/FormBlock.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\blocks;
use JVBase\integrations\services\Cloudflare;
use JVBase\managers\Cache;
use JVBase\meta\Form;
use JVBase\base\Site;
@@ -33,7 +34,7 @@
   public function __construct()
   {
      $this->cache = Cache::for('forms', WEEK_IN_SECONDS);
      $this->cache = Cache::for('forms', null, WEEK_IN_SECONDS);
      if (JVB_TESTING) {
         $this->cache->flush();
@@ -63,7 +64,7 @@
      // Enqueue Turnstile if needed
      if (Site::hasIntegration('cloudflare')) {
         $cloudflare = JVB()->connect('cloudflare');
         $cloudflare = Cloudflare::getInstance();
         if ($cloudflare->isSetUp()) {
            $cloudflare->enqueueTurnstileScripts();
         }
@@ -131,9 +132,8 @@
         return '<div class="jvb-form-error">No valid form type selected. Please edit this block and select a form type.</div>';
      }
      $cache_key = $this->cache->generateKey($block);
      return $this->cache->remember(
         $cache_key,
         $block,
         function() use ($form_type, $block) {
            return $this->renderForm($form_type, $block);
         }
@@ -409,7 +409,7 @@
         return;
      }
      $cloudflare = JVB()->connect('cloudflare');
      $cloudflare = Cloudflare::getInstance();
      if ($cloudflare->isSetUp()) {
         $cloudflare->renderTurnstile();
      }