Skip to content

Commit cffdb43

Browse files
committed
Block Bindings: Migrate term-data from key args to field.
Adds new `field` argument for term-data source. Props bernhard-reiter. Fixes #64112. git-svn-id: https://develop.svn.wordpress.org/trunk@60958 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0948260 commit cffdb43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-includes/block-bindings/term-data.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* @access private
1515
*
1616
* @param array $source_args Array containing source arguments used to look up the override value.
17-
* Example: array( "key" => "name" ).
17+
* Example: array( "field" => "name" ).
1818
* @param WP_Block $block_instance The block instance.
1919
* @return mixed The value computed for the source.
2020
*/
2121
function _block_bindings_term_data_get_value( array $source_args, $block_instance ) {
22-
if ( empty( $source_args['key'] ) ) {
22+
if ( empty( $source_args['field'] ) ) {
2323
return null;
2424
}
2525

@@ -65,7 +65,7 @@ function _block_bindings_term_data_get_value( array $source_args, $block_instanc
6565
}
6666
}
6767

68-
switch ( $source_args['key'] ) {
68+
switch ( $source_args['field'] ) {
6969
case 'id':
7070
return esc_html( (string) $term_id );
7171

0 commit comments

Comments
 (0)