Remove lang cleanup and fix dir

This commit is contained in:
Scott Walkinshaw
2013-12-13 19:44:19 -05:00
parent 1e26ad1b4a
commit d19f17bc17

View File

@@ -50,25 +50,20 @@ add_filter('the_generator', '__return_false');
/**
* Clean up language_attributes() used in <html> tag
*
* Change lang="en-US" to lang="en"
* Remove dir="ltr"
*/
function roots_language_attributes() {
$attributes = array();
$output = '';
if (function_exists('is_rtl')) {
if (is_rtl() == 'rtl') {
$attributes[] = 'dir="rtl"';
}
if (is_rtl()) {
$attributes[] = 'dir="rtl"';
}
$lang = get_bloginfo('language');
if ($lang && $lang !== 'en-US') {
if ($lang) {
$attributes[] = "lang=\"$lang\"";
} else {
$attributes[] = 'lang="en"';
}
$output = implode(' ', $attributes);