Fixes #151 - dir="rtl" will no longer be removed
This commit is contained in:
@@ -89,10 +89,16 @@ function roots_root_relative_attachment_urls() {
|
|||||||
|
|
||||||
add_action('pre_get_posts', 'roots_root_relative_attachment_urls');
|
add_action('pre_get_posts', 'roots_root_relative_attachment_urls');
|
||||||
|
|
||||||
// remove dir and set lang="en" as default (rather than en-US)
|
// set lang="en" as default (rather than en-US)
|
||||||
function roots_language_attributes() {
|
function roots_language_attributes() {
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
$output = '';
|
$output = '';
|
||||||
|
if (function_exists('is_rtl')) {
|
||||||
|
if (is_rtl() == 'rtl') {
|
||||||
|
$attributes[] = 'dir="rtl"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$lang = get_bloginfo('language');
|
$lang = get_bloginfo('language');
|
||||||
if ($lang && $lang !== 'en-US') {
|
if ($lang && $lang !== 'en-US') {
|
||||||
$attributes[] = "lang=\"$lang\"";
|
$attributes[] = "lang=\"$lang\"";
|
||||||
|
|||||||
Reference in New Issue
Block a user