Define DOING_AJAX earlier in async-upload.php.

props avryl.
fixes #27387. see [22902].

Built from https://develop.svn.wordpress.org/trunk@27558


git-svn-id: http://core.svn.wordpress.org/trunk@27401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-15 19:59:15 +00:00
parent a37d4609be
commit 5965616aca

View File

@ -6,6 +6,10 @@
* @subpackage Administration
*/
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
define( 'DOING_AJAX', true );
}
define('WP_ADMIN', true);
if ( defined('ABSPATH') )
@ -32,7 +36,6 @@ if ( !current_user_can('upload_files') )
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
define( 'DOING_AJAX', true );
include ABSPATH . 'wp-admin/includes/ajax-actions.php';
send_nosniff_header();