From c4aa5cdb5e90ad4b420e22772797d16980232a2b Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 15 Apr 2026 18:38:55 +0000
Subject: [PATCH] =Updating custom tables to utilize CustomTable.php

---
 inc/blocks/CustomBlocks.php |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/inc/blocks/CustomBlocks.php b/inc/blocks/CustomBlocks.php
index b22cb0a..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
@@ -633,14 +639,14 @@
 		global $post;
 		$ID = get_post_thumbnail_id($post->ID);
 		$aOpen = $aClose = '';
-		if(!is_single($ID)) {
+		if(!is_single($post->ID)) {
 			$aOpen = '<a href="'.get_the_permalink($post->ID).'">';
 			$aClose = '</a>';
 		}
 
-        return $aOpen.'<figure'.$this->getClassesAndStyles($block['attrs']).'>'.
+        return '<figure'.$this->getClassesAndStyles($block['attrs']).'>'.$aOpen.
                apply_filters('jvbCoreFeaturedImage', $this->image($ID), $post->post_type).
-               '</figure>'.$aClose;
+				$aClose.'</figure>';
     }
     //core_post_navigation_link
     //core_post_template

--
Gitblit v1.10.0