Editor: Default attribute value not used with `get_block_wrapper_attributes`

Ensures that the default values defined in the schema for block attributes are used when rendering the output of the block with `get_block_wrapper_attributes` helper.

Props gziolo, jonsurrell, youknowriad, ryelle.
Fixes #62114.


Built from https://develop.svn.wordpress.org/trunk@59093


git-svn-id: http://core.svn.wordpress.org/trunk@58489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
gziolo 2024-09-26 12:47:16 +00:00
parent a8af90bcd1
commit c338d57273
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ class WP_Block_Supports {
}
$block_attributes = array_key_exists( 'attrs', self::$block_to_render ) && is_array( self::$block_to_render['attrs'] )
? self::$block_to_render['attrs']
? $block_type->prepare_attributes_for_render( self::$block_to_render['attrs'] )
: array();
$output = array();

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-59092';
$wp_version = '6.7-alpha-59093';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.