Make WordPress Core

Changeset 55828 for trunk


Ignore:
Timestamp:
05/20/2023 03:56:54 AM (17 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.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/package-lock.json

    r55746 r55828  
    40444044        },
    40454045        "@wordpress/block-directory": {
    4046             "version": "4.3.12",
    4047             "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.3.12.tgz",
    4048             "integrity": "sha512-/AKFObqY72//1gNLqUl8Neiq3SzH3kvLV6qjW0TEdhbQgocM7zbqs4X0vnQiIRbW1OAJQS2kSD5bmnmei7dcJQ==",
     4046            "version": "4.3.13",
     4047            "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.3.13.tgz",
     4048            "integrity": "sha512-WHLRShrm4+vMUmc1o37f7XMB/mVDJc45aYzeXBH+IpgSxolMI/XecRBIu7Odn9Z1S3KS1Udf7g51HcBZlkPN6A==",
    40494049            "requires": {
    40504050                "@babel/runtime": "^7.16.0",
     
    40574057                "@wordpress/core-data": "^6.3.3",
    40584058                "@wordpress/data": "^8.3.3",
    4059                 "@wordpress/edit-post": "^7.3.12",
     4059                "@wordpress/edit-post": "^7.3.13",
    40604060                "@wordpress/editor": "^13.3.10",
    40614061                "@wordpress/element": "^5.3.2",
     
    41224122        },
    41234123        "@wordpress/block-library": {
    4124             "version": "8.3.12",
    4125             "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.3.12.tgz",
    4126             "integrity": "sha512-I42cCDu7fZGsUHqABLW6jH84ZsUg38/2BhxyBLCn3ZIY6eFgHEiCVkD+4aLr/jpEKNWCC+wBaHjlHi5fXMDtdw==",
     4124            "version": "8.3.13",
     4125            "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.3.13.tgz",
     4126            "integrity": "sha512-0AXeFuWru0UYRHTamd2i/W4+qabiJz6HF8qn8/trJK4UIaX2anJAjfr4zlqsSzyOEWtqpShk7wzqb5Buj6C0KA==",
    41274127            "requires": {
    41284128                "@babel/runtime": "^7.16.0",
     
    43444344        },
    43454345        "@wordpress/customize-widgets": {
    4346             "version": "4.3.12",
    4347             "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.3.12.tgz",
    4348             "integrity": "sha512-YM3eltvxLwBUPDLPr1ZpzM/oH2biVNj6yfXhLBmxaOxD/8/gquTsDpcdEVl7kDTm/WOA8r73h7HHRhijtSOLgg==",
     4346            "version": "4.3.13",
     4347            "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.3.13.tgz",
     4348            "integrity": "sha512-EneYjc4c1r5Tug9ZfE4TKzNclKASFDoBCwlntRk2/JcYvNAKfXEX0L+x+sSqIGxweuNl9NONV9OnWO1HE9Y70g==",
    43494349            "requires": {
    43504350                "@babel/runtime": "^7.16.0",
    43514351                "@wordpress/block-editor": "^11.3.10",
    4352                 "@wordpress/block-library": "^8.3.12",
     4352                "@wordpress/block-library": "^8.3.13",
    43534353                "@wordpress/blocks": "^12.3.3",
    43544354                "@wordpress/components": "^23.3.7",
     
    44974497        },
    44984498        "@wordpress/edit-post": {
    4499             "version": "7.3.12",
    4500             "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.3.12.tgz",
    4501             "integrity": "sha512-HQTWgFQwo+tEtTv8yQI4+B0xe3k3IZ+i07cM2UlPrA4CPTODjn5lHe4m8Q2RjdKhmznxApNuLSfh7wBT/WIZmA==",
     4499            "version": "7.3.13",
     4500            "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.3.13.tgz",
     4501            "integrity": "sha512-yvRCeuw05aa7YBM8kaxcaZBDu+PhsRbksBcfFBuERmITtsxWA5h+ADX/ncJ9rQq/wfdjZ1oW37JvW9EDvl2YzQ==",
    45024502            "requires": {
    45034503                "@babel/runtime": "^7.16.0",
     
    45054505                "@wordpress/api-fetch": "^6.23.1",
    45064506                "@wordpress/block-editor": "^11.3.10",
    4507                 "@wordpress/block-library": "^8.3.12",
     4507                "@wordpress/block-library": "^8.3.13",
    45084508                "@wordpress/blocks": "^12.3.3",
    45094509                "@wordpress/components": "^23.3.7",
     
    45364536        },
    45374537        "@wordpress/edit-site": {
    4538             "version": "5.3.12",
    4539             "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.3.12.tgz",
    4540             "integrity": "sha512-26O7ktV/JUoEqu+hpZiuoFhzAMrxdz37C5eti3Bt8ujtDwLHBMS+heaOBv/utJ56n6lGNxu/EABOz/gPsnAQiQ==",
     4538            "version": "5.3.13",
     4539            "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.3.13.tgz",
     4540            "integrity": "sha512-AsPmGyYTrDXYiA9oLHgTI0KwowMZ2np1nzL3+jW/vOFK52FLpkIbfkDUmISZkooJWKDFnxQ+2MQjbcDeeZewyw==",
    45414541            "requires": {
    45424542                "@babel/runtime": "^7.16.0",
     
    45444544                "@wordpress/api-fetch": "^6.23.1",
    45454545                "@wordpress/block-editor": "^11.3.10",
    4546                 "@wordpress/block-library": "^8.3.12",
     4546                "@wordpress/block-library": "^8.3.13",
    45474547                "@wordpress/blocks": "^12.3.3",
    45484548                "@wordpress/components": "^23.3.7",
     
    45824582        },
    45834583        "@wordpress/edit-widgets": {
    4584             "version": "5.3.12",
    4585             "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.3.12.tgz",
    4586             "integrity": "sha512-S8+mmI3D0LJ89N2o4PPQILv08Mf2KE/ywdIVGysLPKZiqebQs2YnnY/6vHpY4kHSeNe5/mY/IWlOjyYOfrjgGw==",
     4584            "version": "5.3.13",
     4585            "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.3.13.tgz",
     4586            "integrity": "sha512-WZs6+uxMsSf+QRAUOQ55slenYj2zvifetJhgKyug2+s8G/GWWbFCr+MhV3TDf4PkAfU6A6x9uc7ByguD65HQeA==",
    45874587            "requires": {
    45884588                "@babel/runtime": "^7.16.0",
    45894589                "@wordpress/api-fetch": "^6.23.1",
    45904590                "@wordpress/block-editor": "^11.3.10",
    4591                 "@wordpress/block-library": "^8.3.12",
     4591                "@wordpress/block-library": "^8.3.13",
    45924592                "@wordpress/blocks": "^12.3.3",
    45934593                "@wordpress/components": "^23.3.7",
  • trunk/package.json

    r55737 r55828  
    8383        "@wordpress/autop": "3.26.1",
    8484        "@wordpress/blob": "3.26.1",
    85         "@wordpress/block-directory": "4.3.12",
     85        "@wordpress/block-directory": "4.3.13",
    8686        "@wordpress/block-editor": "11.3.10",
    87         "@wordpress/block-library": "8.3.12",
     87        "@wordpress/block-library": "8.3.13",
    8888        "@wordpress/block-serialization-default-parser": "4.26.1",
    8989        "@wordpress/blocks": "12.3.3",
     
    9191        "@wordpress/compose": "6.3.3",
    9292        "@wordpress/core-data": "6.3.3",
    93         "@wordpress/customize-widgets": "4.3.12",
     93        "@wordpress/customize-widgets": "4.3.13",
    9494        "@wordpress/data": "8.3.3",
    9595        "@wordpress/data-controls": "2.26.3",
     
    9898        "@wordpress/dom": "3.26.1",
    9999        "@wordpress/dom-ready": "3.26.1",
    100         "@wordpress/edit-post": "7.3.12",
    101         "@wordpress/edit-site": "5.3.12",
    102         "@wordpress/edit-widgets": "5.3.12",
     100        "@wordpress/edit-post": "7.3.13",
     101        "@wordpress/edit-site": "5.3.13",
     102        "@wordpress/edit-widgets": "5.3.13",
    103103        "@wordpress/editor": "13.3.10",
    104104        "@wordpress/element": "5.3.2",
  • trunk/src/wp-includes/block-template.php

    r55761 r55828  
    237237    $content = $wp_embed->run_shortcode( $_wp_current_template_content );
    238238    $content = $wp_embed->autoembed( $content );
     239    $content = shortcode_unautop( $content );
     240    $content = do_shortcode( $content );
    239241    $content = do_blocks( $content );
    240242    $content = wptexturize( $content );
  • 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.