Skip to content

Commit

Permalink
Blocks: Use do_blocks to render core blocks content (#8019)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored Jul 19, 2018
1 parent 989847e commit 6efbcfb
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions core-blocks/block/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ function render_block_core_block( $attributes ) {
return '';
}

$blocks = gutenberg_parse_blocks( $shared_block->post_content );

$block = array_shift( $blocks );
if ( ! $block ) {
return '';
}

return gutenberg_render_block( $block );
return do_blocks( $shared_block->post_content );
}

register_block_type( 'core/block', array(
Expand Down

0 comments on commit 6efbcfb

Please sign in to comment.