diff --git a/wp-includes/load.php b/wp-includes/load.php index 0f1e06378..5c0fdb485 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -726,8 +726,6 @@ function wp_load_translations_early() { load_textdomain( 'default', $location . '/' . $locale . '.mo' ); if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' ); - if ( WP_Locale::is_locale_rtl( $locale ) ) - $text_direction = 'rtl'; break 2; } } diff --git a/wp-includes/locale.php b/wp-includes/locale.php index 925e241f9..227e52c58 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -84,16 +84,6 @@ class WP_Locale { */ var $text_direction = 'ltr'; - /** - * Locales which are known to be right-to-left. - * - * @since 3.4.0 - * @var array - * @access private - * @static - */ - private static $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' ); - /** * Sets up the translated strings and object properties. * @@ -190,7 +180,7 @@ class WP_Locale { // 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() ) ) + elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) $this->text_direction = 'rtl'; } @@ -336,19 +326,6 @@ class WP_Locale { function is_rtl() { return 'rtl' == $this->text_direction; } - - /** - * Determines whether a locale is known to be right-to-left. - * - * @since 3.4.0 - * @static - * - * @param string Locale in WP format. - * @return bool Whether locale is RTL. - */ - public static function is_locale_rtl( $locale ) { - return in_array( $locale, self::$rtl_locales ); - } } /**