From 24e7a1f36de25bf03dba0b15d4430b71bc43ee7d Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Mon, 16 Sep 2019 20:20:44 +0200 Subject: [PATCH] Temporary fix for infinite loop. --- packages/block-library/src/post-content/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-library/src/post-content/index.php b/packages/block-library/src/post-content/index.php index 6a8b2df5ad5ba..4ed0103e8229c 100644 --- a/packages/block-library/src/post-content/index.php +++ b/packages/block-library/src/post-content/index.php @@ -11,6 +11,11 @@ * @return string Returns the filtered post content of the current post. */ function render_block_core_post_content() { + // TODO: Without this temporary fix, an infinite loop can occur. + if ( is_admin() || defined( 'REST_REQUEST' ) ) { + return ''; + } + if ( ! in_the_loop() ) { rewind_posts(); the_post();