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/cover.php

    r53377 r53644  
    3333        $image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
    3434
    35         $content = str_replace(
    36             '</span><div',
    37             '</span>' . $image . '<div',
    38             $content
    39         );
    40 
     35        /*
     36         * Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
     37         * and removes eventual withespace characters between the two (typically introduced at template level)
     38         */
     39        $inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
     40        if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
     41            $offset  = $matches[0][1];
     42            $content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
     43        }
    4144    } else {
    4245        if ( in_the_loop() ) {
Note: See TracChangeset for help on using the changeset viewer.