Skip to content

Commit

Permalink
Process template part shortcodes before blocks (#50801) (#50806)
Browse files Browse the repository at this point in the history
* Process shortcodes before processing blocks so that dynamic blocks, by default, do not have shortcodes expanded

Co-authored-by: antpb <[email protected]>
  • Loading branch information
priethor and antpb authored May 20, 2023
1 parent f421ecf commit 7dfb3b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ function render_block_core_template_part( $attributes ) {
}

// Run through the actions that are typically taken on the_content.
$content = shortcode_unautop( $content );
$content = do_shortcode( $content );
$seen_ids[ $template_part_id ] = true;
$content = do_blocks( $content );
unset( $seen_ids[ $template_part_id ] );
$content = wptexturize( $content );
$content = convert_smilies( $content );
$content = shortcode_unautop( $content );
$content = wp_filter_content_tags( $content, "template_part_{$area}" );
$content = do_shortcode( $content );

// Handle embeds for block template parts.
global $wp_embed;
Expand Down

0 comments on commit 7dfb3b0

Please sign in to comment.