]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/async-upload.php
WordPress 3.9-scripts
[autoinstalls/wordpress.git] / wp-admin / async-upload.php
index a16c8d3aa8ca6f4583349ef05ee342d021eaddcf..e43fb58449d19265e053741b7576e96f031c146c 100644 (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();
@@ -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
         *