Make WordPress Core


Ignore:
Timestamp:
07/04/2022 12:04:45 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Editor: Update block editor packages for WordPress 6.0.1.

This brings a new version of the Gutenberg code from the wp/6.0 branch into core.

The following packages were updated:

  • @wordpress/block-directory to 3.4.12
  • @wordpress/block-editor to 8.5.9
  • @wordpress/block-library to 7.3.12
  • @wordpress/components to 19.8.5
  • @wordpress/customize-widgets to 3.3.12
  • @wordpress/edit-post to 6.3.12
  • @wordpress/edit-site to 4.3.12
  • @wordpress/edit-widgets to 4.3.12
  • @wordpress/editor to 12.5.9
  • @wordpress/format-library to 3.4.9
  • @wordpress/icons to 8.2.3
  • @wordpress/interface to 4.5.6
  • @wordpress/list-reusable-blocks to 3.4.5
  • @wordpress/nux to 5.4.5
  • @wordpress/plugins to 4.4.3
  • @wordpress/preferences to 1.2.5
  • @wordpress/reusable-blocks to 3.4.9
  • @wordpress/server-side-render to 3.4.6
  • @wordpress/widgets to 2.4.9

Props zieladam.
See #56058.

File:
1 edited

Legend:

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

    r53377 r53644  
    8383        while ( $query->have_posts() ) {
    8484                $query->the_post();
     85
     86                // Get an instance of the current Post Template block.
     87                $block_instance = $block->parsed_block;
     88
     89                // Set the block name to one that does not correspond to an existing registered block.
     90                // This ensures that for the inner instances of the Post Template block, we do not render any block supports.
     91                $block_instance['blockName'] = 'core/null';
     92
     93                // Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling
     94                // `render_callback` and ensure that no wrapper markup is included.
    8595                $block_content = (
    8696                        new WP_Block(
    87                                 $block->parsed_block,
     97                                $block_instance,
    8898                                array(
    8999                                        'postType' => get_post_type(),
     
    92102                        )
    93103                )->render( array( 'dynamic' => false ) );
    94                 $post_classes  = implode( ' ', get_post_class( 'wp-block-post' ) );
    95                 $content      .= '<li class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
     104
     105                // Wrap the render inner blocks in a `li` element with the appropriate post classes.
     106                $post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );
     107                $content     .= '<li class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
    96108        }
    97109
Note: See TracChangeset for help on using the changeset viewer.