You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Block Bindings: Expose bindable attributes through an annotation in the block definition #64756
If we use role: content to determine which attributes are bindable, would we still need a bindable: boolean flag?
If we go with role: content as the bindings enabler, I imagine some developers would want the ability to opt content attributes out of block bindings. To address this, one option is to use the flag, though perhaps creating a list and accompanying filter for NOT_ALLOWED_BLOCKS could be a better approach.
Thanks for opening this! Since WordPress 6.9 there's an official way to find out which attributes are bindable: get_block_bindings_supported_attributes( $block_type ) in PHP, filterable via block_bindings_supported_attributes (#71663), and the same map is passed to the editor (#71820). So hard-coding the list is no longer necessary. Closing as addressed. If you specifically need a block.json annotation or a stable JS selector, please open a new issue describing that use case.
Activity
gziolo commentedon Sep 9, 2024
There is a slightly related prior exploration from @retrofox for exposing the list of allowed blocks and attributes from the source:
@fabiankaegy described how we can build on top of the idea shared in this issue to open dynamic blocks for overrides/bindings:
artemiomorales commentedon Nov 4, 2024
If we use
role: contentto determine which attributes are bindable, would we still need abindable: booleanflag?If we go with
role: contentas the bindings enabler, I imagine some developers would want the ability to opt content attributes out of block bindings. To address this, one option is to use the flag, though perhaps creating a list and accompanying filter for NOT_ALLOWED_BLOCKS could be a better approach.youknowriad commentedon Oct 12, 2026
Thanks for opening this! Since WordPress 6.9 there's an official way to find out which attributes are bindable:
get_block_bindings_supported_attributes( $block_type )in PHP, filterable viablock_bindings_supported_attributes(#71663), and the same map is passed to the editor (#71820). So hard-coding the list is no longer necessary. Closing as addressed. If you specifically need a block.json annotation or a stable JS selector, please open a new issue describing that use case.