From d19f17bc17178be6c3cd4b7ac79ba0dba535f7f5 Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Fri, 13 Dec 2013 19:44:19 -0500 Subject: [PATCH] Remove lang cleanup and fix dir --- lib/cleanup.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/cleanup.php b/lib/cleanup.php index 39df98d..5814131 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -50,25 +50,20 @@ add_filter('the_generator', '__return_false'); /** * Clean up language_attributes() used in 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);