media_upload_gallery

Retrieves the legacy media uploader form in an iframe.

Description

(string|null) media_upload_gallery(); 

Returns (string|null)


Usage

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

Defined (1)

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

/wp-admin/includes/media.php  
  1. function media_upload_gallery() { 
  2. $errors = array(); 
  3.  
  4. if ( !empty($_POST) ) { 
  5.  
  6. if ( is_string($return) ) 
  7. return $return; 
  8. if ( is_array($return) ) 
  9. $errors = $return; 
  10.  
  11. wp_enqueue_script('admin-gallery'); 
  12. return wp_iframe( 'media_upload_gallery_form', $errors );