Skip to content
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

Remove the media upload override #194

Merged
merged 5 commits into from Dec 6, 2022
Merged

Remove the media upload override #194

merged 5 commits into from Dec 6, 2022

Conversation

johngodley
Copy link
Member

@johngodley johngodley commented Dec 6, 2022

The isolated editor automatically sets the editor.MediaUpload filter to use the Gutenberg media library. This shouldn't happen, and it should be left to the user to set this up for themselves. This allows a user to then use another library, or even disable it entirely.

This PR removes the automatic filter. It is a breaking change for anyone using this who relied on the media library, and the documentation has been updated.

For future reference:

import { MediaUpload } from '@wordpress/media-utils';

addFilter( 'editor.MediaUpload', 'your-namespace/media-upload', () => MediaUpload );

As documented, this should be passed in. Instead we are force overriding it.
This isn’t how Gutenberg does it anymore
@johngodley johngodley merged commit d5a8fd2 into trunk Dec 6, 2022
@johngodley johngodley deleted the remove/media-upload branch December 6, 2022 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant