mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@53157 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
<div class="wp-block-column">
|
||||
<div class="wp-container-1 wp-block-column">
|
||||
|
||||
<p>Column One, Paragraph One</p>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<div class="wp-block-columns has-3-columns">
|
||||
<div class="wp-container-1 wp-block-columns has-3-columns">
|
||||
|
||||
<div class="wp-block-column">
|
||||
<div class="wp-container-1 wp-block-column">
|
||||
|
||||
<p>Column One, Paragraph One</p>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wp-block-column">
|
||||
<div class="wp-container-1 wp-block-column">
|
||||
|
||||
<p>Column Two, Paragraph One</p>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<div class="wp-block-columns has-3-columns">
|
||||
<div class="wp-container-1 wp-block-columns has-3-columns">
|
||||
|
||||
<p class="layout-column-1">Column One, Paragraph One</p>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<ul class="wp-block-gallery columns-2 is-cropped">
|
||||
<ul class="wp-container-1 wp-block-gallery-1 wp-block-gallery columns-2 is-cropped">
|
||||
<li class="blocks-gallery-item">
|
||||
<figure>
|
||||
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<ul class="wp-block-gallery columns-1 is-cropped">
|
||||
<ul class="wp-container-1 wp-block-gallery-1 wp-block-gallery columns-1 is-cropped">
|
||||
<li class="blocks-gallery-item">
|
||||
<figure>
|
||||
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
|
||||
|
||||
@@ -303,11 +303,23 @@ tests_add_filter( 'send_auth_cookies', '__return_false' );
|
||||
*/
|
||||
function _unhook_block_registration() {
|
||||
remove_action( 'init', 'register_block_core_archives' );
|
||||
remove_action( 'init', 'register_block_core_avatar' );
|
||||
remove_action( 'init', 'register_block_core_block' );
|
||||
remove_action( 'init', 'register_block_core_calendar' );
|
||||
remove_action( 'init', 'register_block_core_categories' );
|
||||
remove_action( 'init', 'register_block_core_comment_author_name' );
|
||||
remove_action( 'init', 'register_block_core_comment_content' );
|
||||
remove_action( 'init', 'register_block_core_comment_date' );
|
||||
remove_action( 'init', 'register_block_core_comment_edit_link' );
|
||||
remove_action( 'init', 'register_block_core_comment_reply_link' );
|
||||
remove_action( 'init', 'register_block_core_comment_template' );
|
||||
remove_action( 'init', 'register_block_core_comments_pagination' );
|
||||
remove_action( 'init', 'register_block_core_comments_pagination_next' );
|
||||
remove_action( 'init', 'register_block_core_comments_pagination_numbers' );
|
||||
remove_action( 'init', 'register_block_core_comments_pagination_previous' );
|
||||
remove_action( 'init', 'register_block_core_file' );
|
||||
remove_action( 'init', 'register_block_core_gallery' );
|
||||
remove_action( 'init', 'register_block_core_home_link' );
|
||||
remove_action( 'init', 'register_block_core_image' );
|
||||
remove_action( 'init', 'register_block_core_latest_comments' );
|
||||
remove_action( 'init', 'register_block_core_latest_posts' );
|
||||
@@ -319,6 +331,7 @@ function _unhook_block_registration() {
|
||||
remove_action( 'init', 'register_block_core_page_list' );
|
||||
remove_action( 'init', 'register_block_core_pattern' );
|
||||
remove_action( 'init', 'register_block_core_post_author' );
|
||||
remove_action( 'init', 'register_block_core_post_author_biography' );
|
||||
remove_action( 'init', 'register_block_core_post_comments' );
|
||||
remove_action( 'init', 'register_block_core_post_content' );
|
||||
remove_action( 'init', 'register_block_core_post_date' );
|
||||
@@ -329,11 +342,13 @@ function _unhook_block_registration() {
|
||||
remove_action( 'init', 'register_block_core_post_terms' );
|
||||
remove_action( 'init', 'register_block_core_post_title' );
|
||||
remove_action( 'init', 'register_block_core_query' );
|
||||
remove_action( 'init', 'register_block_core_query_no_results' );
|
||||
remove_action( 'init', 'register_block_core_query_pagination' );
|
||||
remove_action( 'init', 'register_block_core_query_pagination_next' );
|
||||
remove_action( 'init', 'register_block_core_query_pagination_numbers' );
|
||||
remove_action( 'init', 'register_block_core_query_pagination_previous' );
|
||||
remove_action( 'init', 'register_block_core_query_title' );
|
||||
remove_action( 'init', 'register_block_core_read_more' );
|
||||
remove_action( 'init', 'register_block_core_rss' );
|
||||
remove_action( 'init', 'register_block_core_search' );
|
||||
remove_action( 'init', 'register_block_core_shortcode' );
|
||||
|
||||
@@ -219,12 +219,20 @@ class Tests_Blocks_Render extends WP_UnitTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
$html = do_blocks( self::strip_r( file_get_contents( $html_path ) ) );
|
||||
$expected_html = self::strip_r( file_get_contents( $server_html_path ) );
|
||||
$html = do_blocks( self::strip_r( file_get_contents( $html_path ) ) );
|
||||
// If blocks opt into Gutenberg's layout implementation
|
||||
// the container will receive an added classname of `wp_unique_id( 'wp-container-' )`
|
||||
// so we need to normalize the random id.
|
||||
$normalized_html = preg_replace( '/wp-container-\d+/', 'wp-container-1', $html );
|
||||
|
||||
// The gallery block uses a unique class name of `wp_unique_id( 'wp-block-gallery-' )`
|
||||
// so we need to normalize the random id.
|
||||
$normalized_html = preg_replace( '/wp-block-gallery-\d+/', 'wp-block-gallery-1', $normalized_html );
|
||||
$expected_html = self::strip_r( file_get_contents( $server_html_path ) );
|
||||
|
||||
$this->assertSame(
|
||||
$expected_html,
|
||||
$html,
|
||||
$normalized_html,
|
||||
"File '$html_path' does not match expected value"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user