Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#55410 new enhancement

Update spacer block markup in patterns/templates registered by Twenty Twenty-Two and Core

Reported by: jsnajdr's profile jsnajdr Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

The Twenty Twenty-Two theme registers block patterns and templates that contain deprecated markup for core/spacer blocks. They specify height attribute as a number ("height":50) instead of a string that includes units ("height":"50px"). Because of that, the block parser reports depreciation messages in browser console.

The attached patch updates markup of block patterns and templates registered by modules that don't need to be compatible with pre-5.9 WordPress: the Twenty Twenty-Two theme and Core itself.

Change History (1)

This ticket was mentioned in PR #2422 on WordPress/wordpress-develop by jsnajdr.


2 years ago
#1

The Twenty Twenty-Two theme registers block patterns and templates that contain deprecated markup for core/spacer blocks. They specify height attribute as a number ("height":50) instead of a string that includes units ("height":"50px"). Because of that, the block parser reports a lot of depreciations in browser console, like:

https://i0.wp.com/user-images.githubusercontent.com/664258/158774209-fa4fe6fc-1573-40c7-95b7-f2520510d856.png

The spacer format change was introduced in this PR: https://github.com/WordPress/gutenberg/pull/36186

I'm also updating the core/query-offset-posts pattern registered by Core itself, not by a theme. And one instance of core/cover block which also had deprecated markup.

I'm updating only code that doesn't support WordPress versions older than 5.9, i.e., Core and the Twenty Twenty-Two theme. Other themes, like Twenty Thirteen, also register patterns with deprecated markup, but these also support older versions of WordPress, which wouldn't be able to parse the new format.

Fixes https://core.trac.wordpress.org/ticket/55410

Note: See TracTickets for help on using tickets.