Make WordPress Core

Changeset 4201


Ignore:
Timestamp:
09/21/2006 12:34:34 AM (18 years ago)
Author:
ryan
Message:

RTL support. Props mani_monaj. #3136

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-filters.php

    r4194 r4201  
    142142add_filter('option_ping_sites', 'privacy_ping_filter');
    143143add_filter('option_blog_charset', 'wp_specialchars');
     144add_filter('mce_plugins', '_mce_load_rtl_plugin');
     145add_filter('mce_buttons', '_mce_add_direction_buttons');
    144146
    145147// Actions
     
    159161add_action('sanitize_comment_cookies', 'sanitize_comment_cookies');
    160162add_action('admin_print_scripts', 'wp_print_scripts', 20);
     163add_action('mce_options', '_mce_set_direction');
    161164?>
  • trunk/wp-includes/functions.php

    r4196 r4201  
    11601160}
    11611161
     1162function _mce_set_direction() {
     1163    global $wp_locale;
     1164    if ('rtl' == $wp_locale->text_direction)
     1165        echo 'directionality : "rtl" ,';
     1166}
     1167
     1168function _mce_load_rtl_plugin($input) {
     1169    global $wp_locale;
     1170    if ('rtl' == $wp_locale->text_direction)
     1171        $input[] = 'directionality';
     1172
     1173    return $input;
     1174}
     1175
     1176function _mce_add_direction_buttons($input) {
     1177    global $wp_locale;
     1178    if ('rtl' == $wp_locale->text_direction) {
     1179        $new_buttons = array('separator', 'ltr', 'rtl');
     1180        $input = array_merge($input, $new_buttons);
     1181    }
     1182
     1183    return $input;
     1184}
     1185
    11621186?>
Note: See TracChangeset for help on using the changeset viewer.