This adds a new function `wp_get_image_mime()` which is used by `wp_check_filetype_and_ext()` to validate image files using `exif_imagetype()` if available instead of `getimagesize()`. `getimagesize()` is less performant than `exif_imagetype()` and is dependent on GD. If `exif_imagetype()` is not available, it falls back to `getimagesize()` as before. If `wp_check_filetype_and_ext()` can't validate the filetype, we now return `false` for ext/MIME values. See #11946. Built from https://develop.svn.wordpress.org/trunk@39831 git-svn-id: http://core.svn.wordpress.org/trunk@39769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
171 KiB
171 KiB