Make WordPress Core


Ignore:
Timestamp:
05/20/2023 04:02:09 AM (22 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.
Merges [55828] to the 6.1 branch.
See #58333.

Location:
branches/6.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.1

  • branches/6.1/src/wp-includes/blocks/post-featured-image.php

    r54812 r55830  
    1919    }
    2020    $post_ID = $block->context['postId'];
     21
     22    // Check is needed for backward compatibility with third-party plugins
     23    // that might rely on the `in_the_loop` check; calling `the_post` sets it to true.
     24    if ( ! in_the_loop() && have_posts() ) {
     25        the_post();
     26    }
    2127
    2228    $is_link        = isset( $attributes['isLink'] ) && $attributes['isLink'];
Note: See TracChangeset for help on using the changeset viewer.