函数原型
media_upload_gallery(): string|null
函数描述
Retrieves the legacy media uploader form in an iframe.
是否弃用
未弃用
函数参数
无
函数返回值
string|null
函数位置
File: wp-admin/includes/media.php.
函数源码
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 );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |

