diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index fefd67c9e4..b20776743e 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -34,10 +34,8 @@ class WP_Debug_Data { global $wpdb; if ( ! empty( $locale ) ) { // Change the language used for translations - if ( function_exists( 'switch_to_locale' ) ) { - $original_locale = get_locale(); - $switched_locale = switch_to_locale( $locale ); - } + $original_locale = get_user_locale(); + $switched_locale = switch_to_locale( $locale ); } $upload_dir = wp_get_upload_dir(); @@ -73,7 +71,7 @@ class WP_Debug_Data { ), 'language' => array( 'label' => __( 'Language' ), - 'value' => ( ! empty( $locale ) ? $original_locale : get_locale() ), + 'value' => ( ! empty( $locale ) ? $original_locale : get_user_locale() ), ), 'home_url' => array( 'label' => __( 'Home URL' ), @@ -888,7 +886,7 @@ class WP_Debug_Data { if ( ! empty( $locale ) ) { // Change the language used for translations - if ( function_exists( 'restore_previous_locale' ) && $switched_locale ) { + if ( $switched_locale ) { restore_previous_locale(); } } diff --git a/wp-admin/site-health-info.php b/wp-admin/site-health-info.php index abe178f366..ef1af1fc50 100644 --- a/wp-admin/site-health-info.php +++ b/wp-admin/site-health-info.php @@ -68,7 +68,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); $info = WP_Debug_Data::debug_data(); $english_info = ''; - if ( 0 !== strpos( get_locale(), 'en' ) ) { + if ( 0 !== strpos( get_user_locale(), 'en' ) ) { $english_info = WP_Debug_Data::debug_data( 'en_US' ); } ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index 00e3d67e6c..41f15c177c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta1-45109'; +$wp_version = '5.2-beta1-45110'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.