Skip to content

Commit

Permalink
Issue #27 - revert to using block content postId to check for recusrion.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Nov 15, 2020
1 parent 43ead1c commit 7a127f1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/post-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ function fizzie_render_block_core_post_content( $attributes, $content, $block )
if ( ! isset( $block->context['postId'] ) ) {
return '';
}
bw_trace2( $block->context['postId'], "postId" );
bw_trace2( get_the_id(), "get_the_ID", false );
/*
if ( 'revision' === $block->context['postType'] ) {
return '';
}
*/

if ( fizzie_process_this_content( get_the_ID() ) ) {
if ( fizzie_process_this_content( $block->context['postId'] ) ) {
$html = gutenberg_render_block_core_post_content( $attributes, $content, $block );
fizzie_clear_processed_content( get_the_ID() );
fizzie_clear_processed_content( $block->context['postId'] );
} else {
$html = fizzie_report_recursion_error( get_the_ID() );
//$html .= $content;
$html = fizzie_report_recursion_error( $block->context['postId'] );
}

return $html;
Expand Down

0 comments on commit 7a127f1

Please sign in to comment.