media_upload_tabs() WordPress Function
The media_upload_tabs() function allows you to add custom tabs to the WordPress media uploader. This is useful if you want to add your own custom media type or if you want to add a tab that points to an external service.
media_upload_tabs() #
Defines the default media upload tabs.
Return
(string[]) Default tabs.
Source
File: wp-admin/includes/media.php
function media_upload_tabs() { $_default_tabs = array( 'type' => __( 'From Computer' ), // Handler action suffix => tab text. 'type_url' => __( 'From URL' ), 'gallery' => __( 'Gallery' ), 'library' => __( 'Media Library' ), ); /** * Filters the available tabs in the legacy (pre-3.5.0) media popup. * * @since 2.5.0 * * @param string[] $_default_tabs An array of media tabs. */ return apply_filters( 'media_upload_tabs', $_default_tabs ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |