Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61789 closed defect (bug) (fixed)

Bundled themes: Update schema version in style variation files

Reported by: poena Owned by: SergeyBiryukov
Priority: normal Milestone: 6.7
Component: Bundled Theme Version:
Severity: normal Keywords: good-first-bug has-patch
Cc: Focuses:

Description

In #61342 the schema version in theme.json was updated in Twenty Twenty-Two, Twenty Twenty-Three and Twenty Twenty-Four.

The style variation files in the styles folder must also be updated.
If the style variation has the wrong schema, code editors that support schema may show that settings or styles are invalid.

In case the style variation does not have a schema, it should be added.

The version that should be added is 6.5. Example:

"$schema": "https://schemas.wp.org/wp/6.5/theme.json",

Documentation:
​https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/theme-json-v2/#json-schema

Files that need updating:
https://core.trac.wordpress.org/browser/branches/6.6/src/wp-content/themes/twentytwentythree/styles

https://core.trac.wordpress.org/browser/branches/6.6/src/wp-content/themes/twentytwentytwo/styles

https://core.trac.wordpress.org/browser/branches/6.6/src/wp-content/themes/twentytwentyfour/styles

Change History (8)

#1 @poena
2 years ago

  • Keywords good-first-bug added

#2 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review → 6.7

This ticket was mentioned in ​PR #7111 on ​WordPress/wordpress-develop by ​@umeshsinghin.


2 years ago
#3

  • Keywords has-patch added

#4 @poena
2 years ago

  • Keywords changes-requested added

Hi @umeshsinghin thank you for the pull request.

The schema needs to be

"$schema": "https://schemas.wp.org/wp/6.5/theme.json",

not

"$schema": "https://schemas.wp.org/wp/6.6/theme.json",

This is because the themes are using Theme.json version 2.
6.5 is that latest schema for version 2.

It also needs to be added to Twenty Twenty-Two.

#5 @umeshsinghin
2 years ago

Hi @poena,

The suggested changes have been implemented successfully.

Thanks

#6 @SergeyBiryukov
2 years ago

  • Keywords changes-requested removed

#7 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 58835:

Bundled Themes: Update schema version in style variation files.

This ensures that settings and styles are properly handled by code editors that support schema.

Reference: ​Theme.json Version 2 Reference: JSON Schema.

Follow-up to [58403].

Props poena, umeshsinghin.
Fixes #61789.

​@SergeyBiryukov commented on ​PR #7111:


2 years ago
#8

Thanks for the PR! Merged in r58835.

Note: See TracTickets for help on using tickets.