-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a document explaining the different block API versions
- Loading branch information
1 parent
717a6c4
commit 2a5488a
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
docs/designers-developers/developers/block-api/versions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Block API Versions | ||
|
||
This document lists the changes made between the different API versions. | ||
|
||
## Version 2 (>= WordPress 5.6) | ||
|
||
- Moves the responsibility to render the block element wrapper in the editor to the block author using the `useBlockProps()` hook. | ||
- Generates classnames and styles are not added automatically to the saved markup for static blocks, block authors are required to explicitely use `useBlockProps.save()` in their `save` functions to retrieve the generated classes and styles to apply on the block wrapper. | ||
|
||
## Version 1 | ||
|
||
Initial version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters