Skip to content

Commit

Permalink
Fix data return setup for blocks data
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed Sep 28, 2017
1 parent bc2600d commit d395197
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,7 @@ function gutenberg_extract_blocks_from_post_content( $response, $post ) {

// Extract the block data from the post content.
$blocks = gutenberg_add_blocks_to_post_resource( $post->post_content );

// Add block data to the response as part of 'content'.
$content = $response->get_data( 'content' );
$content['blocks'] = $blocks;
$response->set_data( array( 'content' => $content ) );
$response->data['content']['blocks'] = $blocks;

return $response;
}

0 comments on commit d395197

Please sign in to comment.