Skip to content

Commit

Permalink
Upgrade/Install: Indicate HEIC support when checking upgrades.
Browse files Browse the repository at this point in the history
Adds tracking of HEIC image type support alongside WebP and AVID image types when requesting upgrade from WordPress.org

Props adamsilverstein, swissspidy, dd32, mukesh27.
Fixes #61981.


git-svn-id: https://develop.svn.wordpress.org/trunk@59018 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
peterwilsoncc committed Sep 13, 2024
1 parent 8f90a7e commit 1730f77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/wp-includes/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,26 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
// Filter to supported values.
$gd_info = array_filter( $gd_info );

// Add data for GD WebP and AVIF support.
// Add data for GD WebP, AVIF and HEIC support.
$query['image_support']['gd'] = array_keys(
array_filter(
array(
'webp' => isset( $gd_info['WebP Support'] ),
'avif' => isset( $gd_info['AVIF Support'] ),
'heic' => isset( $gd_info['HEIC Support'] ),
)
)
);
}

if ( class_exists( 'Imagick' ) ) {
// Add data for Imagick WebP and AVIF support.
// Add data for Imagick WebP, AVIF and HEIC support.
$query['image_support']['imagick'] = array_keys(
array_filter(
array(
'webp' => ! empty( Imagick::queryFormats( 'WEBP' ) ),
'avif' => ! empty( Imagick::queryFormats( 'AVIF' ) ),
'heic' => ! empty( Imagick::queryFormats( 'HEIC' ) ),
)
)
);
Expand Down

0 comments on commit 1730f77

Please sign in to comment.