-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 editorMediaUpload to the editor module #6682
Conversation
if ( select( 'core/editor' ) ) { | ||
postId = select( 'core/editor' ).getCurrentPostId(); | ||
} | ||
const postId = select( 'core/editor' ).getCurrentPostId(); |
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.
finally :)
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 tested this locally and it works as expected.
@@ -8,5 +8,3 @@ | |||
// Blocks are inferred from the HTML source of a post through a parsing mechanism | |||
// and then stored as objects in state, from which it is then rendered for editing. | |||
export * from './api'; | |||
|
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.
@youknowriad - did you update this comment above in the PR where you migrate blocks to store? :)
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.
haha :) comment posted on the wrong PR
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.
LGTM, haven't tested...
27a3671
to
6becea0
Compare
Related #6275
This PR moves the editorMediaUpload helper to the editor module because it has a dependency towards the editor store. This allows us to remove the check for the store existence.
Testing instructions