Ticket #25616: 25616.diff
File 25616.diff, 996 bytes (added by , 11 years ago) |
---|
-
wp-admin/includes/dashboard.php
585 585 586 586 if ( $drafts && is_array( $drafts ) ) { 587 587 $list = array(); 588 $content_length = apply_filters( 'recent_drafts_content_length', 10 ); 588 589 foreach ( $drafts as $draft ) { 589 590 $url = get_edit_post_link( $draft->ID ); 590 591 $title = _draft_or_post_title( $draft->ID ); 591 592 $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit “%s”' ), 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>'; 592 if ( $the_content = wp_trim_words( $draft->post_content, 10) )593 if ( $the_content = wp_trim_words( $draft->post_content, $content_length ) ) 593 594 $item .= '<p>' . $the_content . '</p>'; 594 595 $list[] = $item; 595 596 }