Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51529 closed enhancement (fixed)

Add the new api_version property to the block type object.

Reported by: youknowriad's profile youknowriad Owned by: youknowriad's profile 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.


4 years ago
#1

  • Keywords has-patch added

TimothyBJacobs commented on PR #604:


4 years ago
#2

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

youknowriad commented on PR #604:


4 years ago
#3

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

youknowriad commented on PR #604:


4 years ago
#4

How is this looking?

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


4 years ago

#6 @youknowriad
4 years 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.