From eb56e500888fc8676266fba47dca193514d70ff6 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 25 Jan 2012 22:29:33 +0000 Subject: [PATCH] Remove locale_vars from WP_Locale. Explicitly set the text_direction property from a global, not from an arbitrary list. see #19600. git-svn-id: https://develop.svn.wordpress.org/trunk@19754 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/locale.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/wp-includes/locale.php b/wp-includes/locale.php index 81f6c0466d..fa67bcb176 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -84,15 +84,6 @@ class WP_Locale { */ var $text_direction = 'ltr'; - /** - * Imports the global version to the class property. - * - * @since 2.1.0 - * @var array - * @access private - */ - var $locale_vars = array('text_direction'); - /** * Sets up the translated strings and object properties. * @@ -186,11 +177,9 @@ class WP_Locale { $trans = __('number_format_decimal_point'); $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; - // Import global locale vars set during inclusion of $locale.php. - foreach ( (array) $this->locale_vars as $var ) { - if ( isset($GLOBALS[$var]) ) - $this->$var = $GLOBALS[$var]; - } + // Import the $text_direction global. + if ( isset( $GLOBALS['text_direction'] ) ) + $this->text_direction = $GLOBALS['text_direction']; }