WordPress.org

Make WordPress Core

Ticket #21625: 21625.patch

File 21625.patch, 987 bytes (added by SergeyBiryukov, 23 months ago)
  • wp-admin/includes/dashboard.php

     
    566566                        $url = get_edit_post_link( $draft->ID ); 
    567567                        $title = _draft_or_post_title( $draft->ID ); 
    568568                        $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit &#8220;%s&#8221;' ), esc_attr( $title ) ) . "'>" . esc_html($title) . "</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>'; 
    569                         if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) 
     569                        if ( $the_content = preg_split( '#[\r\n\t ]+#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) 
    570570                                $item .= '<p>' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '&hellip;' : '' ) . '</p>'; 
    571571                        $list[] = $item; 
    572572                }