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
This commit is contained in:
Ryan Boren 2010-04-26 14:56:57 +00:00
parent 9df1546b16
commit 24b7698dbf
1 changed files with 5 additions and 0 deletions

View File

@ -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 );
}