Ticket #3136: rtl.diff
| File rtl.diff, 3.6 KB (added by , 19 years ago) |
|---|
-
wp-includes/default-filters.php
144 144 145 145 // Actions 146 146 add_action('wp_head', 'rsd_link'); 147 add_action('wp_head', 'locale_stylesheet'); 147 148 add_action('publish_future_post', 'wp_publish_post', 10, 1); 148 149 add_action('wp_head', 'noindex', 1); 149 150 add_action('wp_head', 'wp_print_scripts'); -
wp-includes/locale.php
12 12 13 13 var $meridiem; 14 14 15 var $text_direction = ''; 16 var $locale_vars = array('text_direction'); 17 15 18 function init() { 16 19 // The Weekdays 17 20 $this->weekday[0] = __('Sunday'); … … 83 86 $this->meridiem['pm'] = __('pm'); 84 87 $this->meridiem['AM'] = __('AM'); 85 88 $this->meridiem['PM'] = __('PM'); 89 90 $this->_load_locale_data(); 86 91 } 87 92 93 function _load_locale_data() { 94 $locale = get_locale(); 95 $locale_file = ABSPATH . "wp-includes/languages/$locale.php"; 96 if ( !file_exists($locale_file) ) 97 return; 98 99 include($locale_file); 100 101 foreach ( $this->locale_vars as $var ) { 102 $this->$var = $$var; 103 } 104 } 105 88 106 function get_weekday($weekday_number) { 89 107 return $this->weekday[$weekday_number]; 90 108 } -
wp-includes/theme.php
25 25 return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); 26 26 } 27 27 28 function get_locale_stylesheet_uri() { 29 global $wp_locale; 30 $stylesheet_dir_uri = get_stylesheet_directory_uri(); 31 $dir = get_stylesheet_directory(); 32 $locale = get_locale(); 33 if ( file_exists("$dir/$locale.css") ) 34 $stylesheet_uri = "$stylesheet_dir_uri/$locale.css"; 35 else if ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") ) 36 $stylesheet_uri = "$stylesheet_dir_uri/{$wp_locale->text_direction}.css"; 37 else 38 $stylesheet_uri = ''; 39 return apply_filters('locale_stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); 40 } 41 28 42 function get_template() { 29 43 return apply_filters('template', get_option('template')); 30 44 } … … 369 383 require_once($file); 370 384 } 371 385 386 function locale_stylesheet() { 387 $stylesheet = get_locale_stylesheet_uri(); 388 if ( empty($stylesheet) ) 389 return; 390 echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />'; 391 } 392 372 393 function validate_current_theme() { 373 394 // Don't validate during an install/upgrade. 374 395 if ( defined('WP_INSTALLING') ) -
wp-admin/admin-header.php
18 18 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 19 19 <title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title> 20 20 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 21 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 22 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 23 <?php endif; ?> 21 24 <script type="text/javascript"> 22 25 //<![CDATA[ 23 26 function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}