Make WordPress Core


Ignore:
Timestamp:
04/12/2022 03:10:30 PM (3 years ago)
Author:
gziolo
Message:

Editor: Update WordPress packages based based on Gutenberg v13.0 RC3

This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included:

  • Avatar
  • Comment Author Name
  • Comment Content
  • Comment Date
  • Comment Edit Link
  • Comment Rely Link
  • Comment Template
  • Comments Pagination
  • Comments Pagination Next
  • Comments Pagination Previous
  • Comments Query Loop
  • Home Link
  • Post Author Biography
  • Query No Results
  • Read More

See more details in https://github.com/WordPress/wordpress-develop/pull/2564.

Props zieladam, ramonopoly, ocean90.
Fixes #55505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/render.php

    r52010 r53157  
    220220        }
    221221
    222         $html          = do_blocks( self::strip_r( file_get_contents( $html_path ) ) );
    223         $expected_html = self::strip_r( file_get_contents( $server_html_path ) );
     222        $html = do_blocks( self::strip_r( file_get_contents( $html_path ) ) );
     223        // If blocks opt into Gutenberg's layout implementation
     224        // the container will receive an added classname of `wp_unique_id( 'wp-container-' )`
     225        // so we need to normalize the random id.
     226        $normalized_html = preg_replace( '/wp-container-\d+/', 'wp-container-1', $html );
     227
     228        // The gallery block uses a unique class name of `wp_unique_id( 'wp-block-gallery-' )`
     229        // so we need to normalize the random id.
     230        $normalized_html = preg_replace( '/wp-block-gallery-\d+/', 'wp-block-gallery-1', $normalized_html );
     231        $expected_html   = self::strip_r( file_get_contents( $server_html_path ) );
    224232
    225233        $this->assertSame(
    226234            $expected_html,
    227             $html,
     235            $normalized_html,
    228236            "File '$html_path' does not match expected value"
    229237        );
Note: See TracChangeset for help on using the changeset viewer.