Go to file
Joe McGill 4990532160 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.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/3.7@39842 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 13:21:01 +00:00
src Media: Improve image filetype checking. 2017-01-11 13:21:01 +00:00
tests Media: Improved media titles when created from filename. 2017-01-05 16:25:43 +00:00
tools/i18n Remove lingering instances of call time pass-by-reference, limited to instances of callable - use $this instead of &$this. 2013-09-05 16:33:50 +00:00
.gitignore Move wp-config-sample.php to the root of develop.svn. 2013-08-29 20:45:17 +00:00
Gruntfile.js New grunt copy:version task that removes -src from $wp_version on build. 2013-10-06 10:33:01 +00:00
package.json Bump 3.7 branch to 3.7.16. 2016-09-07 15:00:52 +00:00
phpunit.xml.dist
wp-config-sample.php Move wp-config-sample.php to the root of develop.svn. 2013-08-29 20:45:17 +00:00
wp-tests-config-sample.php Update wp-tests-config-sample.php to run with WP_DEBUG by default. see #25282. 2013-09-23 16:17:59 +00:00