Skip to content

Commit

Permalink
Try: parse shortcode blocks outside the content (#37545)
Browse files Browse the repository at this point in the history
* Try: parse shortcode blocks outside the content
Adds do_shortcode() to parse the shortcode outside the content (block templates, block patterns)
  • Loading branch information
carolinan authored and noisysocks committed Jan 17, 2022
1 parent 2c0fd46 commit 50b556b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/compat/wordpress-5.9/block-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ function gutenberg_get_the_template_html() {
$content = $wp_embed->autoembed( $content );
$content = do_blocks( $content );
$content = wptexturize( $content );
$content = convert_smilies( $content );
$content = shortcode_unautop( $content );
$content = wp_filter_content_tags( $content );
$content = do_shortcode( $content );
$content = str_replace( ']]>', ']]>', $content );

// Wrap block template in .wp-site-blocks to allow for specific descendant styles
Expand Down

0 comments on commit 50b556b

Please sign in to comment.