From c3b2ab2d55bf196807dd970aec853e7d39c11047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Zi=C3=B3=C5=82kowski?= Date: Wed, 13 Sep 2023 11:30:44 +0200 Subject: [PATCH] Extend block.json schema to include block hooks --- schemas/json/block.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/schemas/json/block.json b/schemas/json/block.json index b181bf2d9ab40..44ce570912767 100644 --- a/schemas/json/block.json +++ b/schemas/json/block.json @@ -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": [