From 4740573142ecba6fe274fc24adbf7294e3b61b3c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 12 Apr 2019 15:48:13 +0000 Subject: [PATCH] Site Health: Include both site and user locales in debug information. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. git-svn-id: https://develop.svn.wordpress.org/trunk@45166 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-debug-data.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index 05545efa85..935c53710b 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -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' ),