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 May 20, 2023
1 parent dc3832f commit 3dc64ad
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

1 comment on commit 3dc64ad

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 3dc64ad.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5029574608
📝 Reported issues:

Please sign in to comment.