[wp-trac] [WordPress Trac] #52512: Blocks: Add missing apiVersion field when preparing server-registered blocks for the block editor
WordPress Trac
noreply at wordpress.org
Fri Feb 12 15:54:20 UTC 2021
#52512: Blocks: Add missing apiVersion field when preparing server-registered
blocks for the block editor
--------------------------+-----------------------
Reporter: gziolo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.7
Component: Editor | Version:
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------
When working on changes to `@wordpress/create-block` tool to use
`register_block_type_from_metadata` with `block.json` file in the
templates for scaffolded blocks I run into this issue where `apiVersion`
wasn't exposed from the server. This patch tries to address it.
I also double-checked that all necessary fields exposed in the REST API
endpoint with block types are included
`get_block_editor_server_block_settings` call that is eventually going to
be deprecated in favor of the former. See the list for reference:
https://developer.wordpress.org/rest-api/reference/block-types/
In the patch attached I also reordered the list of fields to match the
REST API documentation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52512>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list