From c19f5ae907e31be4e913a13e44092a92c1f772e3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 27 Aug 2020 21:39:05 +0000 Subject: [PATCH] Bootstrap/Load: Check if the `__()` function is available in `wp_get_environment_type()`. The function would not exist in `SHORTINIT` mode. Follow-up to [48894]. See #50992. Built from https://develop.svn.wordpress.org/trunk@48895 git-svn-id: http://core.svn.wordpress.org/trunk@48657 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/load.php | 10 ++++++++-- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wp-includes/load.php b/wp-includes/load.php index e38fdc66c9..8cc14e06db 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -159,11 +159,17 @@ function wp_get_environment_type() { // Add a note about the deprecated WP_ENVIRONMENT_TYPES constant. if ( defined( 'WP_ENVIRONMENT_TYPES' ) && function_exists( '_deprecated_argument' ) ) { + if ( function_exists( '__' ) ) { + /* translators: %s: WP_ENVIRONMENT_TYPES */ + $message = sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' ); + } else { + $message = sprintf( 'The %s constant is no longer supported.', 'WP_ENVIRONMENT_TYPES' ); + } + _deprecated_argument( 'define()', '5.5.1', - /* translators: %s: WP_ENVIRONMENT_TYPES */ - sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' ) + $message ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 20e44dcf6a..6bd11823eb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48894'; +$wp_version = '5.6-alpha-48895'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.