media_upload_tabs

Defines the default media upload tabs.

Description

(array) media_upload_tabs(); 

Returns (array)

default tabs


Usage

  1. if ( !function_exists( 'media_upload_tabs' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/media.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = media_upload_tabs(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/media.php  
  1. function media_upload_tabs() { 
  2. $_default_tabs = array( 
  3. 'type' => __('From Computer'), // handler action suffix => tab text 
  4. 'type_url' => __('From URL'),  
  5. 'gallery' => __('Gallery'),  
  6. 'library' => __('Media Library') 
  7. ); 
  8.  
  9. /** 
  10. * Filters the available tabs in the legacy (pre-3.5.0) media popup. 
  11. * @since 2.5.0 
  12. * @param array $_default_tabs An array of media tabs. 
  13. */ 
  14. return apply_filters( 'media_upload_tabs', $_default_tabs );