#52512 closed defect (bug) (fixed)
Blocks: Add missing apiVersion field when preparing server-registered blocks for the block editor
Reported by: | gziolo | Owned by: | gziolo |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
When working on changes to @wordpress/create-block
tool (https://github.com/WordPress/gutenberg/pull/28883) 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.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 50297: