diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index cc72c994d4..43c3788a1c 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -589,8 +589,8 @@ function wp_dashboard_recent_drafts( $drafts = false ) { $url = get_edit_post_link( $draft->ID ); $title = _draft_or_post_title( $draft->ID ); $item = "

" . esc_html($title) . " " . get_the_time( get_option( 'date_format' ), $draft ) . '

'; - if ( $the_content = preg_split( '#[\r\n\t ]#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) - $item .= '

' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '

'; + if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) + $item .= '

' . $the_content . '

'; $list[] = $item; } ?>