Make WordPress Core


Ignore:
Timestamp:
01/31/2012 02:30:36 PM (13 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

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

    r19761 r19797  
    188188        $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
    189189
    190         // Locale-specific tweaks
    191         if ( self::is_locale_rtl( get_locale() ) )
    192             $this->text_direction = 'rtl';
    193 
    194         // Import the $text_direction global.
     190        // Set text direction.
    195191        if ( isset( $GLOBALS['text_direction'] ) )
    196192            $this->text_direction = $GLOBALS['text_direction'];
     193        elseif ( is_textdomain_loaded( 'default' ) && self::is_locale_rtl( get_locale() ) )
     194            $this->text_direction = 'rtl';
    197195    }
    198196
Note: See TracChangeset for help on using the changeset viewer.