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: http://svn.automattic.com/wordpress/trunk@19797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2aec12b287
commit
ecedc9152f
|
@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -260,10 +260,9 @@ wp_templating_constants( );
|
|||
// Load the default text localization domain.
|
||||
load_default_textdomain();
|
||||
|
||||
// Find the blog locale.
|
||||
$locale = get_locale();
|
||||
$locale_file = WP_LANG_DIR . "/$locale.php";
|
||||
if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
|
||||
if ( ( 0 === validate_file( $locale_file ) ) && is_readable( $locale_file ) )
|
||||
require( $locale_file );
|
||||
unset( $locale_file );
|
||||
|
||||
|
|
Loading…
Reference in New Issue