Make WordPress Core


Ignore:
Timestamp:
05/20/2023 04:01:19 AM (3 years ago)
Author:
desrosj
Message:

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.2 branch.
See #58333.

Location:
branches/6.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.2

  • branches/6.2/src/wp-includes/blocks/template-part.php

    r55392 r55829  
    143143
    144144        // Run through the actions that are typically taken on the_content.
     145        $content                       = shortcode_unautop( $content );
     146        $content                       = do_shortcode( $content );
    145147        $seen_ids[ $template_part_id ] = true;
    146148        $content                       = do_blocks( $content );
    … …  
    148150        $content = wptexturize( $content );
    149151        $content = convert_smilies( $content );
    150         $content = shortcode_unautop( $content );
    151152        $content = wp_filter_content_tags( $content, "template_part_{$area}" );
    152         $content = do_shortcode( $content );
    153153
    154154        // Handle embeds for block template parts.
Note: See TracChangeset for help on using the changeset viewer.