Make WordPress Core

Opened 3 years ago

Last modified 6 weeks ago

#55410 assigned enhancement

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

Reported by: jsnajdr's profile jsnajdr Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 6.0
Component: Bundled Theme Keywords: has-patch needs-testing
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 (4)

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


3 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

#2 @karmatosed
4 months ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to Future Release

#3 @karmatosed
2 months ago

  • Owner set to karmatosed
  • Status changed from new to assigned

Assigning to myself for testing, thank you.

#4 @karmatosed
6 weeks ago

  • Owner karmatosed deleted
Note: See TracTickets for help on using tickets.