Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/wp-includes/block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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' ),
Expand Down
10 changes: 10 additions & 0 deletions tests/phpunit/tests/block-bindings/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ public function data_update_block_with_value_from_source() {
,
'<p>test source value</p>',
),
'list item block' => array(
'content',
<<<HTML
<!-- wp:list-item -->
<li>This should not appear</li>
<!-- /wp:list-item -->
HTML
,
'<li>test source value</li>',
),
);
}

Expand Down
Loading