Changeset 14360
- Timestamp:
- 05/03/2010 05:49:19 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/hello.php
r13377 r14360 63 63 function dolly_css() { 64 64 // This makes sure that the posinioning is also good for right-to-left languages 65 $x = ( 'rtl' == get_bloginfo( 'text_direction') ) ? 'left' : 'right';65 $x = ( is_rtl() ) ? 'left' : 'right'; 66 66 67 67 echo " -
trunk/wp-includes/functions.php
r14344 r14360 2606 2606 */ 2607 2607 function _default_wp_die_handler( $message, $title = '', $args = array() ) { 2608 global $wp_locale;2609 2610 2608 $defaults = array( 'response' => 500 ); 2611 2609 $r = wp_parse_args($args, $defaults); … … 2662 2660 if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] ) 2663 2661 $text_direction = 'rtl'; 2664 elseif ( isset($wp_locale ) && 'rtl' == $wp_locale->text_direction)2662 elseif ( function_exists( 'is_rtl' ) && is_rtl() ) 2665 2663 $text_direction = 'rtl'; 2666 2664 ?> … … 2744 2742 */ 2745 2743 function _mce_set_direction( $input ) { 2746 global $wp_locale; 2747 2748 if ( 'rtl' == $wp_locale->text_direction ) { 2744 if ( is_rtl() ) { 2749 2745 $input['directionality'] = 'rtl'; 2750 2746 $input['plugins'] .= ',directionality'; -
trunk/wp-includes/general-template.php
r14347 r14360 399 399 case 'home' : // DEPRECATED 400 400 case 'siteurl' : // DEPRECATED 401 _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>% 1$s</code> option is deprecated for the family of <code>bloginfo()</code> functions. Use the <code>%2$s</code> option instead.'), $show, 'url') );401 _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> option instead.' ), 'url' ) ); 402 402 case 'url' : 403 403 $output = home_url(); … … 459 459 break; 460 460 case 'text_direction': 461 global $wp_locale; 462 if ( isset( $wp_locale ) ) 463 $output = $wp_locale->text_direction; 464 else 465 $output = 'ltr'; 461 //_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> function instead.' ), 'is_rtl()' ) ); 462 return function_exists( 'is_rtl' ) ? is_rtl() : 'ltr'; 466 463 break; 467 464 case 'name': … … 1875 1872 $output = ''; 1876 1873 1877 if ( $dir = get_bloginfo('text_direction') )1878 $attributes[] = "dir=\"$dir\"";1874 if ( function_exists( 'is_rtl' ) ) 1875 $attributes[] = 'dir="' . ( is_rtl() ? 'rtl' : 'ltr' ) . '"'; 1879 1876 1880 1877 if ( $lang = get_bloginfo('language') ) { … … 2113 2110 2114 2111 echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $file ) . "' type='text/css' />\n", $file ); 2115 if ( 'rtl' == get_bloginfo( 'text_direction') )2112 if ( is_rtl() ) 2116 2113 echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( "$file-rtl" ) . "' type='text/css' />\n", "$file-rtl" ); 2117 2114 } -
trunk/wp-includes/js/tinymce/wp-mce-help.php
r12789 r14360 129 129 } 130 130 </style> 131 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>131 <?php if ( is_rtl() ) : ?> 132 132 <style type="text/css"> 133 133 #wphead, #tabs { -
trunk/wp-includes/locale.php
r14190 r14360 327 327 $this->register_globals(); 328 328 } 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 } 329 338 } 330 339 340 /** 341 * Checks if current locale is RTL. 342 * 343 * @since 3.0.0 344 * @return bool Whether locale is RTL. 345 */ 346 function is_rtl() { 347 global $wp_locale; 348 return $wp_locale->is_rtl(); 349 } 350 331 351 ?> -
trunk/wp-includes/media.php
r14151 r14360 782 782 $columns = intval($columns); 783 783 $itemwidth = $columns > 0 ? floor(100/$columns) : 100; 784 $float = $wp_locale->text_direction == 'rtl'? 'right' : 'left';784 $float = is_rtl() ? 'right' : 'left'; 785 785 786 786 $selector = "gallery-{$instance}"; -
trunk/wp-includes/post-template.php
r13861 r14360 373 373 $classes = array(); 374 374 375 if ( 'rtl' == get_bloginfo( 'text_direction') )375 if ( is_rtl() ) 376 376 $classes[] = 'rtl'; 377 377 -
trunk/wp-includes/script-loader.php
r14353 r14360 434 434 $styles->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : ''; 435 435 $styles->default_version = get_bloginfo( 'version' ); 436 $styles->text_direction = 'rtl' == get_bloginfo( 'text_direction') ? 'rtl' : 'ltr';436 $styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr'; 437 437 $styles->default_dirs = array('/wp-admin/'); 438 438 -
trunk/wp-includes/theme.php
r14276 r14360 1581 1581 $editor_styles = (array) $editor_styles; 1582 1582 $stylesheet = (array) $stylesheet; 1583 if ( 'rtl' == get_bloginfo('text_direction') ) {1583 if ( is_rtl() ) { 1584 1584 $rtl_stylesheet = str_replace('.css', '-rtl.css', $stylesheet[0]); 1585 1585 $stylesheet[] = $rtl_stylesheet;
Note: See TracChangeset
for help on using the changeset viewer.