Skip to content

Commit

Permalink
attributes: use $attributes and return even if null
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed Sep 7, 2017
1 parent 5937d1a commit 862bccc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ function gutenberg_add_blocks_to_post_resource( $content ) {
// Set up and add the item data.
$item_data = array();
$item_data['type'] = $block_name;
if ( null !== $attributes ) {
$item_data['attributes'] = $block['attrs'];
}
$item_data['attributes'] = $attributes;
$item_data['content'] = $block['rawContent'];
if ( null !== $block['renderedContent'] ) {
$item_data['rendered'] = $block['renderedContent'] ;
Expand Down

0 comments on commit 862bccc

Please sign in to comment.