#60403 closed enhancement (fixed)
General: Add `allowed_blocks` field to block types
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.5 | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | Editor | Keywords: | has-patch has-unit-tests add-to-field-guide |
| Focuses: | Cc: |
Description
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:
- If the
allowedBlocksfield is defined in block'sblock.json, the objects registered inWP_Block_Type_Registrywill have theallowed_blocksfield. - The
allowed_blocksfield is returned by the/wp/v2/block-typesREST endpoint. - The
allowedBlocksfield will be included in the boostrapped block registration data in theunstable__bootstrapServerSideBlockDefinitionsinline script.
Change History (8)
This ticket was mentioned in PR #5988 on WordPress/wordpress-develop by jsnajdr.
2 years ago
#1
#5
@
2 years ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 57521:
2 years ago
#6
Committed with https://core.trac.wordpress.org/changeset/57521.
Note: See
TracTickets for help on using
tickets.
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:allowedBlocksfield is defined in block'sblock.json, the objects registered inWP_Block_Type_Registrywill have theallowed_blocksfield.allowed_blocksfield is returned by the/wp/v2/block-typesREST endpoint.allowedBlocksfield will be included in the boostrapped block registration data in theunstable__bootstrapServerSideBlockDefinitionsinline script.Trac ticket: https://core.trac.wordpress.org/ticket/60403