Display error message when Media Library upload fails.
Props gcorne. Fixes #29891. git-svn-id: https://develop.svn.wordpress.org/trunk@30156 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c8acddfdc8
commit
bdf71f89ad
@ -35,8 +35,9 @@ function check_upload_size( $file ) {
|
||||
if ( upload_is_user_over_quota( false ) ) {
|
||||
$file['error'] = __( 'You have used your space quota. Please delete files before uploading.' );
|
||||
}
|
||||
if ( $file['error'] != '0' && !isset($_POST['html-upload']) )
|
||||
if ( $file['error'] != '0' && ! isset( $_POST['html-upload'] ) && ( ! defined( 'DOING_AJAX' ) || DOING_AJAX != true ) ) {
|
||||
wp_die( $file['error'] . ' <a href="javascript:history.go(-1)">' . __( 'Back' ) . '</a>' );
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user