Create block: Use Block API version 2#26098
Conversation
|
Size Change: 0 B Total Size: 1.2 MB ℹ️ View Unchanged
|
gziolo
left a comment
There was a problem hiding this comment.
Can we land it before WordPress 5.6 is out? Is useBlockProps already part of WordPress core?
We had a similar dilemma with new block categories that we couldn't include before 5.5 was out because it would fail block registration. Here it might fail a block if the Gutenberg plugin isn't installed.
|
@gziolo |
Based on the date of exposing the API #25642, I don't think it's available as of today for a wider audience when you consider no Gutenberg plugin installed scenario. So my point is, that we need to wait with changes to the tool until WP 5.6 is out. |
|
Now that we only backport bug fixes to |
gziolo
left a comment
There was a problem hiding this comment.
We will need readme.txt.mustache templates to set the minimum version of WordPress to 5.6, plus leave a note in the changelog file to make people aware of this new restriction.
Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
5f9a912 to
33c4643
Compare
gziolo
left a comment
There was a problem hiding this comment.
I applied several changes to have this PR ready to merge just after WordPress 5.6 is out.
@ellatrix, can you double-check if the proposed changes make sense?
apiVersion is now configurable for 3rd party templates that were added recently.
I tested with:
npx wp-create-block my-esnext-block
npx wp-create-block my-es5-block -t es5
|
It's time to get it merged 🎉 |
Description
See #25642. Ideally all new blocks should use API version 2.
How has this been tested?
Screenshots
Types of changes
Checklist: