Skip to content

Commit

Permalink
Process embeds inside patterns (#55979)
Browse files Browse the repository at this point in the history
Embed blocks inside patterns were not being processed when viewing a
site. This focused change addresses that issue.
  • Loading branch information
dsas authored Nov 13, 2023
1 parent 21b9691 commit 4d3b148
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-library/src/pattern/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ function render_block_core_pattern( $attributes ) {
$content = gutenberg_serialize_blocks( $blocks );
}

return do_blocks( $content );
$content = do_blocks( $content );

global $wp_embed;
$content = $wp_embed->autoembed( $content );

return $content;
}

add_action( 'init', 'register_block_core_pattern' );

0 comments on commit 4d3b148

Please sign in to comment.