diff --git a/src/blocks.php b/src/blocks.php index 23f3fdb..df9b7b9 100644 --- a/src/blocks.php +++ b/src/blocks.php @@ -93,9 +93,11 @@ function handle_do_block( $block ) { return false; } - $block['rendered'] = render_block( $block ); - $block['rendered'] = do_shortcode( $block['rendered'] ); - $block['attrs'] = wp_parse_args( $block['attrs'], get_block_defaults( $block['blockName'] ) ); + $block['rendered'] = render_block( $block ); + $block['rendered'] = do_shortcode( $block['rendered'] ); + $block['attrs'] = wp_parse_args( $block['attrs'], get_block_defaults( $block['blockName'] ) ); + $block['attributes'] = $block['attrs']; + $block['name'] = $block['blockName']; if ( ! empty( $block['innerBlocks'] ) ) { $output = []; foreach ( $block['innerBlocks'] as $_block ) { diff --git a/wp-rest-blocks.php b/wp-rest-blocks.php index c0f4589..51422f6 100644 --- a/wp-rest-blocks.php +++ b/wp-rest-blocks.php @@ -7,7 +7,7 @@ * Author URI: https://www.spacedmonkey.com/ * Text Domain: wp-rest-blocks * Domain Path: /languages - * Version: 0.1.1 + * Version: 0.1.2 * GitHub Plugin URI: https://github.com/Apiki/wp-rest-blocks * * @package WP_REST_Blocks