Block Bindings: Migrate term-data from key args to field.

Adds new `field` argument for term-data source.

Props bernhard-reiter.
Fixes #64112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
cbravobernal
2025-10-17 17:39:30 +00:00
parent b5ed034920
commit 8f083ab7ef
2 changed files with 4 additions and 4 deletions

View File

@@ -14,12 +14,12 @@
* @access private
*
* @param array $source_args Array containing source arguments used to look up the override value.
* Example: array( "key" => "name" ).
* Example: array( "field" => "name" ).
* @param WP_Block $block_instance The block instance.
* @return mixed The value computed for the source.
*/
function _block_bindings_term_data_get_value( array $source_args, $block_instance ) {
if ( empty( $source_args['key'] ) ) {
if ( empty( $source_args['field'] ) ) {
return null;
}
@@ -65,7 +65,7 @@ function _block_bindings_term_data_get_value( array $source_args, $block_instanc
}
}
switch ( $source_args['key'] ) {
switch ( $source_args['field'] ) {
case 'id':
return esc_html( (string) $term_id );

View File

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