]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/image.php
WordPress 4.3
[autoinstalls/wordpress.git] / wp-admin / includes / image.php
index 355a63d737f4e09a596b03288fcfee8f0d6bbe16..be023e23f9fc0a15279a71456a8e1b3046d05ee3 100644 (file)
@@ -67,6 +67,8 @@ function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $s
  *
  * @since 2.1.0
  *
+ * @global array $_wp_additional_image_sizes
+ *
  * @param int $attachment_id Attachment Id to process.
  * @param string $file Filepath of the Attached image.
  * @return mixed Metadata for attachment.
@@ -190,8 +192,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
        }
 
        // Remove the blob of binary data from the array.
-       if ( isset( $metadata['image']['data'] ) )
-               unset( $metadata['image']['data'] );
+       unset( $metadata['image']['data'] );
 
        /**
         * Filter the generated attachment meta data.