Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#61789 closed defect (bug) (fixed)

Bundled themes: Update schema version in style variation files

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

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
10 months ago

  • Keywords good-first-bug added

#2 @SergeyBiryukov
10 months ago

  • Milestone changed from Awaiting Review to 6.7

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


10 months ago
#3

  • Keywords has-patch added

#4 @poena
10 months 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
10 months ago

Hi @poena,

The suggested changes have been implemented successfully.

Thanks

#6 @SergeyBiryukov
10 months ago

  • Keywords changes-requested removed

#7 @SergeyBiryukov
10 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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:


10 months ago
#8

Thanks for the PR! Merged in r58835.

Note: See TracTickets for help on using tickets.