From 24b7698dbf4fa4285a807ae04f278cc48cf57d1f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 26 Apr 2010 14:56:57 +0000 Subject: [PATCH] Add RTL support to add_editor_style(). Props yoavf. fixes #13120 git-svn-id: https://develop.svn.wordpress.org/trunk@14240 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index ebf04536f4..b312caba51 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1560,6 +1560,11 @@ function add_editor_style( $stylesheet = 'editor-style.css' ) { global $editor_styles; $editor_styles = (array) $editor_styles; $stylesheet = (array) $stylesheet; + if ('rtl' == get_bloginfo('text_direction') ) { + $rtl_stylesheet = str_replace('.css', '-rtl.css', $stylesheet[0]); + $stylesheet[] = $rtl_stylesheet; + } + $editor_styles = array_merge( $editor_styles, $stylesheet ); }