Changeset 4194

Show
Ignore:
Timestamp:
09/18/06 23:40:19 (2 years ago)
Author:
ryan
Message:

Fix logo link in wp_die(). Props Sewar. fixes #3138

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-header.php

    r4144 r4194  
    1919<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title> 
    2020<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; ?>  
    2124<script type="text/javascript"> 
    2225//<![CDATA[ 
  • trunk/wp-includes/default-filters.php

    r4120 r4194  
    145145// Actions 
    146146add_action('wp_head', 'rsd_link'); 
     147add_action('wp_head', 'locale_stylesheet'); 
    147148add_action('publish_future_post', 'wp_publish_post', 10, 1); 
    148149add_action('wp_head', 'noindex', 1); 
  • trunk/wp-includes/functions.php

    r4181 r4194  
    11121112    if ( empty($title) ) 
    11131113        $title = __('WordPress &rsaquo; Error'); 
     1114 
     1115    if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') ) 
     1116        $logo_src = 'images/wordpress-logo.png'; 
     1117    else 
     1118        $logo_src = 'wp-admin/images/wordpress-logo.png'; 
     1119 
    11141120?> 
    11151121<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    11571163</head> 
    11581164<body> 
    1159     <h1 id="logo"><img alt="WordPress" src="<?php echo get_option('siteurl'); ?>/wp-admin/images/wordpress-logo.png" /></h1> 
     1165    <h1 id="logo"><img alt="WordPress" src="<?php echo $logo_src; ?>" /></h1> 
    11601166    <p><?php echo $message; ?></p> 
    11611167</body> 
  • trunk/wp-includes/locale.php

    r3676 r4194  
    1212 
    1313    var $meridiem; 
     14 
     15    var $text_direction = ''; 
     16    var $locale_vars = array('text_direction'); 
    1417 
    1518    function init() { 
     
    8487        $this->meridiem['AM'] = __('AM'); 
    8588        $this->meridiem['PM'] = __('PM'); 
     89 
     90        $this->_load_locale_data(); 
     91    } 
     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        } 
    86104    } 
    87105 
  • trunk/wp-includes/theme.php

    r4144 r4194  
    2424    $stylesheet_uri = $stylesheet_dir_uri . "/style.css"; 
    2525    return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); 
     26} 
     27 
     28function 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); 
    2640} 
    2741 
     
    370384} 
    371385 
     386function 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 
    372393function validate_current_theme() { 
    373394    // Don't validate during an install/upgrade.