Skip to content

Commit

Permalink
Call get_hooked_block_markup with correct anchor block arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Nov 28, 2023
1 parent a8e2e34 commit dbd1546
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ function make_before_block_visitor( $hooked_blocks, $context ) {
*/
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
foreach ( $hooked_block_types as $hooked_block_type ) {
$markup .= get_hooked_block_markup( $anchor_block, $hooked_block_type );
$markup .= get_hooked_block_markup( $parent_block, $hooked_block_type );
}
}

Expand All @@ -842,7 +842,7 @@ function make_before_block_visitor( $hooked_blocks, $context ) {
/** This filter is documented in wp-includes/blocks.php */
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
foreach ( $hooked_block_types as $hooked_block_type ) {
$markup .= get_hooked_block_markup( $anchor_block, $hooked_block_type );
$markup .= get_hooked_block_markup( $block, $hooked_block_type );
}

return $markup;
Expand Down Expand Up @@ -890,7 +890,7 @@ function make_after_block_visitor( $hooked_blocks, $context ) {
/** This filter is documented in wp-includes/blocks.php */
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
foreach ( $hooked_block_types as $hooked_block_type ) {
$markup .= get_hooked_block_markup( $anchor_block, $hooked_block_type );
$markup .= get_hooked_block_markup( $block, $hooked_block_type );
}

if ( $parent_block && ! $next ) {
Expand All @@ -904,7 +904,7 @@ function make_after_block_visitor( $hooked_blocks, $context ) {
/** This filter is documented in wp-includes/blocks.php */
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
foreach ( $hooked_block_types as $hooked_block_type ) {
$markup .= get_hooked_block_markup( $anchor_block, $hooked_block_type );
$markup .= get_hooked_block_markup( $parent_block, $hooked_block_type );
}
}

Expand Down

0 comments on commit dbd1546

Please sign in to comment.