WordPress.org

Make WordPress Core

Opened 13 days ago

Closed 8 days 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:

Description

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.


13 days ago

  • Keywords has-patch added

#2 @prbot
13 days ago

TimothyBJacobs commented on PR #604:

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

#3 @prbot
13 days ago

youknowriad commented on PR #604:

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

#4 @prbot
9 days ago

youknowriad commented on PR #604:

How is this looking?

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


9 days ago

#6 @youknowriad
8 days 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.