Changeset 61328
- Timestamp:
- 12/01/2025 12:34:20 AM (4 weeks ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
src/wp-includes/compat.php (modified) (1 diff)
-
src/wp-includes/media.php (modified) (1 diff)
-
tests/phpunit/tests/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r60969 r61328 615 615 } 616 616 617 // IMAGETYPE_HEI C constant is not yet defined in PHP as of PHP 8.3.618 if ( ! defined( 'IMAGETYPE_HEI C' ) ) {619 define( 'IMAGETYPE_HEI C', 99);620 } 617 // IMAGETYPE_HEIF constant is only defined in PHP 8.5 or later. 618 if ( ! defined( 'IMAGETYPE_HEIF' ) ) { 619 define( 'IMAGETYPE_HEIF', 20 ); 620 } -
trunk/src/wp-includes/media.php
r60910 r61328 5830 5830 $size['width'], 5831 5831 $size['height'], 5832 IMAGETYPE_HEI C,5832 IMAGETYPE_HEIF, 5833 5833 sprintf( 5834 5834 'width="%d" height="%d"', -
trunk/tests/phpunit/tests/functions.php
r60810 r61328 1574 1574 1180, 1575 1575 1180, 1576 IMAGETYPE_HEI C,1576 IMAGETYPE_HEIF, 1577 1577 'width="1180" height="1180"', 1578 'mime' => 'image/heic', 1579 ); 1580 $result = wp_getimagesize( $file ); 1578 ); 1579 1580 // As of PHP 8.5.0, getimagesize() supports HEIF/HEIC files. 1581 if ( PHP_VERSION_ID >= 80500 ) { 1582 $expected = array_merge( 1583 $expected, 1584 array( 1585 'bits' => 8, 1586 'channels' => 3, 1587 'mime' => 'image/heif', 1588 'width_unit' => 'px', 1589 'height_unit' => 'px', 1590 ) 1591 ); 1592 } else { 1593 $expected['mime'] = 'image/heic'; 1594 } 1595 1596 $result = wp_getimagesize( $file ); 1581 1597 $this->assertSame( $expected, $result ); 1582 1598 }
Note: See TracChangeset
for help on using the changeset viewer.