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:
Andrew Nacin
2012-01-31 14:30:36 +00:00
parent d6886c9059
commit bbec83ba02
2 changed files with 5 additions and 8 deletions
+2 -3
View File
@@ -260,12 +260,11 @@ 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);
unset( $locale_file );
// Pull in locale data after loading text domain.
require_once( ABSPATH . WPINC . '/locale.php' );