X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e08b42e8ad054ec67522d7ac1aaae5dc68cb3d01..4713a14935b83517997f3c88f808eb41da55033d:/wp-admin/async-upload.php diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index a16c8d3a..e43fb584 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -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(); @@ -99,7 +102,7 @@ if ( $_REQUEST['short'] ) { * Filter the returned ID of an uploaded attachment. * * The dynamic portion of the hook name, $type, refers to the attachment type, - * such as 'iamge', 'audio', 'video', 'file', etc. + * such as 'image', 'audio', 'video', 'file', etc. * * @since 2.5.0 *