mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Fix adding of parent theme's editor-style before child theme's, props SergeyBiryukov, see #19437
git-svn-id: https://develop.svn.wordpress.org/trunk@20342 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
05071148d9
commit
7e34db14c8
@ -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 = '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user