#60403 closed enhancement (fixed)
General: Add `allowed_blocks` field to block types
Reported by: | jsnajdr | Owned by: | gziolo |
---|---|---|---|
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
allowedBlocks
field is defined in block'sblock.json
, the objects registered inWP_Block_Type_Registry
will have theallowed_blocks
field. - The
allowed_blocks
field is returned by the/wp/v2/block-types
REST endpoint. - The
allowedBlocks
field will be included in the boostrapped block registration data in theunstable__bootstrapServerSideBlockDefinitions
inline script.
Change History (8)
This ticket was mentioned in PR #5988 on WordPress/wordpress-develop by jsnajdr.
10 months ago
#1
10 months ago
#4
CI is unhappy about something. Other than that, I have enough to commit it tomorrow.
#5
@
10 months ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 57521:
10 months 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:allowedBlocks
field is defined in block'sblock.json
, the objects registered inWP_Block_Type_Registry
will have theallowed_blocks
field.allowed_blocks
field is returned by the/wp/v2/block-types
REST endpoint.allowedBlocks
field will be included in the boostrapped block registration data in theunstable__bootstrapServerSideBlockDefinitions
inline script.Trac ticket: https://core.trac.wordpress.org/ticket/60403