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
This commit is contained in:
parent
7ad9fb7e7c
commit
f4e535df1b
@ -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' ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user