Skip to content

Commit

Permalink
Undo calling gutenberg_parse_and_serialize_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Aug 3, 2023
1 parent 764db10 commit b36efef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/experimental/auto-inserting-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ function gutenberg_parse_and_serialize_block_templates( $query_result ) {
if ( 'custom' === $block_template->source ) {
continue;
}
gutenberg_parse_and_serialize_blocks( $block_template );
$blocks = parse_blocks( $block_template->content );
$block_template->content = gutenberg_serialize_blocks( $blocks );
}

return $query_result;
Expand All @@ -182,7 +183,7 @@ function gutenberg_parse_and_serialize_block_templates( $query_result ) {
*
* @param WP_Block_Template|null $block_template The found block template, or null if there is none.
*/
function gutenberg_parse_and_serialize_blocks( &$block_template ) {
function gutenberg_parse_and_serialize_blocks( $block_template ) {

$blocks = parse_blocks( $block_template->content );
$block_template->content = gutenberg_serialize_blocks( $blocks );
Expand Down

0 comments on commit b36efef

Please sign in to comment.