Force RTL styles in admin panel
I wanted to have a multi-language site. I installed qTranslate plugin.
It messed my admin panel even after deactivating qtranslate admin panel shows up in ltr. The admin language is unchanged though, it's Persian.
So I dug into problem and I found this stylesheet link in admin pages:
<link rel="stylesheet" href=http://www.example.com/wp-admin/load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,buttons&ver=3.5.1 type="text/css" media="all">
As you can see the dir variable is ltr but it should be rtl. I edited the load-styles.php like this:
$rtl = 1; //( isset($_GET['dir']) && 'rtl' == $_GET['dir'] )
It solved the problem. But it's a hack not a fix. So I want to know is there a way to use rtl styles without this kind of hacking.
The odd thing is that I can't reproduce this problem with my local wp install.
Thank in advance
I wanted to have a multi-language site. I installed qTranslate plugin.
It messed my admin panel even after deactivating qtranslate admin panel shows up in ltr. The admin language is unchanged though, it's Persian.
So I dug into problem and I found this stylesheet link in admin pages:
<link rel="stylesheet" href=http://www.example.com/wp-admin/load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,buttons&ver=3.5.1 type="text/css" media="all">
As you can see the dir variable is ltr but it should be rtl. I edited the load-styles.php like this:
$rtl = 1; //( isset($_GET['dir']) && 'rtl' == $_GET['dir'] )
It solved the problem. But it's a hack not a fix. So I want to know is there a way to use rtl styles without this kind of hacking.
The odd thing is that I can't reproduce this problem with my local wp install.
Thank in advance
No comments:
Post a Comment