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:
parent
06aedd898e
commit
08bdb01d7d
|
@ -330,23 +330,23 @@ final class _WP_Editors {
|
||||||
$style_uri = get_stylesheet_directory_uri();
|
$style_uri = get_stylesheet_directory_uri();
|
||||||
$style_dir = get_stylesheet_directory();
|
$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() ) {
|
if ( is_child_theme() ) {
|
||||||
$template_uri = get_template_directory_uri();
|
$template_uri = get_template_directory_uri();
|
||||||
$template_dir = get_template_directory();
|
$template_dir = get_template_directory();
|
||||||
|
|
||||||
foreach ( $editor_styles as $file ) {
|
foreach ( $editor_styles as $key => $file ) {
|
||||||
if ( $file && file_exists( "$template_dir/$file" ) )
|
if ( $file && file_exists( "$template_dir/$file" ) ) {
|
||||||
$mce_css[] = "$template_uri/$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 );
|
$mce_css = implode( ',', $mce_css );
|
||||||
} else {
|
} else {
|
||||||
$mce_css = '';
|
$mce_css = '';
|
||||||
|
|
Loading…
Reference in New Issue