Changeset 20059
- Timestamp:
- 03/01/2012 12:18:26 AM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-editor.php
r19945 r20059 329 329 $editor_styles = array_unique($editor_styles); 330 330 $style_uri = get_stylesheet_directory_uri(); 331 if ( ! is_child_theme() ) { 332 foreach ( $editor_styles as $file ) 331 $style_dir = get_stylesheet_directory(); 332 333 foreach ( $editor_styles as $key => $file ) { 334 if ( $file && file_exists( "$style_dir/$file" ) ) { 333 335 $mce_css[] = "$style_uri/$file"; 334 } else { 335 $style_dir = get_stylesheet_directory(); 336 $editor_styles[$key] = ''; 337 } 338 } 339 340 if ( is_child_theme() ) { 336 341 $template_uri = get_template_directory_uri(); 337 342 $template_dir = get_template_directory(); 338 343 339 344 foreach ( $editor_styles as $file ) { 340 if ( file_exists( "$template_dir/$file" ) )345 if ( $file && file_exists( "$template_dir/$file" ) ) 341 346 $mce_css[] = "$template_uri/$file"; 342 347 } 343 344 foreach ( $editor_styles as $file ) {345 if ( file_exists( "$style_dir/$file" ) )346 $mce_css[] = "$style_uri/$file";347 }348 348 } 349 349 350 $mce_css = implode( ',', $mce_css ); 350 351 } else { -
trunk/wp-includes/theme.php
r20053 r20059 1335 1335 * It is optional and defaults to 'editor-style.css'. 1336 1336 * 1337 * Supports RTL stylesheets automatically by searching for the -rtl prefix, e.g. 1338 * editor-style-rtl.css. If an array of stylesheets is passed to add_editor_style(), 1337 * This function automatically adds another stylesheet with -rtl prefix, e.g. editor-style-rtl.css. 1338 * If that file doesn't exist, it is removed before adding the stylesheet(s) to TinyMCE. 1339 * If an array of stylesheets is passed to add_editor_style(), 1339 1340 * RTL is only added for the first stylesheet. 1341 * 1342 * Since version 3.4 the TinyMCE body has .rtl CSS class. 1343 * It is a better option to use that class and add any RTL styles to the main stylesheet. 1340 1344 * 1341 1345 * @since 3.0.0
Note: See TracChangeset
for help on using the changeset viewer.