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:
parent
a8af90bcd1
commit
c338d57273
|
@ -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'] )
|
$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();
|
: array();
|
||||||
|
|
||||||
$output = array();
|
$output = array();
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue