Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#51529 closed enhancement (fixed)

Add the new api_version property to the block type object.

Reported by: youknowriad Owned by: youknowriad
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: Cc:


In WordPress 5.6, we're introducing an apiVersion for the block.json shape.
We need to update the register_block_type_from_metadata function to map this property properly to the block type object in order to be able to use for server-side rendering.

Change History (6)

This ticket was mentioned in PR #604 on WordPress/wordpress-develop by youknowriad.

6 months ago

  • Keywords has-patch added

#2 @prbot
6 months ago

TimothyBJacobs commented on PR #604:

Should we include adding this to the REST controller in the ticket too?

#3 @prbot
6 months ago

youknowriad commented on PR #604:

@TimothyBJacobs sure, not sure where exactly I should add that but I'll take a look.

#4 @prbot
6 months ago

youknowriad commented on PR #604:

How is this looking?

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.

6 months ago

#6 @youknowriad
6 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 49224:

Block Editor: Expose api_version in the block type and the REST endpoint.

The new block editor included in 5.6 introduces an api_version property
that indicates which block API version the block is using.
This commits makes this property available on the block type and the endpoint.

Props TimothyBlynJacobs, gziolo.
Fixes #51529.

Note: See TracTickets for help on using tickets.