Make WordPress Core

Ticket #25616: 25616.diff

File 25616.diff, 996 bytes (added by tenpura, 11 years ago)
  • wp-admin/includes/dashboard.php

     
    585585
    586586        if ( $drafts && is_array( $drafts ) ) {
    587587                $list = array();
     588                $content_length = apply_filters( 'recent_drafts_content_length', 10 );
    588589                foreach ( $drafts as $draft ) {
    589590                        $url = get_edit_post_link( $draft->ID );
    590591                        $title = _draft_or_post_title( $draft->ID );
    591592                        $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>';
    592                         if ( $the_content = wp_trim_words( $draft->post_content, 10 ) )
     593                        if ( $the_content = wp_trim_words( $draft->post_content, $content_length ) )
    593594                                $item .= '<p>' . $the_content . '</p>';
    594595                        $list[] = $item;
    595596                }