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 Dec 22, 2021
1 parent 8f90816 commit 59fbccf
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 59fbccf

Please sign in to comment.