Reputation: 3
I used this wordpress plugin to change the website directions from LTR to RTL
the plugin name is: RTL Tester: http://wordpress.org/plugins/rtl-tester/
The main problem is the website admin dashboard is in english and I dont want to change it to Arabic, but when I active the RTL Tester plugin, It will change the website front end pages directions .. (home .. about ... contact) .. and the wp-admin dashboard! and thats what I dont want to change ... I only want to change the website front end and not the back-end!
any one can help me?
Upvotes: 0
Views: 553
Reputation: 26075
Untested, but give it a try:
<?php
/* Plugin Name: Admin Fixed RTL */
add_filter( 'get_user_metadata', 'fix_rtl_so_18968615', 10, 4 );
function fix_rtl_so_18968615( $value, $object, $key, $single )
{
if( !is_admin() )
return $value;
if( 'rtladminbar' == $key )
return 'ltr';
return $value;
}
This will intercept get_user_meta
for the key rtladminbar
, and if it is not the admin side, it returns the saved value, otherwise make it LTR for all users.
After clicking on RTL, the admin will change to RTL, but will come back to LTR in the next load.
Upvotes: 1