Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#45802 reopened defect (bug)

media_upload_tabs not supported in 5.0?

Reported by: programmin Owned by:
Priority: normal Milestone: WordPress.org
Component: Media Version:
Severity: normal Keywords: needs-codex needs-dev-note
Cc: Focuses: ui, administration

Description

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

​https://codex.wordpress.org/Inserting_Media_into_Posts_and_Pages

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 8 years ago.
classic-editor-block.png​ (10.4 KB ) - added by subrataemfluence 8 years ago.
add-media-button.png​ (9.7 KB ) - added by subrataemfluence 8 years ago.

Download all attachments as: .zip

Change History (7)

#1 @subrataemfluence
8 years ago

  • Resolution → invalid
  • Status new → 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
(classic-editor-block.png).

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.


8 years ago

#4 @SergeyBiryukov
8 years ago

  • Component General → Media

#5 @SergeyBiryukov
8 years ago

  • Keywords needs-codex needs-dev-note added
  • Milestone → WordPress.org
  • Resolution invalid
  • Status closed → 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
​https://www.ibenic.com/extending-wordpress-media-uploader-custom-tab/ 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: ​https://github.com/WordPress/gutenberg/issues.

Note: See TracTickets for help on using tickets.