WordPress.org

Make WordPress Core

Ticket #16846: 16846.patch

File 16846.patch, 1005 bytes (added by ocean90, 7 years ago)
  • wp-admin/includes/dashboard.php

     
    609609        $total_items = isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] )
    610610                ? absint( $widgets['dashboard_recent_comments']['items'] ) : 5;
    611611
    612         while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) {
     612        while ( count( $comments ) < $total_items && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) {
    613613
    614614                foreach ( $possible as $comment ) {
    615615                        if ( count( $comments ) >= $total_items )