WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/03/2010 05:49:19 AM (10 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/locale.php

    r14190 r14360  
    327327        $this->register_globals();
    328328    }
     329    /**
     330     * Checks if current locale is RTL.
     331     *
     332     * @since 3.0.0
     333     * @return bool Whether locale is RTL.
     334     */
     335     function is_rtl() {
     336        return 'rtl' == $this->text_direction;
     337     }
    329338}
    330339
     340/**
     341 * Checks if current locale is RTL.
     342 *
     343 * @since 3.0.0
     344 * @return bool Whether locale is RTL.
     345 */
     346function is_rtl() {
     347    global $wp_locale;
     348    return $wp_locale->is_rtl();
     349}
     350
    331351?>
Note: See TracChangeset for help on using the changeset viewer.