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 2da87d9 commit fed5bb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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 );
$content = wp_filter_content_tags( $content, "template_part_{$area}" );

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

0 comments on commit fed5bb0

Please sign in to comment.