Make WordPress Core


Ignore:
Timestamp:
09/18/2006 11:40:19 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.
Note: See TracChangeset for help on using the changeset viewer.