Make WordPress Core


Ignore:
Timestamp:
05/05/2021 05:06:17 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r50810 r50814  
    30803080        }
    30813081
    3082         // Add WebP fallback detection when image library doesn't support WebP.
    3083         // Note: detection values come from LibWebP, see
    3084         // https://github.com/webmproject/libwebp/blob/master/imageio/image_dec.c#L30
     3082        /*
     3083         * Add WebP fallback detection when image library doesn't support WebP.
     3084         * Note: detection values come from LibWebP, see
     3085         * https://github.com/webmproject/libwebp/blob/master/imageio/image_dec.c#L30
     3086         */
    30853087        $magic = bin2hex( $magic );
    30863088        if (
Note: See TracChangeset for help on using the changeset viewer.