[wp-trac] [WordPress Trac] #60403: General: Add `allowed_blocks` field to block types
WordPress Trac
noreply at wordpress.org
Wed Jan 31 13:52:20 UTC 2024
#60403: General: Add `allowed_blocks` field to block types
-------------------------+-----------------------------
Reporter: jsnajdr | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
-------------------------+-----------------------------
There is a new block.json field called `allowedBlocks`, added in Gutenberg
in https://github.com/WordPress/gutenberg/pull/58262. This is a companion
patch to support this new field also on the server. It ensures that the
following works:
1. If the `allowedBlocks` field is defined in block's `block.json`, the
objects registered in `WP_Block_Type_Registry` will have the
`allowed_blocks` field.
2. The `allowed_blocks` field is returned by the `/wp/v2/block-types` REST
endpoint.
3. The `allowedBlocks` field will be included in the boostrapped block
registration data in the `unstable__bootstrapServerSideBlockDefinitions`
inline script.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60403>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list