is_rtl()
Determines whether the current locale is right-to-left (RTL).
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
No Hooks.
Returns
true|false. Whether locale is RTL.
Usage
is_rtl();
Notes
- Global. WP_Locale.
$wp_localeWordPress date and time locale object.
Changelog
| Since 3.0.0 | Introduced. |
is_rtl() is rtl code WP 7.0
function is_rtl() {
global $wp_locale;
if ( ! ( $wp_locale instanceof WP_Locale ) ) {
return false;
}
return $wp_locale->is_rtl();
}