| 95 | $gd_info = extension_loaded( 'gd' ) ? gd_info() : array(); |
| 96 | $imagick_info = extension_loaded( 'imagick' ) ? Imagick::queryFormats() : array(); |
| 97 | $gd_supported_formats = array(); |
| 98 | $gd_supported_formats = array( |
| 99 | 'WebP' => 'WebP', |
| 100 | 'AVIF' => 'AVIF', |
| 101 | 'HEIF' => 'HEIF', |
| 102 | ); |
| 103 | |
| 104 | foreach ( $gd_supported_formats as $format_key => $format ) { |
| 105 | $index = $format_key . ' Support'; |
| 106 | if ( isset( $gd[ $index ] ) && $gd[ $index ] ) { |
| 107 | array_push( $gd_supported_formats, $format ); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | try { |
| 112 | $imagick_supported_formats = Imagick::queryFormats( '*' ); |
| 113 | } catch ( Exception $e ) { |
| 114 | $imagick_supported_formats = array(); |
| 115 | } |
| 116 | |
96 | | 'version' => $wp_version, |
97 | | 'php' => $php_version, |
98 | | 'locale' => $locale, |
99 | | 'mysql' => $mysql_version, |
100 | | 'local_package' => isset( $wp_local_package ) ? $wp_local_package : '', |
101 | | 'blogs' => $num_blogs, |
102 | | 'users' => $user_count, |
103 | | 'multisite_enabled' => $multisite_enabled, |
104 | | 'initial_db_version' => get_site_option( 'initial_db_version' ), |
| 118 | 'version' => $wp_version, |
| 119 | 'php' => $php_version, |
| 120 | 'locale' => $locale, |
| 121 | 'mysql' => $mysql_version, |
| 122 | 'local_package' => isset( $wp_local_package ) ? $wp_local_package : '', |
| 123 | 'blogs' => $num_blogs, |
| 124 | 'users' => $user_count, |
| 125 | 'multisite_enabled' => $multisite_enabled, |
| 126 | 'initial_db_version' => get_site_option( 'initial_db_version' ), |
| 127 | 'extensions' => array_combine( get_loaded_extensions(), array_map( 'phpversion', get_loaded_extensions() ) ), |
| 128 | 'platform_flags' => array( |
| 129 | 'os' => defined( 'PHP_OS_FAMILY' ) ? PHP_OS_FAMILY : PHP_OS, |
| 130 | 'bits' => PHP_INT_SIZE === 4 ? 32 : 64, |
| 131 | ), |
| 132 | 'gd_supported_formats' => $gd_supported_formats, |
| 133 | 'imagick_supported_formats' => $imagick_supported_formats, |