From 5f183e52f604a4983a05460a25c6f72e55ab26bd Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 26 Jan 2012 21:20:19 +0000 Subject: [PATCH] Docs for WP_Locale::is_locale_rtl( $locale ). see #18180, see #19600. git-svn-id: http://svn.automattic.com/wordpress/trunk@19761 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/locale.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wp-includes/locale.php b/wp-includes/locale.php index 647888d7dd..aea9b4c3be 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -86,6 +86,11 @@ class WP_Locale { /** * 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' ); @@ -323,6 +328,7 @@ class WP_Locale { $this->init(); $this->register_globals(); } + /** * Checks if current locale is RTL. * @@ -333,6 +339,15 @@ class WP_Locale { 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 ); }