From e307c8a125759728d94d2e7cfdbdcd872d3c8549 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 24 Sep 2006 19:29:32 +0000 Subject: [PATCH] Add language and text_direction attributes to bloginfo. Set lang and dir attributes in admin header's html tag. #3136 git-svn-id: http://svn.automattic.com/wordpress/trunk@4217 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 2 +- wp-includes/general-template.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 9a9eec07f9..b32ea5935f 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -13,7 +13,7 @@ get_admin_page_title(); ?> - + <?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 6436b4b5fb..884830e9f9 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -127,6 +127,18 @@ function get_bloginfo($show='') { global $wp_version; $output = $wp_version; break; + case 'language': + $output = get_locale(); + if ( empty($output) ) + $output = 'en-US'; + $output = str_replace('_', '-', $output); + break; + case 'text_direction': + global $wp_locale; + $output = $wp_locale->text_direction; + if ( empty($output) ) + $output = 'ltr'; + break; case 'name': default: $output = get_option('blogname');