Make WordPress Core

Changeset 45166


Ignore:
Timestamp:
04/12/2019 03:48:13 PM (6 years ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r45156 r45166  
    2828     * @global wpdb $wpdb WordPress database abstraction object.
    2929     *
    30      * @param string $locale Optional. An ISO formatted language code to provide debug translations in. Default null.
    3130     * @return array The debug data for the site.
    3231     */
     
    3534
    3635        // Save few function calls.
    37         $locale              = get_user_locale();
    3836        $upload_dir          = wp_get_upload_dir();
    3937        $permalink_structure = get_option( 'permalink_structure' );
     
    6563                    'debug' => $core_version,
    6664                ),
    67                 'language'               => array(
    68                     'label' => __( 'Language' ),
    69                     'value' => $locale,
     65                'site_language'          => array(
     66                    'label' => __( 'Site Language' ),
     67                    'value' => get_locale(),
     68                ),
     69                'user_language'          => array(
     70                    'label' => __( 'User Language' ),
     71                    'value' => get_user_locale(),
    7072                ),
    7173                'home_url'               => array(
Note: See TracChangeset for help on using the changeset viewer.