wordpress / latest / functions / is_rtl.html

is_rtl(): bool

Determines whether the current locale is right-to-left (RTL).

Description

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

Return

bool Whether locale is RTL.

More Information

Deprecate get_bloginfo(‘text_direction’) in favor of is_rtl() in Version 3.0.

Source

File: wp-includes/l10n.php. View all references

function is_rtl() {
	global $wp_locale;
	if ( ! ( $wp_locale instanceof WP_Locale ) ) {
		return false;
	}
	return $wp_locale->is_rtl();
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
3.0.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_rtl