diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index d0257cffa..08446ee16 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -28,6 +28,9 @@ function twentyten_init() { add_custom_background(); + // This theme styles the visual editor with editor-style.css to match the theme style. + add_editor_style(); + // This theme needs post thumbnails add_theme_support( 'post-thumbnails' ); @@ -134,20 +137,6 @@ function twentyten_comment( $comment, $args, $depth ) { } endif; -// Make the Visual Editor styles match the theme's styles -if ( ! function_exists( 'twentyten_editor_style' ) ) : -function twentyten_editor_style( $url ) { - if ( ! empty( $url ) ) - $url .= ','; - - // Change the path here if using sub-directory - $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css'; - - return $url; -} -endif; -add_filter( 'mce_css', 'twentyten_editor_style' ); - // Remove inline styles on gallery shortcode if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) : function twentyten_remove_gallery_css() { diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 8b29dff66..741c66d36 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1446,6 +1446,43 @@ body {