Changeset 19836
- Timestamp:
- 02/06/2012 07:36:24 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/load.php
r19787 r19836 727 727 if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) 728 728 load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' ); 729 if ( WP_Locale::is_locale_rtl( $locale ) )730 $text_direction = 'rtl';731 729 break 2; 732 730 } -
trunk/wp-includes/locale.php
r19797 r19836 84 84 */ 85 85 var $text_direction = 'ltr'; 86 87 /**88 * Locales which are known to be right-to-left.89 *90 * @since 3.4.091 * @var array92 * @access private93 * @static94 */95 private static $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' );96 86 97 87 /** … … 191 181 if ( isset( $GLOBALS['text_direction'] ) ) 192 182 $this->text_direction = $GLOBALS['text_direction']; 193 elseif ( is_textdomain_loaded( 'default' ) && self::is_locale_rtl( get_locale()) )183 elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) 194 184 $this->text_direction = 'rtl'; 195 185 } … … 336 326 function is_rtl() { 337 327 return 'rtl' == $this->text_direction; 338 }339 340 /**341 * Determines whether a locale is known to be right-to-left.342 *343 * @since 3.4.0344 * @static345 *346 * @param string Locale in WP format.347 * @return bool Whether locale is RTL.348 */349 public static function is_locale_rtl( $locale ) {350 return in_array( $locale, self::$rtl_locales );351 328 } 352 329 }
Note: See TracChangeset
for help on using the changeset viewer.