Editor: Restore shortcode support for block templates.

Follow up to [55761].

Props youknowriad, Clorith, desrosj, antpb, Otto42, johnbillion, jorbin, rmccue, timothyblynjacobs, mikeschroder, peterwilsoncc, audrasjb, matveb, noisysocks, xknown, ehtis, isabel_brison, talldanwp, gziolo, chriscct7, davidbaumwald.
Merges [55828] to the 6.0 branch.
See #58333.
Built from https://develop.svn.wordpress.org/branches/6.0@55831


git-svn-id: http://core.svn.wordpress.org/branches/6.0@55343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2023-05-20 04:07:08 +00:00
parent 7a6bb60778
commit 499d9012cf
2 changed files with 4 additions and 2 deletions

View File

@ -237,6 +237,8 @@ function get_the_block_template_html() {
$content = $wp_embed->run_shortcode( $_wp_current_template_content );
$content = $wp_embed->autoembed( $content );
$content = shortcode_unautop( $content );
$content = do_shortcode( $content );
$content = do_blocks( $content );
$content = wptexturize( $content );
$content = convert_smilies( $content );

View File

@ -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;