From 08bdb01d7d35e732b74a24cc4ab7fa11000a86bc Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 2 Apr 2012 22:26:11 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-editor.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 288e5a6787..04bb7c91a5 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -330,23 +330,23 @@ 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 { $mce_css = '';