Repository navigation
Add media uploader capabilities to block-based widget customize screen - #30954
Conversation
|
Size Change: +275 B (0%) Total Size: 1.46 MB
ℹ️ View Unchanged
|
|
Bad timing, I need to update this now that #30245 has been merged 😄 edit: Done in 0d40f0a |
535fc1b to
0d40f0a
Compare
| gutenberg_get_legacy_widget_settings() | ||
| ); | ||
|
|
||
| // This purposefully does not rely on apply_filters( 'block_editor_settings', $settings, null ); |
There was a problem hiding this comment.
Newly merged gutenberg_get_block_editor_settings is going to be a great fit here because it deprecates and more importantly simply ignores block_editor_settings filter for screens that don't have the $post object defined.
I plan to apply refactoring here and in other places later this week so no action needed for now.
|
draganescu
left a comment
There was a problem hiding this comment.
Tested and works as described. Plus he refactoring makes things better and aligned between the multiple editors.
0d40f0a to
1053739
Compare
|
Thanks for the speedy reviews |
Description
Previously in the block-based widget customizer, users could only link to external media in media based blocks (image, video).
This adds the media uploader functionality in. It's mostly copy/pasta, but required a few changes across the editor.
Changes:
WP_Sidebar_Block_Editor_Controlclass. This class is instantiated once per sidebar, but we only want to enqueue and initialize block editor client-side code once.gutenberg_initialize_editorfunction for the widget customizer.allowedMimeTypesused by the media uploader.How has this been tested?
Screenshots
Types of changes
New feature
Checklist:
*.native.jsfiles for terms that need renaming or removal).