Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport theme.json version 3 migrations #6616

Closed
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
668c31e
Backport 58409 class-wp-theme-json.php
ajlende Jun 3, 2024
4c02184
Backport 58409 class-wp-theme-json-schema.php
ajlende May 23, 2024
a4e24a0
Backport 58409 class-wp-theme-json-data.php
ajlende May 23, 2024
4696b35
Backport 58409 class-wp-theme-json-resolver.php
ajlende May 23, 2024
97a24e0
Backport 58409 theme.json
ajlende May 23, 2024
719a4bd
Backport 58409 PHPUnit wpThemeJsonSchema.php
ajlende May 23, 2024
9a0e4b4
Backport 58409 PHPUnit wpThemeJson.php
ajlende May 23, 2024
915f254
Backport 58409 PHPUnit rest-global-styles-controller.php
ajlende May 23, 2024
2f9b431
Backport 58409 PHPUnit data
ajlende May 23, 2024
3769e79
Backport 61842 class-wp-theme-json.php
ajlende May 23, 2024
dc57d38
Backport 61842 class-wp-theme-json-resolver.php
ajlende May 23, 2024
943d9bb
Backport 61842 class-wp-theme-json-schema.php
ajlende May 23, 2024
0a33eb1
Backport 61842 theme.json
ajlende May 23, 2024
35695f2
Backport 61842 PHPUnit wpThemeJsonSchema.php
ajlende May 23, 2024
7599a7f
Backport 61842 PHPUnit wpThemeJson.php
ajlende May 23, 2024
ca161da
Merge 6.6 `@since` tags
ajlende Jun 3, 2024
caaeb72
Update LATEST_THEME_JSON_VERSION_SUPPORTED in font-faces controller
ajlende Jun 3, 2024
6569a11
Add default-font-sizes options for classic themes
ajlende Jun 3, 2024
d073251
Add default-spacing-sizes options for classic themes
ajlende Jun 3, 2024
93e3c82
Add editor-spacing-sizes for consistency
ajlende Jun 3, 2024
ea23bf0
Update LATEST_THEME_JSON_VERSION_SUPPORTED in font-families controller
ajlende Jun 3, 2024
afe235e
Fix phpunit tests
ajlende Jun 3, 2024
1b583a1
Update wp-api-generated
ajlende Jun 3, 2024
1e93db4
Added 6.6.0 doc comments
ajlende Jun 3, 2024
c8cdcc1
register_theme_feature( 'editor-spacing-sizes' )
ajlende Jun 4, 2024
5214e4f
Copy spacingSizes from editor-spacing-sizes
ajlende Jun 4, 2024
6b6d2b6
Fix tests
ajlende Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Backport 58409 PHPUnit data
ajlende authored and ellatrix committed Jun 4, 2024
commit 2f9b431fa88db2e4786ce9b6ef91e062a57af3e3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"settings": {
"appearanceTools": true,
"layout": {
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"settings": {
"appearanceTools": true,
"layout": {
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"settings": {
"appearanceTools": true,
"typography": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"settings": {
"blocks": {
"core/paragraph": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"settings": {
"blocks": {
"core/post-title": {
2 changes: 1 addition & 1 deletion tests/phpunit/data/themedir1/block-theme-child/theme.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"settings": {
"color": {
"palette": [
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"version": 2,
"settings": {
"color": {
"palette": [
{
"slug": "foreground",
"color": "#3F67C6",
"name": "Foreground"
}
]
}
},
"styles": {
"blocks": {
"core/post-title": {
"typography": {
"fontWeight": "700"
}
}
}
}
}
"version": 3,
"settings": {
"color": {
"palette": [
{
"slug": "foreground",
"color": "#3F67C6",
"name": "Foreground"
}
]
}
},
"styles": {
"blocks": {
"core/post-title": {
"typography": {
"fontWeight": "700"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"templateParts": [
{
"area": "header",
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"settings": {
"blocks": {
"core/paragraph": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"settings": {
"blocks": {
"core/post-title": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"title": "Block theme variation",
"settings": {
"color": {
2 changes: 1 addition & 1 deletion tests/phpunit/data/themedir1/block-theme/theme.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"title": "Block theme",
"settings": {
"color": {
146 changes: 68 additions & 78 deletions tests/phpunit/data/themedir1/empty-fontface-theme/theme.json
Original file line number Diff line number Diff line change
@@ -1,89 +1,79 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"customTemplates": [
{
"name": "blank",
"title": "Blank",
"postTypes": [
"page",
"post"
]
}
],
"settings": {
"appearanceTools": true,
"color": {
"duotone": [],
"gradients": [],
"palette": []
},
"custom": {},
"spacing": {
"units": [
"%",
"px",
"em",
"rem",
"vh",
"vw"
]
},
"typography": {
"dropCap": false,
"fontFamilies": [
"version": 3,
"customTemplates": [
{
"fontFamily": "Roboto",
"name": "Roboto",
"slug": "roboto",
"fontFace": []
"name": "blank",
"title": "Blank",
"postTypes": [ "page", "post" ]
}
],
"fontSizes": [
{
"size": "1rem",
"slug": "small"
],
"settings": {
"appearanceTools": true,
"color": {
"duotone": [],
"gradients": [],
"palette": []
},
{
"size": "1.125rem",
"slug": "medium"
"custom": {},
"spacing": {
"units": [ "%", "px", "em", "rem", "vh", "vw" ]
},
{
"size": "1.75rem",
"slug": "large"
"typography": {
"dropCap": false,
"fontFamilies": [
{
"fontFamily": "Roboto",
"name": "Roboto",
"slug": "roboto",
"fontFace": []
}
],
"fontSizes": [
{
"size": "1rem",
"slug": "small"
},
{
"size": "1.125rem",
"slug": "medium"
},
{
"size": "1.75rem",
"slug": "large"
},
{
"size": "clamp(1.75rem, 3vw, 2.25rem)",
"slug": "x-large"
}
]
},
{
"size": "clamp(1.75rem, 3vw, 2.25rem)",
"slug": "x-large"
"layout": {
"contentSize": "650px",
"wideSize": "1000px"
}
]
},
"layout": {
"contentSize": "650px",
"wideSize": "1000px"
}
},
"styles": {
"blocks": {},
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"elements": {},
"spacing": {
"blockGap": "1.5rem"
"styles": {
"blocks": {},
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"elements": {},
"spacing": {
"blockGap": "1.5rem"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--system-font)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--system-font)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"templateParts": [
{
"name": "header",
"title": "Header",
"area": "header"
}
]
"templateParts": [
{
"name": "header",
"title": "Header",
"area": "header"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"title": "Variation: duplicate fonts",
"settings": {
"typography": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"title": "Variation: new font family",
"settings": {
"typography": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"title": "Variation: new font variations",
"settings": {
"typography": {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"title": "Variation - no fonts",
"styles": {
"typography": {
2 changes: 1 addition & 1 deletion tests/phpunit/data/themedir1/fonts-block-theme/theme.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"version": 3,
"settings": {
"appearanceTools": true,
"color": {