Skip to content

Commit f631537

Browse files
gziolosarayourfriend
authored andcommitted
Handbook: Clarify the type of apiVersion in block metadata (#33249)
1 parent d4553cf commit f631537

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/reference-guides/block-api/block-metadata.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,22 @@ register_block_type(
7979

8080
This section describes all the properties that can be added to the `block.json` file to define the behavior and metadata of block types.
8181

82+
### API Version
83+
84+
- Type: `number`
85+
- Optional
86+
- Localized: No
87+
- Property: `apiVersion`
88+
- Default: `1`
89+
90+
```json
91+
{ "apiVersion": 2 }
92+
```
93+
94+
The version of the Block API used by the block. The most recent version is `2` and it was introduced in WordPress 5.6.
95+
96+
See the [the API versions documentation](/docs/reference-guides/block-api/block-api-versions.md) for more details.
97+
8298
### Name
8399

84100
- Type: `string`

0 commit comments

Comments
 (0)