mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Move output buffering out of a loop, collapsing it into one buffer. props mitchoyoshitaka, fixes #17352.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a5e724c025
commit
351b6ce13e
@ -609,15 +609,15 @@ case 'get-comments' :
|
||||
if ( !$wp_list_table->has_items() )
|
||||
die('1');
|
||||
|
||||
$comment_list_item = '';
|
||||
$x = new WP_Ajax_Response();
|
||||
ob_start();
|
||||
foreach ( $wp_list_table->items as $comment ) {
|
||||
get_comment( $comment );
|
||||
ob_start();
|
||||
$wp_list_table->single_row( $comment );
|
||||
$comment_list_item .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
$wp_list_table->single_row( $comment );
|
||||
}
|
||||
$comment_list_item = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$x->add( array(
|
||||
'what' => 'comments',
|
||||
'data' => $comment_list_item
|
||||
|
Loading…
x
Reference in New Issue
Block a user