mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
Add RTL support to add_editor_style(). Props yoavf. fixes #13120
git-svn-id: http://svn.automattic.com/wordpress/trunk@14240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
37d86213db
commit
0d703dc2c0
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user