X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/256a3b381f63716209b3527d0a14442ae570c283..784f914b1e4b1c62d6657e86397c2e83bcee4295:/wp-admin/media-new.php diff --git a/wp-admin/media-new.php b/wp-admin/media-new.php index 75f49f10..9d26651e 100644 --- a/wp-admin/media-new.php +++ b/wp-admin/media-new.php @@ -25,15 +25,15 @@ if ( isset( $_REQUEST['post_id'] ) ) { } if ( $_POST ) { - $location = 'upload.php'; if ( isset($_POST['html-upload']) && !empty($_FILES) ) { check_admin_referer('media-form'); // Upload File button was clicked - $id = media_handle_upload( 'async-upload', $post_id ); - if ( is_wp_error( $id ) ) - $location .= '?message=3'; + $upload_id = media_handle_upload( 'async-upload', $post_id ); + if ( is_wp_error( $upload_id ) ) { + wp_die( $upload_id ); + } } - wp_redirect( admin_url( $location ) ); + wp_redirect( admin_url( 'upload.php' ) ); exit; } @@ -53,8 +53,8 @@ get_current_screen()->add_help_tab( array( ) ); get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Uploading Media Files') . '

' . - '

' . __('Support Forums') . '

' + '

' . __('Documentation on Uploading Media Files') . '

' . + '

' . __('Support Forums') . '

' ); require_once( ABSPATH . 'wp-admin/admin-header.php' ); @@ -65,7 +65,7 @@ if ( get_user_setting('uploader') || isset( $_GET['browser-uploader'] ) ) $form_class .= ' html-uploader'; ?>
-

+