Skip to content

Commit

Permalink
New block properties for 5.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Sep 5, 2021
1 parent b1b469b commit 9a17f4e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
9 changes: 7 additions & 2 deletions packages/wp-types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ export interface WP_Block_Type {
* Alternative block styles.
*/
styles: unknown[];
/**
* Block variations.
*/
variations?: unknown[];
/**
* Supported features.
*/
Expand Down Expand Up @@ -290,11 +294,12 @@ export interface WP_Block_Type {
/**
* Block type editor style handle.
*/
editor_style: string | null;
editor_style: string | null | false;
/**
* Block type front end style handle.
*/
style: string | null;
style: string | null | false;
skip_inner_blocks?: boolean;
}
/**
* Core class used to organize comments as instantiated objects with defined members.
Expand Down
37 changes: 31 additions & 6 deletions schemas/block-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
"description": "Alternative block styles.",
"type": "array"
},
"variations": {
"description": "Block variations.",
"type": "array"
},
"supports": {
"description": "Supported features.",
"anyOf": [
Expand Down Expand Up @@ -168,17 +172,38 @@
},
"editor_style": {
"description": "Block type editor style handle.",
"type": [
"string",
"null"
"oneOf": [
{
"type": "string"
},
{
"type": "null"
},
{
"enum": [
false
]
}
]
},
"style": {
"description": "Block type front end style handle.",
"type": [
"string",
"null"
"oneOf": [
{
"type": "string"
},
{
"type": "null"
},
{
"enum": [
false
]
}
]
},
"skip_inner_blocks": {
"type": "boolean"
}
},
"additionalProperties": false
Expand Down

0 comments on commit 9a17f4e

Please sign in to comment.