On this page
media_upload_gallery(): string|null
Retrieves the legacy media uploader form in an iframe.
Return
string|null
Source
File: wp-admin/includes/media.php. View all references
function media_upload_gallery() {
$errors = array();
if ( ! empty( $_POST ) ) {
$return = media_upload_form_handler();
if ( is_string( $return ) ) {
return $return;
}
if ( is_array( $return ) ) {
$errors = $return;
}
}
wp_enqueue_script( 'admin-gallery' );
return wp_iframe( 'media_upload_gallery_form', $errors );
}
Related
Uses
| Uses | Description |
|---|---|
| media_upload_form_handler() wp-admin/includes/media.php | Handles form submissions for the legacy media uploader. |
| wp_iframe() wp-admin/includes/media.php | Outputs the iframe to display the media upload page. |
| wp_enqueue_script() wp-includes/functions.wp-scripts.php | Enqueue a script. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/media_upload_gallery