Editor: Update block editor packages for WordPress 6.0.1.

This brings a new version of the Gutenberg code from the [https://github.com/WordPress/gutenberg/tree/wp/6.0 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.
Merges [53644] to the 6.0 branch.
See #56058.

git-svn-id: https://develop.svn.wordpress.org/branches/6.0@53645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-07-04 12:08:32 +00:00
parent efead24c16
commit 175f3088f1
11 changed files with 1594 additions and 1507 deletions

3006
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -81,55 +81,55 @@
"@wordpress/api-fetch": "6.3.1",
"@wordpress/autop": "3.6.1",
"@wordpress/blob": "3.6.1",
"@wordpress/block-directory": "3.4.11",
"@wordpress/block-editor": "8.5.8",
"@wordpress/block-library": "7.3.11",
"@wordpress/block-directory": "3.4.12",
"@wordpress/block-editor": "8.5.9",
"@wordpress/block-library": "7.3.12",
"@wordpress/block-serialization-default-parser": "4.6.1",
"@wordpress/blocks": "11.5.3",
"@wordpress/components": "19.8.4",
"@wordpress/components": "19.8.5",
"@wordpress/compose": "5.4.1",
"@wordpress/core-data": "4.4.5",
"@wordpress/customize-widgets": "3.3.11",
"@wordpress/customize-widgets": "3.3.12",
"@wordpress/data": "6.6.1",
"@wordpress/data-controls": "2.6.1",
"@wordpress/date": "4.6.1",
"@wordpress/deprecated": "3.6.1",
"@wordpress/dom": "3.6.1",
"@wordpress/dom-ready": "3.6.1",
"@wordpress/edit-post": "6.3.11",
"@wordpress/edit-site": "4.3.11",
"@wordpress/edit-widgets": "4.3.11",
"@wordpress/editor": "12.5.8",
"@wordpress/edit-post": "6.3.12",
"@wordpress/edit-site": "4.3.12",
"@wordpress/edit-widgets": "4.3.12",
"@wordpress/editor": "12.5.9",
"@wordpress/element": "4.4.1",
"@wordpress/escape-html": "2.6.1",
"@wordpress/format-library": "3.4.8",
"@wordpress/format-library": "3.4.9",
"@wordpress/hooks": "3.6.1",
"@wordpress/html-entities": "3.6.1",
"@wordpress/i18n": "4.6.1",
"@wordpress/icons": "8.2.2",
"@wordpress/interface": "4.5.5",
"@wordpress/icons": "8.2.3",
"@wordpress/interface": "4.5.6",
"@wordpress/is-shallow-equal": "4.6.1",
"@wordpress/keyboard-shortcuts": "3.4.1",
"@wordpress/keycodes": "3.6.1",
"@wordpress/list-reusable-blocks": "3.4.4",
"@wordpress/list-reusable-blocks": "3.4.5",
"@wordpress/media-utils": "3.4.1",
"@wordpress/notices": "3.6.1",
"@wordpress/nux": "5.4.4",
"@wordpress/plugins": "4.4.2",
"@wordpress/preferences": "1.2.4",
"@wordpress/nux": "5.4.5",
"@wordpress/plugins": "4.4.3",
"@wordpress/preferences": "1.2.5",
"@wordpress/primitives": "3.4.1",
"@wordpress/priority-queue": "2.6.1",
"@wordpress/redux-routine": "4.6.1",
"@wordpress/reusable-blocks": "3.4.8",
"@wordpress/reusable-blocks": "3.4.9",
"@wordpress/rich-text": "5.4.2",
"@wordpress/server-side-render": "3.4.5",
"@wordpress/server-side-render": "3.4.6",
"@wordpress/shortcode": "3.6.1",
"@wordpress/style-engine": "0.5.1",
"@wordpress/token-list": "2.6.1",
"@wordpress/url": "3.7.1",
"@wordpress/viewport": "4.4.1",
"@wordpress/warning": "2.6.1",
"@wordpress/widgets": "2.4.8",
"@wordpress/widgets": "2.4.9",
"@wordpress/wordcount": "3.6.1",
"backbone": "1.4.1",
"clipboard": "2.0.10",

File diff suppressed because one or more lines are too long

View File

@ -18,10 +18,6 @@
},
"textAlign": {
"type": "string"
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"usesContext": [ "commentId" ],

View File

@ -24,9 +24,6 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
}
$classes = '';
if ( isset( $attributes['fontSize'] ) ) {
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$formatted_date = get_comment_date(

View File

@ -14,10 +14,6 @@
"isLink": {
"type": "boolean",
"default": true
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"usesContext": [ "commentId" ],

View File

@ -15,10 +15,6 @@
},
"textAlign": {
"type": "string"
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"supports": {

View File

@ -11,10 +11,6 @@
"attributes": {
"textAlign": {
"type": "string"
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"supports": {

View File

@ -32,12 +32,15 @@ function render_block_core_cover( $attributes, $content ) {
$image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
$content = str_replace(
'</span><div',
'</span>' . $image . '<div',
$content
);
/*
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
* and removes eventual withespace characters between the two (typically introduced at template level)
*/
$inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
$offset = $matches[0][1];
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
}
} else {
if ( in_the_loop() ) {
update_post_thumbnail_cache();

View File

@ -86,7 +86,8 @@ function block_core_gallery_render( $attributes, $content ) {
'wp_footer',
function () use ( $style ) {
echo '<style> ' . $style . '</style>';
}
},
11
);
return $content;
}

View File

@ -82,17 +82,29 @@ function render_block_core_post_template( $attributes, $content, $block ) {
$content = '';
while ( $query->have_posts() ) {
$query->the_post();
// Get an instance of the current Post Template block.
$block_instance = $block->parsed_block;
// Set the block name to one that does not correspond to an existing registered block.
// This ensures that for the inner instances of the Post Template block, we do not render any block supports.
$block_instance['blockName'] = 'core/null';
// Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling
// `render_callback` and ensure that no wrapper markup is included.
$block_content = (
new WP_Block(
$block->parsed_block,
$block_instance,
array(
'postType' => get_post_type(),
'postId' => get_the_ID(),
)
)
)->render( array( 'dynamic' => false ) );
$post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );
$content .= '<li class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
// Wrap the render inner blocks in a `li` element with the appropriate post classes.
$post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );
$content .= '<li class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
}
wp_reset_postdata();