mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Only set text_direction based on a locale being RTL if we successfully loaded a locale.mo file. Otherwise we may be in RTL land based on a WPLANG constant but nothing else. fixes #19924.
git-svn-id: https://develop.svn.wordpress.org/trunk@19797 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -187,13 +187,11 @@ class WP_Locale {
|
||||
$trans = __('number_format_decimal_point');
|
||||
$this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
|
||||
|
||||
// Locale-specific tweaks
|
||||
if ( self::is_locale_rtl( get_locale() ) )
|
||||
$this->text_direction = 'rtl';
|
||||
|
||||
// Import the $text_direction global.
|
||||
// Set text direction.
|
||||
if ( isset( $GLOBALS['text_direction'] ) )
|
||||
$this->text_direction = $GLOBALS['text_direction'];
|
||||
elseif ( is_textdomain_loaded( 'default' ) && self::is_locale_rtl( get_locale() ) )
|
||||
$this->text_direction = 'rtl';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user