diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/blocks/post-content.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-includes/blocks/post-content.php Wed Sep 21 18:19:35 2022 +0200 @@ -0,0 +1,72 @@ +context['postId'] ) ) { + return ''; + } + + $post_id = $block->context['postId']; + + if ( isset( $seen_ids[ $post_id ] ) ) { + // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent + // is set in `wp_debug_mode()`. + $is_debug = defined( 'WP_DEBUG' ) && WP_DEBUG && + defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY; + + return $is_debug ? + // translators: Visible only in the front end, this warning takes the place of a faulty block. + __( '[block rendering halted]' ) : + ''; + } + + $seen_ids[ $post_id ] = true; + + if ( ! in_the_loop() && have_posts() ) { + the_post(); + } + + $content = get_the_content( null, false, $post_id ); + /** This filter is documented in wp-includes/post-template.php */ + $content = apply_filters( 'the_content', str_replace( ']]>', ']]>', $content ) ); + unset( $seen_ids[ $post_id ] ); + + if ( empty( $content ) ) { + return ''; + } + + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'entry-content' ) ); + + return ( + '