Skip to content

Commit

Permalink
Allow passing inner blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jan 10, 2024
1 parent 0db3db3 commit b34e2cf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ function get_hooked_block_markup( $hooked_block, &$anchor_block ) {
// However, its presence does not affect the frontend.
$anchor_block['attrs']['metadata']['ignoredHookedBlocks'][] = $hooked_block_type;

return get_comment_delimited_block_content( $hooked_block_type, $hooked_block['attrs'], '' );
return serialize_block( $hooked_block );
}

/**
Expand Down Expand Up @@ -824,8 +824,10 @@ function insert_hooked_blocks( &$anchor_block, $relative_position, $hooked_block
$markup = '';
foreach ( $hooked_block_types as $hooked_block_type ) {
$hooked_block = array(
'blockName' => $hooked_block_type,
'attrs' => array(),
'blockName' => $hooked_block_type,
'attrs' => array(),
'innerBlocks' => array(),
'innerContent' => array(),
);

/**
Expand Down

0 comments on commit b34e2cf

Please sign in to comment.