diff --git a/src/wp-includes/block-bindings.php b/src/wp-includes/block-bindings.php index 268bb6afa66bb..5a20c023149d7 100644 --- a/src/wp-includes/block-bindings.php +++ b/src/wp-includes/block-bindings.php @@ -134,6 +134,7 @@ function get_block_bindings_source( string $source_name ) { * Retrieves the list of block attributes supported by block bindings. * * @since 6.9.0 + * @since 7.1.0 Added support for the List Item block. * * @param string $block_type The block type whose supported attributes are being retrieved. * @return array The list of block attributes that are supported by block bindings. @@ -142,6 +143,7 @@ function get_block_bindings_supported_attributes( $block_type ) { $block_bindings_supported_attributes = array( 'core/paragraph' => array( 'content' ), 'core/heading' => array( 'content' ), + 'core/list-item' => array( 'content' ), 'core/image' => array( 'id', 'url', 'title', 'alt', 'caption' ), 'core/button' => array( 'url', 'text', 'linkTarget', 'rel' ), 'core/post-date' => array( 'datetime' ), diff --git a/tests/phpunit/tests/block-bindings/render.php b/tests/phpunit/tests/block-bindings/render.php index 77b0975105dc5..172bdff71315d 100644 --- a/tests/phpunit/tests/block-bindings/render.php +++ b/tests/phpunit/tests/block-bindings/render.php @@ -122,6 +122,16 @@ public function data_update_block_with_value_from_source() { , '

test source value

', ), + 'list item block' => array( + 'content', + << +
  • This should not appear
  • + +HTML + , + '
  • test source value
  • ', + ), ); }