mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Don't pass non-existing rtl stylesheet to TinyMCE, update phpdoc for add_editor_style(), see #19437
git-svn-id: https://develop.svn.wordpress.org/trunk@20059 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -328,24 +328,25 @@ final class _WP_Editors {
|
||||
$mce_css = array();
|
||||
$editor_styles = array_unique($editor_styles);
|
||||
$style_uri = get_stylesheet_directory_uri();
|
||||
if ( ! is_child_theme() ) {
|
||||
foreach ( $editor_styles as $file )
|
||||
$style_dir = get_stylesheet_directory();
|
||||
|
||||
foreach ( $editor_styles as $key => $file ) {
|
||||
if ( $file && file_exists( "$style_dir/$file" ) ) {
|
||||
$mce_css[] = "$style_uri/$file";
|
||||
} else {
|
||||
$style_dir = get_stylesheet_directory();
|
||||
$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_exists( "$template_dir/$file" ) )
|
||||
if ( $file && file_exists( "$template_dir/$file" ) )
|
||||
$mce_css[] = "$template_uri/$file";
|
||||
}
|
||||
|
||||
foreach ( $editor_styles as $file ) {
|
||||
if ( file_exists( "$style_dir/$file" ) )
|
||||
$mce_css[] = "$style_uri/$file";
|
||||
}
|
||||
}
|
||||
|
||||
$mce_css = implode( ',', $mce_css );
|
||||
} else {
|
||||
$mce_css = '';
|
||||
|
||||
Reference in New Issue
Block a user