diff --git a/wp-admin/rtl.css b/wp-admin/rtl.css new file mode 100644 index 0000000000..68ce29a65f --- /dev/null +++ b/wp-admin/rtl.css @@ -0,0 +1,113 @@ +body { + direction: rtl; +} + +body, td { + font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; +} + +h2 small.quickjump { + text-align: left; +} + +h2 small.quickjump a { + font-size: 12px; + font-family: Tahoma, sans-serif; +} + +textarea, input, select { + font: 12px Tahoma, Arial, Helvetica, sans-serif; +} + +#adminmenu { + float: right; + width: 100%; +} + +#adminmenu a { + font-size: 16px; + font-weight: bold; + font-family: georgia; + margin: 0px 2px; + padding: 1px 5px; + float: right; +} + +#submenu { + clear: both; + float: right; + width: 100%; +} + +#submenu a { + padding: .1em .33em; + float: right; + margin: 0px 2px; +} + +#title { + font-family: georgia; +} + +#login h1 { + direction: ltr; +} + +#postcustom .updatemeta, #postcustom .deletemeta { + width: 5em; +} + +#template div { + direction: ltr; +} + +#user_info { + left: 1em; + top: 0; + right: auto; +} + +#wphead { + padding: .8em 2em .8em 19em; +} + +#moremeta fieldset div { + padding: 0 7px 0 0; +} + +#moremeta .dbx-content { + background: url(images/box-butt.gif) no-repeat bottom left; + padding: 5px 10px 15px 5px; +} + +#moremeta .dbx-handle { + background: url(images/box-head.gif) no-repeat right; +} + +/* toggle images */ +a.dbx-toggle, a.dbx-toggle:visited { + left: 5px; + right: auto; +} + +#advancedstuff a.dbx-toggle-open, #advancedstuff a.dbx-toggle-open:visited { + + } + +/* Ali ix Corrections and Additions ;) */ + +td.desc, td.name, textarea#ping_sites, textarea#moderation_keys, textarea#blacklist_keys, input#home, input#admin_email, input#siteurl, input#mailserver_url, input#mailserver_port, input#mailserver_login, input#mailserver_pass, input#blog_charset, input#permalink_structure, input#post_name, input#trackback { + direction: ltr; + text-align: left; +} +.mceToolbarTop { + direction: ltr; +} + +div#zeitgeist ul, div.wrap ul { + list-style: none; + } + +table.widefat th, tr.thead { + text-align: right; +} \ No newline at end of file diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 22b5528c8a..75f24eda0b 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -141,6 +141,8 @@ add_filter('the_author', 'ent2ncr', 8); // Misc filters add_filter('option_ping_sites', 'privacy_ping_filter'); add_filter('option_blog_charset', 'wp_specialchars'); +add_filter('mce_plugins', '_mce_load_rtl_plugin'); +add_filter('mce_buttons', '_mce_add_direction_buttons'); // Actions add_action('wp_head', 'rsd_link'); @@ -158,4 +160,5 @@ add_action('do_pings', 'do_all_pings', 10, 1); add_action('do_robots', 'do_robots'); add_action('sanitize_comment_cookies', 'sanitize_comment_cookies'); add_action('admin_print_scripts', 'wp_print_scripts', 20); +add_action('mce_options', '_mce_set_direction'); ?> diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2e64b9d884..4a952525ea 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1159,4 +1159,28 @@ function wp_die($message, $title = '') { die(); } +function _mce_set_direction() { + global $wp_locale; + if ('rtl' == $wp_locale->text_direction) + echo 'directionality : "rtl" ,'; +} + +function _mce_load_rtl_plugin($input) { + global $wp_locale; + if ('rtl' == $wp_locale->text_direction) + $input[] = 'directionality'; + + return $input; +} + +function _mce_add_direction_buttons($input) { + global $wp_locale; + if ('rtl' == $wp_locale->text_direction) { + $new_buttons = array('separator', 'ltr', 'rtl'); + $input = array_merge($input, $new_buttons); + } + + return $input; +} + ?>