WordPress/wp-includes
Joe McGill c47e0b66a2 Media: Improve image filetype checking.
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.

Merges [39831] to the 3.9 branch.

Built from https://develop.svn.wordpress.org/branches/3.9@39840


git-svn-id: http://core.svn.wordpress.org/branches/3.9@39778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 13:20:15 +00:00
..
2014-04-07 17:52:16 +00:00
2014-08-06 05:57:16 +00:00
2014-03-27 22:41:14 +00:00
2013-12-01 12:48:10 +00:00
2017-01-11 05:26:32 +00:00
2014-03-28 13:57:14 +00:00
2014-03-26 18:43:14 +00:00
2015-08-04 05:00:06 +00:00
2013-09-06 17:19:09 +00:00
2013-10-30 14:39:10 +00:00
2016-09-07 15:02:18 +00:00