Skip to content

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

Open
jsnajdr wants to merge 1 commit into
WordPress:trunkfrom
jsnajdr:update/spacer-blocks
Open

Update spacer block markup in patterns/templates registered by Twenty Twenty-Two and Core#2422
jsnajdr wants to merge 1 commit into
WordPress:trunkfrom
jsnajdr:update/spacer-blocks

Conversation

@jsnajdr
Copy link
Copy Markdown
Member

@jsnajdr jsnajdr commented Mar 17, 2022

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:

Screenshot 2022-03-17 at 9 55 43

The spacer format change was introduced in this PR: WordPress/gutenberg#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant