Changeset 53753
- Timestamp:
- 07/21/2022 08:20:52 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r53455 r53753 90 90 } 91 91 92 $extensions = get_loaded_extensions(); 93 sort( $extensions, SORT_STRING | SORT_FLAG_CASE ); 92 94 $query = array( 93 95 'version' => $wp_version, … … 100 102 'multisite_enabled' => $multisite_enabled, 101 103 'initial_db_version' => get_site_option( 'initial_db_version' ), 104 'extensions' => array_combine( $extensions, array_map( 'phpversion', $extensions ) ), 105 'platform_flags' => array( 106 'os' => PHP_OS, 107 'bits' => PHP_INT_SIZE === 4 ? 32 : 64, 108 ), 109 'image_support' => array(), 102 110 ); 111 112 if ( function_exists( 'gd_info' ) ) { 113 $gd_info = gd_info(); 114 // Filter to supported values. 115 $gd_info = array_filter( $gd_info ); 116 117 // Add data for GD WebP and AVIF support. 118 $query['image_support']['gd'] = array_keys( 119 array_filter( 120 array( 121 'webp' => isset( $gd_info['WebP Support'] ), 122 'avif' => isset( $gd_info['AVIF Support'] ), 123 ) 124 ) 125 ); 126 } 127 128 if ( class_exists( 'Imagick' ) ) { 129 // Add data for Imagick WebP and AVIF support. 130 $query['image_support']['imagick'] = array_keys( 131 array_filter( 132 array( 133 'webp' => ! empty( Imagick::queryFormats( 'WEBP' ) ), 134 'avif' => ! empty( Imagick::queryFormats( 'AVIF' ) ), 135 ) 136 ) 137 ); 138 } 103 139 104 140 /**
Note: See TracChangeset
for help on using the changeset viewer.