From c19264ac916707096fe294d996a1b7fb85206b34 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 08 Mar 2026 19:55:31 +0000
Subject: [PATCH] =Furthering along the complete refactor. Added some basic setup for is_content taxonomies, including a page for an archive of the terms.
---
inc/blocks/CustomBlocks.php | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/inc/blocks/CustomBlocks.php b/inc/blocks/CustomBlocks.php
index 1822fb5..ffb46b8 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'], 990, 3);
add_action('init', [$this, 'registerBlockStyles']);
}
@@ -398,7 +398,7 @@
if ($cite !== '') {
$content = $this->stripTagContents('cite', $content);
}
- $content = apply_filters('the_content', $content);
+ $content = jvb_filter_content( $content);
return '<blockquote'.$this->getClassesAndStyles($block['attrs'], ['pull']).'>'.
$content.
@@ -616,10 +616,12 @@
global $post;
$block['innerBlocks'] = parse_blocks($post->post_content);
- return $this->innerBlocks($block);
+ $result = $this->innerBlocks($block);
} 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 +635,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