関数 language_attributes()
2014/12/25
関数 language_attributes()
定義ファイル :/blog/wp-includes/general-template.php 6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | function language_attributes($doctype = 'html') { $attributes = array(); if ( function_exists( 'is_rtl' ) && is_rtl() ) $attributes[] = 'dir="rtl"'; if ( $lang = get_bloginfo('language') ) { if ( get_option('html_type') == 'text/html' || $doctype == 'html' ) $attributes[] = "lang=\"$lang\""; if ( get_option('html_type') != 'text/html' || $doctype == 'xhtml' ) $attributes[] = "xml:lang=\"$lang\""; } $output = implode(' ', $attributes); echo apply_filters( 'language_attributes', $output ); } |