Make WordPress Core

Changeset 45029


Ignore:
Timestamp:
03/27/2019 01:26:50 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-locale.php

    r44566 r45029  
    116116     *
    117117     * @global string $text_direction
     118     * @global string $wp_version
    118119     */
    119120    public function init() {
     
    223224        }
    224225
    225         if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) {
     226        if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {
    226227            $this->text_direction = 'ltr';
    227228            add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
Note: See TracChangeset for help on using the changeset viewer.