-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Theme JSON schema: Add missing block names and unify block properties #51293
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -690,9 +690,7 @@ | |
"type": "object", | ||
"properties": { | ||
"core/archives": { | ||
"type": "object", | ||
"description": "Archive block. Display a monthly archive of your posts. This block has no block-level settings", | ||
"additionalProperties": false | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/audio": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
|
@@ -704,35 +702,7 @@ | |
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/button": { | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/settingsPropertiesAppearanceTools" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"border": { | ||
"description": "Settings related to borders.", | ||
"type": "object", | ||
"properties": { | ||
"radius": { | ||
"description": "Allow users to set custom border radius.", | ||
"type": "boolean", | ||
"default": false | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ "$ref": "#/definitions/settingsPropertiesColor" }, | ||
{ "$ref": "#/definitions/settingsPropertiesLayout" }, | ||
{ "$ref": "#/definitions/settingsPropertiesSpacing" }, | ||
{ | ||
"$ref": "#/definitions/settingsPropertiesTypography" | ||
}, | ||
{ "$ref": "#/definitions/settingsPropertiesCustom" } | ||
] | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
Comment on lines
704
to
706
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it should be necessary to define only button blocks specially. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The intention when this was added was to update all blocks to only show the features that they support. But seeing as that was a year and a half ago and nothing else has been updated, I think it's fine. We really need a system to automatically generate the schema so we can be more specific about blocks without the huge maintenance burden. |
||
"core/buttons": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
|
@@ -752,6 +722,9 @@ | |
"core/columns": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comment-author-avatar": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comment-author-name": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
|
@@ -767,15 +740,33 @@ | |
"core/comment-reply-link": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comment-template": { | ||
"core/comments": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comments": { | ||
"core/comments-pagination": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comments-pagination-next": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comments-pagination-numbers": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comments-pagination-previous": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comments-title": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/comment-template": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/cover": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/details": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/embed": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
|
@@ -812,6 +803,9 @@ | |
"core/list": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/list-item": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/loginout": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
|
@@ -830,19 +824,31 @@ | |
"core/navigation-link": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/navigation-submenu": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/nextpage": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/page-list": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/page-list-item": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/paragraph": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-author": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-comments": { | ||
"core/post-author-biography": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-author-name": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-comment": { | ||
Comment on lines
-845
to
+851
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes block name ( |
||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-comments-count": { | ||
|
@@ -875,6 +881,9 @@ | |
"core/post-terms": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-time-to-read": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/post-title": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
|
@@ -887,6 +896,9 @@ | |
"core/query": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/query-no-results": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/query-pagination": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
|
@@ -905,6 +917,9 @@ | |
"core/quote": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/read-more": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
"core/rss": { | ||
"$ref": "#/definitions/settingsPropertiesComplete" | ||
}, | ||
|
@@ -1789,6 +1804,9 @@ | |
"core/columns": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comment-author-avatar": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comment-author-name": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
|
@@ -1804,15 +1822,33 @@ | |
"core/comment-reply-link": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comment-template": { | ||
"core/comments": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comments": { | ||
"core/comments-pagination": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comments-pagination-next": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comments-pagination-numbers": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comments-pagination-previous": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comments-title": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/comment-template": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/cover": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/details": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/embed": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
|
@@ -1849,6 +1885,9 @@ | |
"core/list": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/list-item": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/loginout": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
|
@@ -1867,19 +1906,31 @@ | |
"core/navigation-link": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/navigation-submenu": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/nextpage": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/page-list": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/page-list-item": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/paragraph": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/post-author": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/post-comments": { | ||
"core/post-author-biography": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/post-author-name": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/post-comment": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
Comment on lines
-1882
to
1935
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes block name ( |
||
"core/post-comments-count": { | ||
|
@@ -1912,6 +1963,9 @@ | |
"core/post-terms": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/post-time-to-read": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/post-title": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
|
@@ -1924,6 +1978,9 @@ | |
"core/query": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/query-no-results": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/query-pagination": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
|
@@ -1942,6 +1999,9 @@ | |
"core/quote": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/read-more": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
"core/rss": { | ||
"$ref": "#/definitions/stylesPropertiesAndElementsComplete" | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Archive block now has some support.