Skip to content

Commit

Permalink
remove unjustified optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Nov 10, 2018
1 parent 58f33da commit 7309d7f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,6 @@ function unregister_block_type( $name ) {
* @return array Array of parsed block objects.
*/
function gutenberg_parse_blocks( $content ) {
/*
* If there are no blocks in the content, return a single block, rather
* than wasting time trying to parse the string.
*/
if ( ! has_blocks( $content ) ) {
return array(
array(
'blockName' => null,
'attrs' => array(),
'innerBlocks' => array(),
'innerHTML' => $content,
),
);
}

/**
* Filter to allow plugins to replace the server-side block parser
*
Expand Down

0 comments on commit 7309d7f

Please sign in to comment.