From b10a29c18e22e61d82bb7eec7d4c07dfa9af4690 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Fri, 31 May 2024 15:20:11 +0800 Subject: [PATCH] Remove filter after do_blocks --- packages/block-library/src/block/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/block/index.php b/packages/block-library/src/block/index.php index cb1618cb337b65..786615f58583db 100644 --- a/packages/block-library/src/block/index.php +++ b/packages/block-library/src/block/index.php @@ -119,7 +119,7 @@ function render_block_core_block( $attributes ) { return $parsed_block; }; - add_filter( 'render_block_data', $apply_default_pattern_overrides_bindings, 10, 1 ); + add_filter( 'render_block_data', $apply_default_pattern_overrides_bindings ); } $content = do_blocks( $content ); @@ -127,6 +127,7 @@ function render_block_core_block( $attributes ) { if ( $has_pattern_overrides ) { remove_filter( 'render_block_context', $filter_block_context, 1 ); + remove_filter( 'render_block_data', $apply_default_pattern_overrides_bindings ); } return $content;