Skip to content

Commit

Permalink
Recalculate inner block context after filter
Browse files Browse the repository at this point in the history
  • Loading branch information
dlh01 committed Sep 28, 2024
1 parent 898ab5a commit 6a37f03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wp-includes/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ public function render( $options = array() ) {
/** This filter is documented in wp-includes/blocks.php */
$inner_block->context = apply_filters( 'render_block_context', $inner_block->context, $inner_block->parsed_block, $parent_block );

$block_content .= $inner_block->render();
$this->inner_blocks[ $index ] = new WP_Block( $inner_block->parsed_block, $inner_block->context, $this->registry );

$block_content .= $this->inner_blocks[ $index ]->render();
}

++$index;
Expand Down

0 comments on commit 6a37f03

Please sign in to comment.