From 86c6cd3cc099d2480932ede03c12cea01e625c94 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 26 Apr 2026 21:56:28 +0000
Subject: [PATCH] =Requiring files based on Site class settings

---
 inc/blocks/CustomBlocks.php |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/inc/blocks/CustomBlocks.php b/inc/blocks/CustomBlocks.php
index 93e16ac..f0c0f9d 100644
--- a/inc/blocks/CustomBlocks.php
+++ b/inc/blocks/CustomBlocks.php
@@ -18,7 +18,7 @@
     {
         $this->cache = Cache::for('blocks', WEEK_IN_SECONDS);
 		$this->cache->connect('post')->connect('taxonomy');
-		add_filter('render_block', [$this, 'render'], 999, 3);
+		add_filter('render_block', [$this, 'render'], 900, 3);
 
         add_action('init', [$this, 'registerBlockStyles']);
     }
@@ -613,13 +613,19 @@
             'main';
 
         if ($content == '') {
-			global $post;
+			if(is_singular()) {
+				global $post;
 
-			$block['innerBlocks'] = parse_blocks($post->post_content);
-			return $this->innerBlocks($block);
+				$block['innerBlocks'] = parse_blocks($post->post_content);
+				$result = $this->innerBlocks($block);
+			}else {
+				$result = '';
+			}
         } else {
-            return $this->inside($block, $tag, $content);
+            $result = $this->inside($block, $tag, $content);
         }
+
+		return apply_filters('jvb_post_content_output', $result, $block);
     }
     //core_post_date
 	public function render_core_post_date(array $block):string

--
Gitblit v1.10.0