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/functions.php

    r14344 r14360  
    26062606 */
    26072607function _default_wp_die_handler( $message, $title = '', $args = array() ) {
    2608     global $wp_locale;
    2609 
    26102608    $defaults = array( 'response' => 500 );
    26112609    $r = wp_parse_args($args, $defaults);
     
    26622660    if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] )
    26632661        $text_direction = 'rtl';
    2664     elseif ( isset($wp_locale ) && 'rtl' == $wp_locale->text_direction )
     2662    elseif ( function_exists( 'is_rtl' ) && is_rtl() )
    26652663        $text_direction = 'rtl';
    26662664?>
     
    27442742 */
    27452743function _mce_set_direction( $input ) {
    2746     global $wp_locale;
    2747 
    2748     if ( 'rtl' == $wp_locale->text_direction ) {
     2744    if ( is_rtl() ) {
    27492745        $input['directionality'] = 'rtl';
    27502746        $input['plugins'] .= ',directionality';
Note: See TracChangeset for help on using the changeset viewer.