--- a/wp/wp-includes/blocks/post-content.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/blocks/post-content.php Fri Sep 05 18:40:08 2025 +0200
@@ -8,6 +8,8 @@
/**
* Renders the `core/post-content` block on the server.
*
+ * @since 5.8.0
+ *
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
@@ -25,8 +27,7 @@
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;
+ $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY;
return $is_debug ?
// translators: Visible only in the front end, this warning takes the place of a faulty block.
@@ -36,12 +37,6 @@
$seen_ids[ $post_id ] = true;
- // Check is needed for backward compatibility with third-party plugins
- // that might rely on the `in_the_loop` check; calling `the_post` sets it to true.
- if ( ! in_the_loop() && have_posts() ) {
- the_post();
- }
-
// When inside the main loop, we want to use queried object
// so that `the_preview` for the current post can apply.
// We force this behavior by omitting the third argument (post ID) from the `get_the_content`.
@@ -70,6 +65,8 @@
/**
* Registers the `core/post-content` block on the server.
+ *
+ * @since 5.8.0
*/
function register_block_core_post_content() {
register_block_type_from_metadata(