Skip to content

Commit 85e7134

Browse files
fix error edit post/page gutenberg on wordpress 5.7
1 parent 6512c8f commit 85e7134

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/blocks.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ function handle_do_block( $block ) {
9393
return false;
9494
}
9595

96-
$block['rendered'] = render_block( $block );
97-
$block['rendered'] = do_shortcode( $block['rendered'] );
98-
$block['attrs'] = wp_parse_args( $block['attrs'], get_block_defaults( $block['blockName'] ) );
96+
$block['rendered'] = render_block( $block );
97+
$block['rendered'] = do_shortcode( $block['rendered'] );
98+
$block['attrs'] = wp_parse_args( $block['attrs'], get_block_defaults( $block['blockName'] ) );
99+
$block['attributes'] = $block['attrs'];
100+
$block['name'] = $block['blockName'];
99101
if ( ! empty( $block['innerBlocks'] ) ) {
100102
$output = [];
101103
foreach ( $block['innerBlocks'] as $_block ) {

0 commit comments

Comments
 (0)