Make WordPress Core


Ignore:
Timestamp:
05/20/2023 03:56:54 AM (18 months 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.
Fixes #58333.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/template-part.php

    r55392 r55828  
    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.