From ae484584028c752efb5faa4c02259556e853d26e Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 19 Sep 2006 16:06:15 +0000 Subject: WP Merge to 4197 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@761 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/theme.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'wp-includes/theme.php') 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 ''; +} + function validate_current_theme() { // Don't validate during an install/upgrade. if ( defined('WP_INSTALLING') ) -- cgit