-
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 (#26277)
- Loading branch information
1 parent
292e1d1
commit 5f85bc4
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) | ||
|
||
- To render the block element wrapper for the block's `edit` implementation, the block author must use the `useBlockProps()` hook. | ||
- The generated class names and styles are no longer added automatically to the saved markup for static blocks when `save` is processed. To include them, the block author must explicitly use `useBlockProps.save()` and add to their 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