Fix adding of parent theme's editor-style before child theme's, props SergeyBiryukov, see #19437

git-svn-id: http://svn.automattic.com/wordpress/trunk@20342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2012-04-02 22:26:11 +00:00
parent 06aedd898e
commit 08bdb01d7d
1 changed files with 9 additions and 9 deletions

View File

@ -330,22 +330,22 @@ final class _WP_Editors {
$style_uri = get_stylesheet_directory_uri();
$style_dir = get_stylesheet_directory();
foreach ( $editor_styles as $key => $file ) {
if ( $file && file_exists( "$style_dir/$file" ) ) {
$mce_css[] = "$style_uri/$file";
$editor_styles[$key] = '';
}
}
if ( is_child_theme() ) {
$template_uri = get_template_directory_uri();
$template_dir = get_template_directory();
foreach ( $editor_styles as $file ) {
if ( $file && file_exists( "$template_dir/$file" ) )
foreach ( $editor_styles as $key => $file ) {
if ( $file && file_exists( "$template_dir/$file" ) ) {
$mce_css[] = "$template_uri/$file";
$editor_styles[$key] = '';
}
}
}
foreach ( $editor_styles as $file ) {
if ( $file && file_exists( "$style_dir/$file" ) )
$mce_css[] = "$style_uri/$file";
}
$mce_css = implode( ',', $mce_css );
} else {