Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#45802 reopened defect (bug)

media_upload_tabs not supported in 5.0?

Reported by: programmin's profile programmin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-codex needs-dev-note
Focuses: ui, administration Cc:


I noticed the instructions here are incorrect at least for the latest WordPress 5.0

At least, I can't seem to find the add media and it appears to be replaced by Gallery and Image, which shows upload/media-library/insert-from-url.

Unfortunately it looks like there is no longer a way to get to this dialog and use extra upload-tabs to the left on the dialog shown in the tutorial linked above. In other words media_upload_tabs doesn't do anything? If so, it should probably note this on that filter page and on the codex page.

Attachments (3)

media-library-button.png (10.2 KB) - added by subrataemfluence 5 years ago.
classic-editor-block.png (10.4 KB) - added by subrataemfluence 5 years ago.
add-media-button.png (9.7 KB) - added by subrataemfluence 5 years ago.

Download all attachments as: .zip

Change History (7)

#1 @subrataemfluence
5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

If I have understood correctly you are pointing to the Image block of Gutenberg editor. When you insert the block you have the Media Library button which acts the same way as Add Media button does. Please see the screenshot (media-library-button.png).

This is also available in Classic Editor block. Please see the screenshot

And, of course, if you install and activate Classic Editor plugin, you have the button in place. Please see the screenshot (add-media-button.png).

I am closing this for now. If my understanding is wrong and you are pointing to something else please feel free to reopen the ticket with more details.

Thank you!

This ticket was mentioned in Slack in #docs by subratasarkar. View the logs.

5 years ago

#4 @SergeyBiryukov
5 years ago

  • Component changed from General to Media

#5 @SergeyBiryukov
5 years ago

  • Keywords needs-codex needs-dev-note added
  • Milestone set to
  • Resolution invalid deleted
  • Status changed from closed to reopened

The question is not about the Image block of Gutenberg editor, it's about adding a custom tab to Media Library.

The media_upload_tabs filter was the old (pre-WordPress 3.5) way to add tabs to Media Library, but it used to have backwards compatibility with the 3.5+ media UI, see [22523] for #22186.

A better way to add custom tabs to Media Library was through JavaScript, see for example.

It does indeed look like Gutenberg no longer shows that particular area of the Media Library UI, so the documentation should be updated to clarify this. Let's keep the ticket open for that purpose.

If new hooks should be added to Gutenberg to allow for custom tabs in the new UI, please create an issue on GitHub:

Note: See TracTickets for help on using tickets.