Ticket #47842: #47842.2.patch
File #47842.2.patch, 1.7 KB (added by , 6 years ago) |
---|
-
class-wp-debug-data.php
41 41 $is_multisite = is_multisite(); 42 42 $core_version = get_bloginfo( 'version' ); 43 43 $core_updates = get_core_updates(); 44 $core_gmt_offset = get_option( 'gmt_offset' ); 44 45 $core_update_needed = ''; 45 46 47 $gmt_offset_string = ''; 48 if ( ! empty( $core_gmt_offset ) ) { 49 if ( 0 == $core_gmt_offset ) { 50 $gmt_offset_string = 'UTC+0'; 51 } elseif ( $core_gmt_offset < 0 ) { 52 $gmt_offset_string = 'UTC' . $core_gmt_offset; 53 } else { 54 $gmt_offset_string = 'UTC+' . $core_gmt_offset; 55 } 56 $gmt_offset_string = str_replace( array( '.25', '.5', '.75' ), array( ':15', ':30', ':45' ), $gmt_offset_string ); 57 } 58 46 59 foreach ( $core_updates as $core => $update ) { 47 60 if ( 'upgrade' === $update->response ) { 48 61 // translators: %s: Latest WordPress version number. … … 106 119 'value' => $is_multisite ? __( 'Yes' ) : __( 'No' ), 107 120 'debug' => $is_multisite, 108 121 ), 122 'core_timezone' => array( 123 'label' => __( 'Site Timezone Offset' ), 124 'value' => $core_gmt_offset ? $gmt_offset_string : __( 'Undefined' ), 125 'debug' => $core_gmt_offset ? $gmt_offset_string : __( 'undefined' ), 126 ), 109 127 ), 110 128 ); 111 129 … … 1099 1117 * 1100 1118 * @since 5.2.0 1101 1119 * 1102 * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data` function.1120 * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data` function. 1103 1121 * @param string $type The data type to return, either 'info' or 'debug'. 1104 1122 * @return string The formatted data. 1105 1123 */