Make WordPress Core

Changeset 55830 for branches/6.1


Ignore:
Timestamp:
05/20/2023 04:02:09 AM (11 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:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/6.1

  • branches/6.1/package-lock.json

    r54847 r55830  
    40224022        },
    40234023        "@wordpress/block-directory": {
    4024             "version": "3.15.11",
    4025             "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.15.11.tgz",
    4026             "integrity": "sha512-KiQrYfxkiLrrQJgRaw1C32a9vXbNEZorEd0KuEVRZs4LYtNOKj/Je1low4Tvj77lh870Q38SiOCMWgtqtRtRJA==",
     4024            "version": "3.15.13",
     4025            "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.15.13.tgz",
     4026            "integrity": "sha512-xlHKFQkx1Hi/Ka07PG449fiz6us5exuQ9S0guoRpFHK+oR/XDLn7dLnk4VEPWIRupWM9POV8kHEJvK83+Pojjw==",
    40274027            "requires": {
    40284028                "@babel/runtime": "^7.16.0",
     
    40354035                "@wordpress/core-data": "^5.0.4",
    40364036                "@wordpress/data": "^7.1.3",
    4037                 "@wordpress/edit-post": "^6.14.11",
     4037                "@wordpress/edit-post": "^6.14.13",
    40384038                "@wordpress/editor": "^12.16.10",
    40394039                "@wordpress/element": "^4.15.1",
     
    40964096        },
    40974097        "@wordpress/block-library": {
    4098             "version": "7.14.11",
    4099             "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-7.14.11.tgz",
    4100             "integrity": "sha512-BiLDYp1snS+FCzNWJJEjMxNjKlhLTRQgKzNUwiK/UIQr/5Drif6GNPsNOiFs3ha5kKZli7l4CyFHiZE99PNiJA==",
     4098            "version": "7.14.13",
     4099            "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-7.14.13.tgz",
     4100            "integrity": "sha512-NHU5xRimeUk0FRzvuZuxa5V/5gj8t2CsU/VkPSrtup5Ijywhut1AJfWlqhDgRP42MMHhzGTHD6TjKcPOHZFsZQ==",
    41014101            "requires": {
    41024102                "@babel/runtime": "^7.16.0",
     
    43014301        },
    43024302        "@wordpress/customize-widgets": {
    4303             "version": "3.14.11",
    4304             "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-3.14.11.tgz",
    4305             "integrity": "sha512-aJ/++NFDjirmTF0zAbOzfKSeX+6sMK0vjv07Pjis4gztRJ4P+lfYaj/aUCjQz/OhJwaw1jyQNx3FxcbS3L/iLg==",
     4303            "version": "3.14.13",
     4304            "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-3.14.13.tgz",
     4305            "integrity": "sha512-V/0eTab5KEBh+BVxOcXSJ5GfSHds5STLW5ZjXG4oRJjJQhSBknVufpGsZYlr0NlhpPkzGz6zHQSUKGhlWLAi0g==",
    43064306            "requires": {
    43074307                "@babel/runtime": "^7.16.0",
    43084308                "@wordpress/block-editor": "^10.0.10",
    4309                 "@wordpress/block-library": "^7.14.11",
     4309                "@wordpress/block-library": "^7.14.13",
    43104310                "@wordpress/blocks": "^11.16.4",
    43114311                "@wordpress/components": "^21.0.7",
     
    44524452        },
    44534453        "@wordpress/edit-post": {
    4454             "version": "6.14.11",
    4455             "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-6.14.11.tgz",
    4456             "integrity": "sha512-ZqNPUlCRBRd4rUYExTVDmaIX/J0yAwaZybtcfSWPacrNnq40xrv16wrLFNZAFn5oCTrKAkuTWWjsjuQhEbw8yg==",
     4454            "version": "6.14.13",
     4455            "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-6.14.13.tgz",
     4456            "integrity": "sha512-jDBjIILhdrS16KzWeVwhqL0qCLHd7JfLqvtgBdCdJUEJ+8xtMzldE3D6Y/lF2M0SToDZYWhYSeW7TfZoMRhjfg==",
    44574457            "requires": {
    44584458                "@babel/runtime": "^7.16.0",
     
    44604460                "@wordpress/api-fetch": "^6.14.1",
    44614461                "@wordpress/block-editor": "^10.0.10",
    4462                 "@wordpress/block-library": "^7.14.11",
     4462                "@wordpress/block-library": "^7.14.13",
    44634463                "@wordpress/blocks": "^11.16.4",
    44644464                "@wordpress/components": "^21.0.7",
     
    44894489        },
    44904490        "@wordpress/edit-site": {
    4491             "version": "4.14.13",
    4492             "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-4.14.13.tgz",
    4493             "integrity": "sha512-A5mmwIOSVgiJ1QoCHfnO+ehECoI4gW/g0/GDCpvxbEiHLhexKh3aNDwsy2izO990IoAd1h55hYPYAUBxNX8a+w==",
     4491            "version": "4.14.15",
     4492            "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-4.14.15.tgz",
     4493            "integrity": "sha512-ZP3TnE6nXvODhVDkruayCLa/ahPdVF56IWQwN1KfR8KIGunIMJkEpWE/C5rRz9sp5J01wOJY8/QMkrKUauHHBA==",
    44944494            "requires": {
    44954495                "@babel/runtime": "^7.16.0",
     
    44974497                "@wordpress/api-fetch": "^6.14.1",
    44984498                "@wordpress/block-editor": "^10.0.10",
    4499                 "@wordpress/block-library": "^7.14.11",
     4499                "@wordpress/block-library": "^7.14.13",
    45004500                "@wordpress/blocks": "^11.16.4",
    45014501                "@wordpress/components": "^21.0.7",
     
    45304530        },
    45314531        "@wordpress/edit-widgets": {
    4532             "version": "4.14.11",
    4533             "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-4.14.11.tgz",
    4534             "integrity": "sha512-5nb583zlv/YZCbIfEkV7gTk+UddZNDGr1C4B/7EWAjNhQAg3/dv3eqD0N/WYTYLxBAUI3O2heO0i85/AiGqUKg==",
     4532            "version": "4.14.13",
     4533            "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-4.14.13.tgz",
     4534            "integrity": "sha512-JPtT1UaiPs5SZBGHVSNeUX8D93hQrsmGmHoKu7Ja5TbbWGvOiRVaqcG3hFSP0aZpMvecY8uBWi5f8WWP+bPK3g==",
    45354535            "requires": {
    45364536                "@babel/runtime": "^7.16.0",
    45374537                "@wordpress/api-fetch": "^6.14.1",
    45384538                "@wordpress/block-editor": "^10.0.10",
    4539                 "@wordpress/block-library": "^7.14.11",
     4539                "@wordpress/block-library": "^7.14.13",
    45404540                "@wordpress/blocks": "^11.16.4",
    45414541                "@wordpress/components": "^21.0.7",
  • branches/6.1/package.json

    r54847 r55830  
    8282        "@wordpress/autop": "3.17.1",
    8383        "@wordpress/blob": "3.17.1",
    84         "@wordpress/block-directory": "3.15.11",
     84        "@wordpress/block-directory": "3.15.13",
    8585        "@wordpress/block-editor": "10.0.10",
    86         "@wordpress/block-library": "7.14.11",
     86        "@wordpress/block-library": "7.14.13",
    8787        "@wordpress/block-serialization-default-parser": "4.17.1",
    8888        "@wordpress/blocks": "11.16.4",
     
    9090        "@wordpress/compose": "5.15.2",
    9191        "@wordpress/core-data": "5.0.4",
    92         "@wordpress/customize-widgets": "3.14.11",
     92        "@wordpress/customize-widgets": "3.14.13",
    9393        "@wordpress/data": "7.1.3",
    9494        "@wordpress/data-controls": "2.17.3",
     
    9797        "@wordpress/dom": "3.17.2",
    9898        "@wordpress/dom-ready": "3.17.1",
    99         "@wordpress/edit-post": "6.14.11",
    100         "@wordpress/edit-site": "4.14.13",
    101         "@wordpress/edit-widgets": "4.14.11",
     99        "@wordpress/edit-post": "6.14.13",
     100        "@wordpress/edit-site": "4.14.15",
     101        "@wordpress/edit-widgets": "4.14.13",
    102102        "@wordpress/editor": "12.16.10",
    103103        "@wordpress/element": "4.15.1",
  • branches/6.1/src/wp-includes/block-template.php

    r55771 r55830  
    238238    $content = $wp_embed->run_shortcode( $_wp_current_template_content );
    239239    $content = $wp_embed->autoembed( $content );
     240    $content = shortcode_unautop( $content );
     241    $content = do_shortcode( $content );
    240242    $content = do_blocks( $content );
    241243    $content = wptexturize( $content );
  • 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'];
  • branches/6.1/src/wp-includes/blocks/template-part.php

    r54820 r55830  
    129129
    130130    // Run through the actions that are typically taken on the_content.
     131    $content                       = shortcode_unautop( $content );
     132    $content                       = do_shortcode( $content );
    131133    $seen_ids[ $template_part_id ] = true;
    132134    $content                       = do_blocks( $content );
     
    134136    $content = wptexturize( $content );
    135137    $content = convert_smilies( $content );
    136     $content = shortcode_unautop( $content );
    137138    $content = wp_filter_content_tags( $content );
    138     $content = do_shortcode( $content );
    139139
    140140    // Handle embeds for block template parts.
Note: See TracChangeset for help on using the changeset viewer.