diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-19 16:06:15 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-19 16:06:15 +0000 |
commit | ae484584028c752efb5faa4c02259556e853d26e (patch) | |
tree | ef88d82a06a9226b332b74b013b4d85a896852b0 /wp-includes/theme.php | |
parent | 882678aa9ed2d369d1a4c66696df002f44aae889 (diff) | |
download | wordpress-mu-ae484584028c752efb5faa4c02259556e853d26e.tar.gz wordpress-mu-ae484584028c752efb5faa4c02259556e853d26e.tar.xz wordpress-mu-ae484584028c752efb5faa4c02259556e853d26e.zip |
WP Merge to 4197
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@761 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/theme.php')
-rw-r--r-- | wp-includes/theme.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 36f001d..d8051da 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -25,6 +25,20 @@ function get_stylesheet_uri() { return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); } +function get_locale_stylesheet_uri() { + global $wp_locale; + $stylesheet_dir_uri = get_stylesheet_directory_uri(); + $dir = get_stylesheet_directory(); + $locale = get_locale(); + if ( file_exists("$dir/$locale.css") ) + $stylesheet_uri = "$stylesheet_dir_uri/$locale.css"; + else if ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") ) + $stylesheet_uri = "$stylesheet_dir_uri/{$wp_locale->text_direction}.css"; + else + $stylesheet_uri = ''; + return apply_filters('locale_stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); +} + function get_template() { return apply_filters('template', get_option('template')); } @@ -370,6 +384,13 @@ function load_template($file) { require_once($file); } +function locale_stylesheet() { + $stylesheet = get_locale_stylesheet_uri(); + if ( empty($stylesheet) ) + return; + echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />'; +} + function validate_current_theme() { // Don't validate during an install/upgrade. if ( defined('WP_INSTALLING') ) |