Created
August 26, 2019 10:22
-
-
Save premanshup/a19ca1437cbdae93655a468a195453f1 to your computer and use it in GitHub Desktop.
Change website layout for RTL languages to LTR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( | |
'init', | |
function() { | |
global $wp_locale, $wp_styles; | |
$direction = 'ltr'; | |
$wp_locale->text_direction = $direction; | |
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { | |
$wp_styles = new WP_Styles(); | |
} | |
$wp_styles->text_direction = $direction; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment