From f4e535df1b4f2f74b3680a768669c183e0f558be Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 27 Mar 2019 13:26:50 +0000 Subject: [PATCH] Bootstrap/Load: Restore `$wp_version` global check in `WP_Locale::init()`, previously replaced with `get_bloginfo( 'version' )` in [38459]. `wp_load_translations_early()` can be called in contexts where `get_bloginfo()` is not available yet, e.g. in `wp_check_php_mysql_versions()`. Props shazdeh, parsmizban. Fixes #41092. git-svn-id: https://develop.svn.wordpress.org/trunk@45029 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-locale.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-locale.php b/src/wp-includes/class-wp-locale.php index ee92bee317..9ddc325b35 100644 --- a/src/wp-includes/class-wp-locale.php +++ b/src/wp-includes/class-wp-locale.php @@ -115,6 +115,7 @@ class WP_Locale { * @since 2.1.0 * * @global string $text_direction + * @global string $wp_version */ public function init() { // The Weekdays @@ -222,7 +223,7 @@ class WP_Locale { $this->text_direction = 'rtl'; } - if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) { + if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) { $this->text_direction = 'ltr'; add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) ); }