is_rtl

The timeline below displays how wordpress function is_rtl has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.3

/**
 * Determines whether the current locale is right-to-left (RTL).
 *
 * For more information on this and similar theme functions, check out
 * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
 * Conditional Tags} article in the Theme Developer Handbook.
 *
 * @since 3.0.0
 *
 * @global WP_Locale $wp_locale WordPress date and time locale object.
 *
 * @return bool Whether locale is RTL.
 */
function is_rtl()
{
    global $wp_locale;
    if (!$wp_locale instanceof WP_Locale) {
        return false;
    }
    return $wp_locale->is_rtl();
}

WordPress Version: .10

/**
 * Determines whether the current locale is right-to-left (RTL).
 *
 * For more information on this and similar theme functions, check out
 * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
 * Conditional Tags} article in the Theme Developer Handbook.
 *
 * @since 3.0.0
 *
 * @global WP_Locale $wp_locale
 *
 * @return bool Whether locale is RTL.
 */
function is_rtl()
{
    global $wp_locale;
    if (!$wp_locale instanceof WP_Locale) {
        return false;
    }
    return $wp_locale->is_rtl();
}

WordPress Version: 5.0

/**
 * Determines whether the current locale is right-to-left (RTL).
 * 
 * For more information on this and similar theme functions, check out
 * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ 
 * Conditional Tags} article in the Theme Developer Handbook.
 *
 * @since 3.0.0
 *
 * @global WP_Locale $wp_locale
 *
 * @return bool Whether locale is RTL.
 */
function is_rtl()
{
    global $wp_locale;
    if (!$wp_locale instanceof WP_Locale) {
        return false;
    }
    return $wp_locale->is_rtl();
}

WordPress Version: 4.7

/**
 * Checks if current locale is RTL.
 *
 * @since 3.0.0
 *
 * @global WP_Locale $wp_locale
 *
 * @return bool Whether locale is RTL.
 */
function is_rtl()
{
    global $wp_locale;
    if (!$wp_locale instanceof WP_Locale) {
        return false;
    }
    return $wp_locale->is_rtl();
}

WordPress Version: 4.3

/**
 * Checks if current locale is RTL.
 *
 * @since 3.0.0
 *
 * @global WP_Locale $wp_locale
 *
 * @return bool Whether locale is RTL.
 */
function is_rtl()
{
    global $wp_locale;
    return $wp_locale->is_rtl();
}

WordPress Version: 3.7

/**
 * 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();
}