Skip to content

Commit

Permalink
Remove filter after do_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed May 31, 2024
1 parent d7128b3 commit b10a29c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/block/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,15 @@ 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 );
unset( $seen_refs[ $attributes['ref'] ] );

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;
Expand Down

0 comments on commit b10a29c

Please sign in to comment.