Skip to content

Commit

Permalink
Process template part shortcodes before blocks (#50801)
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

* Revert "Process shortcodes before processing blocks so that dynamic blocks, by default, do not have shortcodes expanded"

This reverts commit 00374e0.

* Process shortcodes before processing blocks so that dynamic blocks, by default, do not have shortcodes expanded
  • Loading branch information
antpb authored and desrosj committed May 20, 2023
1 parent ef24619 commit d6c499c
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 @@ -128,14 +128,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 );
$content = do_shortcode( $content );

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

0 comments on commit d6c499c

Please sign in to comment.