media_upload_tabs filter-hookWP 2.5.0

Filters the available tabs in the legacy (pre-3.5.0) media popup.

Usage

add_filter( 'media_upload_tabs', 'wp_kama_media_upload_tabs_filter' );

/**
 * Function for `media_upload_tabs` filter-hook.
 * 
 * @param string[] $_default_tabs An array of media tabs.
 *
 * @return string[]
 */
function wp_kama_media_upload_tabs_filter( $_default_tabs ){

	// filter...
	return $_default_tabs;
}
$_default_tabs(string[])
An array of media tabs.

Changelog

Since 2.5.0 Introduced.

Where the hook is called

media_upload_tabs()
media_upload_tabs
wp_enqueue_media()
media_upload_tabs
wp-admin/includes/media.php 31
return apply_filters( 'media_upload_tabs', $_default_tabs );
wp-includes/media.php 4278
$tabs = apply_filters( 'media_upload_tabs', $tabs );

Where the hook is used in WordPress

wp-admin/includes/admin-filters.php 38
add_filter( 'media_upload_tabs', 'update_gallery_tab' );