diff --git a/wp-includes/class-wp-block.php b/wp-includes/class-wp-block.php index d4481a68a7..8cfa996028 100644 --- a/wp-includes/class-wp-block.php +++ b/wp-includes/class-wp-block.php @@ -237,6 +237,7 @@ class WP_Block { * * @since 6.5.0 * @since 6.6.0 Handle the `__default` attribute for pattern overrides. + * @since 6.7.0 Return any updated bindings metadata in the computed attributes. * * @return array The computed block attributes for the provided block bindings. */ @@ -284,6 +285,14 @@ class WP_Block { : array( 'source' => 'core/pattern-overrides' ); } $bindings = $updated_bindings; + /* + * Update the bindings metadata of the computed attributes. + * This ensures the block receives the expanded __default binding metadata when it renders. + */ + $computed_attributes['metadata'] = array_merge( + $parsed_block['attrs']['metadata'], + array( 'bindings' => $bindings ) + ); } foreach ( $bindings as $attribute_name => $block_binding ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index d17e0a9bd1..ebb8e5d058 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59094'; +$wp_version = '6.7-alpha-59095'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.