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:
parent
a37d4609be
commit
5965616aca
|
@ -6,6 +6,10 @@
|
||||||
* @subpackage Administration
|
* @subpackage Administration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
|
||||||
|
define( 'DOING_AJAX', true );
|
||||||
|
}
|
||||||
|
|
||||||
define('WP_ADMIN', true);
|
define('WP_ADMIN', true);
|
||||||
|
|
||||||
if ( defined('ABSPATH') )
|
if ( defined('ABSPATH') )
|
||||||
|
@ -32,7 +36,6 @@ if ( !current_user_can('upload_files') )
|
||||||
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
|
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
|
||||||
|
|
||||||
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
|
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
|
||||||
define( 'DOING_AJAX', true );
|
|
||||||
include ABSPATH . 'wp-admin/includes/ajax-actions.php';
|
include ABSPATH . 'wp-admin/includes/ajax-actions.php';
|
||||||
|
|
||||||
send_nosniff_header();
|
send_nosniff_header();
|
||||||
|
|
Loading…
Reference in New Issue