Changeset 6408 for trunk/wp-includes/general-template.php
- Timestamp:
- 12/19/2007 05:44:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.