mirror of
git://develop.git.wordpress.org/
synced 2025-04-12 08:02:05 +02:00
Block Editor: Update packages with latest fixes for 5.8 RC2
Includes the following fixes: - [Block Library]: Less warnings when blocks try to render themselves. - Reset z-index on focused widget form - Refactor appender margin. - Fix slash inserter for widgets screen. - Widget screens: set html block as freeform content handler. - Widget Block: widget_id is undefined when a widget is placed. - Add <CopyHandler> to WidgetAreasBlockEditorProvider - Add width: 100% to components-base-control inside wp-block-legacy-widget - [Widgets editor] Replace the "technical" error notice a more user-friendly one - Fix legacy widget height overflow - Fix "Select all" behavior in the editor - Increase specificity of the NoPreview CSS rules to avoid conflicts with theme styles - Fix move to widget area checkmark - Replace legacy widget icon with its new version - [Block Library - Query Loop]: Set default block variations not to inherit from global query Merges [51344] to the 5.8 branch. Fixes #53397. git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51346 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f3f9ba9d03
commit
5b3c331cb3
788
package-lock.json
generated
788
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
56
package.json
56
package.json
@ -78,56 +78,56 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@wordpress/a11y": "3.1.1",
|
||||
"@wordpress/annotations": "2.1.2",
|
||||
"@wordpress/annotations": "2.1.3",
|
||||
"@wordpress/api-fetch": "5.1.1",
|
||||
"@wordpress/autop": "3.1.1",
|
||||
"@wordpress/blob": "3.1.1",
|
||||
"@wordpress/block-directory": "2.1.14",
|
||||
"@wordpress/block-editor": "6.1.8",
|
||||
"@wordpress/block-library": "3.2.12",
|
||||
"@wordpress/block-directory": "2.1.15",
|
||||
"@wordpress/block-editor": "6.1.9",
|
||||
"@wordpress/block-library": "3.2.13",
|
||||
"@wordpress/block-serialization-default-parser": "4.1.1",
|
||||
"@wordpress/blocks": "9.1.4",
|
||||
"@wordpress/components": "14.1.5",
|
||||
"@wordpress/compose": "4.1.2",
|
||||
"@wordpress/core-data": "3.1.8",
|
||||
"@wordpress/customize-widgets": "1.0.13",
|
||||
"@wordpress/data": "5.1.2",
|
||||
"@wordpress/data-controls": "2.1.2",
|
||||
"@wordpress/blocks": "9.1.5",
|
||||
"@wordpress/components": "14.1.6",
|
||||
"@wordpress/compose": "4.1.3",
|
||||
"@wordpress/core-data": "3.1.9",
|
||||
"@wordpress/customize-widgets": "1.0.14",
|
||||
"@wordpress/data": "5.1.3",
|
||||
"@wordpress/data-controls": "2.1.3",
|
||||
"@wordpress/date": "4.1.1",
|
||||
"@wordpress/deprecated": "3.1.1",
|
||||
"@wordpress/dom": "3.1.1",
|
||||
"@wordpress/dom": "3.1.2",
|
||||
"@wordpress/dom-ready": "3.1.1",
|
||||
"@wordpress/edit-post": "4.1.14",
|
||||
"@wordpress/edit-widgets": "2.1.14",
|
||||
"@wordpress/editor": "10.1.11",
|
||||
"@wordpress/edit-post": "4.1.15",
|
||||
"@wordpress/edit-widgets": "2.1.15",
|
||||
"@wordpress/editor": "10.1.12",
|
||||
"@wordpress/element": "3.1.1",
|
||||
"@wordpress/escape-html": "2.1.1",
|
||||
"@wordpress/format-library": "2.1.8",
|
||||
"@wordpress/format-library": "2.1.9",
|
||||
"@wordpress/hooks": "3.1.1",
|
||||
"@wordpress/html-entities": "3.1.1",
|
||||
"@wordpress/i18n": "4.1.1",
|
||||
"@wordpress/icons": "4.0.1",
|
||||
"@wordpress/interface": "3.1.6",
|
||||
"@wordpress/icons": "4.0.2",
|
||||
"@wordpress/interface": "3.1.7",
|
||||
"@wordpress/is-shallow-equal": "4.1.1",
|
||||
"@wordpress/keyboard-shortcuts": "2.1.2",
|
||||
"@wordpress/keyboard-shortcuts": "2.1.3",
|
||||
"@wordpress/keycodes": "3.1.1",
|
||||
"@wordpress/list-reusable-blocks": "2.1.5",
|
||||
"@wordpress/list-reusable-blocks": "2.1.6",
|
||||
"@wordpress/media-utils": "2.1.1",
|
||||
"@wordpress/notices": "3.1.2",
|
||||
"@wordpress/nux": "4.1.5",
|
||||
"@wordpress/plugins": "3.1.2",
|
||||
"@wordpress/notices": "3.1.3",
|
||||
"@wordpress/nux": "4.1.6",
|
||||
"@wordpress/plugins": "3.1.3",
|
||||
"@wordpress/primitives": "2.1.1",
|
||||
"@wordpress/priority-queue": "2.1.1",
|
||||
"@wordpress/redux-routine": "4.1.1",
|
||||
"@wordpress/reusable-blocks": "2.1.11",
|
||||
"@wordpress/rich-text": "4.1.2",
|
||||
"@wordpress/server-side-render": "2.1.6",
|
||||
"@wordpress/reusable-blocks": "2.1.12",
|
||||
"@wordpress/rich-text": "4.1.3",
|
||||
"@wordpress/server-side-render": "2.1.7",
|
||||
"@wordpress/shortcode": "3.1.1",
|
||||
"@wordpress/token-list": "2.1.1",
|
||||
"@wordpress/url": "3.1.1",
|
||||
"@wordpress/viewport": "3.1.2",
|
||||
"@wordpress/viewport": "3.1.3",
|
||||
"@wordpress/warning": "2.1.1",
|
||||
"@wordpress/widgets": "1.1.13",
|
||||
"@wordpress/widgets": "1.1.14",
|
||||
"@wordpress/wordcount": "3.1.1",
|
||||
"backbone": "1.4.0",
|
||||
"clipboard": "2.0.8",
|
||||
|
File diff suppressed because one or more lines are too long
@ -25,17 +25,6 @@ function render_block_core_block( $attributes ) {
|
||||
}
|
||||
|
||||
if ( isset( $seen_refs[ $attributes['ref'] ] ) ) {
|
||||
if ( ! is_admin() ) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
// translators: %s is the user-provided title of the reusable block.
|
||||
__( 'Could not render Reusable Block <strong>%s</strong>. Block cannot be rendered inside itself.' ),
|
||||
$reusable_block->post_title
|
||||
),
|
||||
E_USER_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
// WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent
|
||||
// is set in `wp_debug_mode()`.
|
||||
$is_debug = defined( 'WP_DEBUG' ) && WP_DEBUG &&
|
||||
|
@ -25,13 +25,15 @@ function render_block_core_legacy_widget( $attributes ) {
|
||||
}
|
||||
|
||||
$id_base = $attributes['idBase'];
|
||||
if ( method_exists( $wp_widget_factory, 'get_widget_key' ) ) {
|
||||
$widget_key = $wp_widget_factory->get_widget_key( $id_base );
|
||||
if ( method_exists( $wp_widget_factory, 'get_widget_key' ) && method_exists( $wp_widget_factory, 'get_widget_object' ) ) {
|
||||
$widget_key = $wp_widget_factory->get_widget_key( $id_base );
|
||||
$widget_object = $wp_widget_factory->get_widget_object( $id_base );
|
||||
} else {
|
||||
$widget_key = gutenberg_get_widget_key( $id_base );
|
||||
$widget_key = gutenberg_get_widget_key( $id_base );
|
||||
$widget_object = gutenberg_get_widget_object( $id_base );
|
||||
}
|
||||
|
||||
if ( ! $widget_key ) {
|
||||
if ( ! $widget_key || ! $widget_object ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -45,8 +47,13 @@ function render_block_core_legacy_widget( $attributes ) {
|
||||
$instance = array();
|
||||
}
|
||||
|
||||
$args = array(
|
||||
'widget_id' => $widget_object->id,
|
||||
'widget_name' => $widget_object->name,
|
||||
);
|
||||
|
||||
ob_start();
|
||||
the_widget( $widget_key, $instance );
|
||||
the_widget( $widget_key, $instance, $args );
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
|
@ -23,19 +23,11 @@ function render_block_core_post_content( $attributes, $content, $block ) {
|
||||
$post_id = $block->context['postId'];
|
||||
|
||||
if ( isset( $seen_ids[ $post_id ] ) ) {
|
||||
if ( ! is_admin() ) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
// translators: %s is a post ID (integer).
|
||||
__( 'Could not render Post Content block with post ID: <code>%s</code>. Block cannot be rendered inside itself.' ),
|
||||
$post_id
|
||||
),
|
||||
E_USER_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
// WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent
|
||||
// is set in `wp_debug_mode()`.
|
||||
$is_debug = defined( 'WP_DEBUG' ) && WP_DEBUG &&
|
||||
defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY;
|
||||
|
||||
return $is_debug ?
|
||||
// translators: Visible only in the front end, this warning takes the place of a faulty block.
|
||||
__( '[block rendering halted]' ) :
|
||||
@ -44,7 +36,7 @@ function render_block_core_post_content( $attributes, $content, $block ) {
|
||||
|
||||
$seen_ids[ $post_id ] = true;
|
||||
|
||||
if ( ! in_the_loop() ) {
|
||||
if ( ! in_the_loop() && have_posts() ) {
|
||||
the_post();
|
||||
}
|
||||
|
||||
|
@ -100,26 +100,6 @@ class WP_Test_Render_Reusable_Blocks extends WP_UnitTestCase {
|
||||
$this->assertSame( '<p>Hello world!</p><p>Hello world!</p>', $output );
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw a warning if blocks are recursively nested.
|
||||
*
|
||||
* @ticket 52364
|
||||
*/
|
||||
public function test_recursive_render_warning() {
|
||||
$recursive_reusable_block = array(
|
||||
'ID' => self::$block_id,
|
||||
'post_content' => '<!-- wp:block {"ref":' . self::$block_id . '} /-->',
|
||||
);
|
||||
wp_update_post( $recursive_reusable_block );
|
||||
|
||||
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( 'core/block' );
|
||||
|
||||
// The block_render method for `core/block` triggers a user warning if it
|
||||
// encounters a recursively nested block.
|
||||
$this->expectException( 'PHPUnit_Framework_Error_Warning' );
|
||||
$block_type->render( array( 'ref' => self::$block_id ) );
|
||||
}
|
||||
|
||||
public function test_ref_empty() {
|
||||
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( 'core/block' );
|
||||
$output = $block_type->render( array() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user