Changeset 6408
- Timestamp:
- 12/19/07 17:44:02 (1 year ago)
- Files:
-
- trunk/wp-includes/general-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/general-template.php
r6364 r6408 1001 1001 } 1002 1002 1003 function language_attributes() { 1003 function language_attributes($doctype = 'html') { 1004 $attributes = array(); 1004 1005 $output = ''; 1006 1005 1007 if ( $dir = get_bloginfo('text_direction') ) 1006 $output = "dir=\"$dir\""; 1008 $attributes[] = "dir=\"$dir\""; 1009 1007 1010 if ( $lang = get_bloginfo('language') ) { 1008 if ( $dir ) $output .= ' '; 1009 if ( get_option('html_type') == 'text/html' ) 1010 $output .= "lang=\"$lang\""; 1011 else $output .= "xml:lang=\"$lang\""; 1012 } 1013 1011 if ( get_option('html_type') == 'text/html' || $doctype == 'xhtml' ) 1012 $attributes[] = "lang=\"$lang\""; 1013 1014 if ( get_option('html_type') != 'text/html' || $doctype == 'xhtml' ) 1015 $attributes[] = "xml:lang=\"$lang\""; 1016 } 1017 1018 $output = implode(' ', $attributes); 1019 $output = apply_filters('language_attributes', $output); 1014 1020 echo $output; 1015 1021 }
