mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Media: Some documentation and test improvements for WebP support:
* Document that WebP constants are only defined in PHP 7.1+. * Correct the `$filename` parameter type in `wp_get_webp_info()`. * Use a consistent message when skipping tests due to the lack of WebP support. * Remove unnecessary `else` branches after `markTestSkipped()`. * Replace `assertEquals()` with more appropriate assertions. Follow-up to [50810]. See #35725. git-svn-id: https://develop.svn.wordpress.org/trunk@50814 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3079,9 +3079,11 @@ function wp_get_image_mime( $file ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add WebP fallback detection when image library doesn't support WebP.
|
||||
// Note: detection values come from LibWebP, see
|
||||
// https://github.com/webmproject/libwebp/blob/master/imageio/image_dec.c#L30
|
||||
/*
|
||||
* Add WebP fallback detection when image library doesn't support WebP.
|
||||
* Note: detection values come from LibWebP, see
|
||||
* https://github.com/webmproject/libwebp/blob/master/imageio/image_dec.c#L30
|
||||
*/
|
||||
$magic = bin2hex( $magic );
|
||||
if (
|
||||
// RIFF.
|
||||
|
||||
Reference in New Issue
Block a user