Make WordPress Core


Ignore:
Timestamp:
05/05/2021 05:06:17 PM (5 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/compat.php

    r50810 r50814  
    372372}
    373373
    374 // WebP constants may not be defined, even in cases where the format is supported.
     374// WebP constants are only defined in PHP 7.1+.
    375375if ( ! defined( 'IMAGETYPE_WEBP' ) ) {
    376376    define( 'IMAGETYPE_WEBP', 18 );
Note: See TracChangeset for help on using the changeset viewer.