mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Introduce is_rtl(). Use it in core. It only becomes defined when locale is loaded, so it's impossible to use it too early. Deprecate the get_bloginfo('text_direction') call. fixes #13206.
git-svn-id: https://develop.svn.wordpress.org/trunk@14360 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -326,6 +326,26 @@ class WP_Locale {
|
||||
$this->init();
|
||||
$this->register_globals();
|
||||
}
|
||||
/**
|
||||
* Checks if current locale is RTL.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @return bool Whether locale is RTL.
|
||||
*/
|
||||
function is_rtl() {
|
||||
return 'rtl' == $this->text_direction;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if current locale is RTL.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @return bool Whether locale is RTL.
|
||||
*/
|
||||
function is_rtl() {
|
||||
global $wp_locale;
|
||||
return $wp_locale->is_rtl();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user