Skip to content

Commit

Permalink
Extend block.json schema to include block hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Sep 13, 2023
1 parent d8e7b0d commit c3b2ab2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions schemas/json/block.json
Expand Up @@ -706,6 +706,16 @@
}
}
},
"blockHooks": {
"description": "Block Hooks allow a block to automatically insert itself next to all instances of a given block type.\n\nSee the Block Hooks documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/#block-hooks-optional for more details.",
"type": "object",
"patternProperties": {
"^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$": {
"enum": [ "before", "after", "firstChild", "lastChild" ]
}
},
"additionalProperties": false
},
"editorScript": {
"description": "Block type editor script definition. It will only be enqueued in the context of the editor.",
"oneOf": [
Expand Down

0 comments on commit c3b2ab2

Please sign in to comment.