Make WordPress Core

Changeset 17897


Ignore:
Timestamp:
05/12/2011 05:50:53 AM (15 years ago)
Author:
nacin
Message:

Move output buffering out of a loop, collapsing it into one buffer. props mitchoyoshitaka, fixes #17352.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r17832 r17897  
    610610                die('1');
    611611
    612         $comment_list_item = '';
    613612        $x = new WP_Ajax_Response();
     613        ob_start();
    614614        foreach ( $wp_list_table->items as $comment ) {
    615615                get_comment( $comment );
    616                 ob_start();
    617                         $wp_list_table->single_row( $comment );
    618                         $comment_list_item .= ob_get_contents();
    619                 ob_end_clean();
    620         }
     616                $wp_list_table->single_row( $comment );
     617        }
     618        $comment_list_item = ob_get_contents();
     619        ob_end_clean();
     620
    621621        $x->add( array(
    622622                'what' => 'comments',
Note: See TracChangeset for help on using the changeset viewer.