-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Move legacy-widget block over to edit-widgets package #25371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move legacy-widget block over to edit-widgets package #25371
Conversation
Size Change: +453 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as described. Code is mostly moving things around. One new thing is that registerBlock
is now exported cc @youknowriad
@@ -16,6 +16,14 @@ _This package assumes that your code will run in an **ES2015+** environment. If | |||
|
|||
<!-- START TOKEN(Autogenerated API docs) --> | |||
|
|||
<a name="registerBlock" href="#registerBlock">#</a> **registerBlock** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's a good API to expose, it's too confusing as it's the same as wp.blocks.registerBlock with minor differences (loading metadata), we should just duplicate it in edit-widgets instead.
Description
This PR ensures that the legacy-widget block is only registered in the widgets editor as discussed in #24900. While this may change at some point in the future, as of now it's unclear how it could work in the post editor.
How has this been tested?
Types of changes
Non-breaking change
Checklist: