X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..5d244c8fd9a27c9f89dd08da2af6fbc67d4fce63:/wp-admin/async-upload.php diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index 08d710d2..4a18aa14 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -32,6 +32,8 @@ if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['actio require_once( ABSPATH . 'wp-admin/admin.php' ); +header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); + if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) { include( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); @@ -46,8 +48,6 @@ if ( ! current_user_can( 'upload_files' ) ) { wp_die( __( 'You do not have permission to upload files.' ) ); } -header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); - // just fetch the detail form for that attachment if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) { $post = get_post( $id );