mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-25 06:14:58 +02:00
Site Health: Include both site and user locales in debug information.
Previously, only the site’s locale was displayed in the Site Health debug information. Moving forward, both the site’s default locale and the user’s locale will be specified. This change also removes the `@param` tag for `WP_Debug_Data::debug_data()`. This parameter was previously removed in [45156]. Props: mukesh27, ianbelanger, Clorith, desrosj. Fixes #46803. Built from https://develop.svn.wordpress.org/trunk@45166 git-svn-id: http://core.svn.wordpress.org/trunk@44975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8d04086af3
commit
501234ebe0
|
@ -27,14 +27,12 @@ class WP_Debug_Data {
|
|||
* @throws ImagickException
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param string $locale Optional. An ISO formatted language code to provide debug translations in. Default null.
|
||||
* @return array The debug data for the site.
|
||||
*/
|
||||
static function debug_data() {
|
||||
global $wpdb;
|
||||
|
||||
// Save few function calls.
|
||||
$locale = get_user_locale();
|
||||
$upload_dir = wp_get_upload_dir();
|
||||
$permalink_structure = get_option( 'permalink_structure' );
|
||||
$is_ssl = is_ssl();
|
||||
|
@ -64,9 +62,13 @@ class WP_Debug_Data {
|
|||
'value' => $core_version . $core_update_needed,
|
||||
'debug' => $core_version,
|
||||
),
|
||||
'language' => array(
|
||||
'label' => __( 'Language' ),
|
||||
'value' => $locale,
|
||||
'site_language' => array(
|
||||
'label' => __( 'Site Language' ),
|
||||
'value' => get_locale(),
|
||||
),
|
||||
'user_language' => array(
|
||||
'label' => __( 'User Language' ),
|
||||
'value' => get_user_locale(),
|
||||
),
|
||||
'home_url' => array(
|
||||
'label' => __( 'Home URL' ),
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-beta2-45165';
|
||||
$wp_version = '5.2-beta2-45166';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue
Block a user