Make WordPress Core


Ignore:
Timestamp:
08/12/2010 11:58:49 PM (14 years ago)
Author:
scribu
Message:

Fix Comments meta box in post editing screen. See #14579

File:
1 edited

Legend:

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

    r15496 r15497  
    628628    require_once( './includes/default-list-tables.php' );
    629629    $table = new WP_Comments_Table();
    630 
    631     global $comments;
    632 
    633     if ( !$comments )
     630    $table->prepare_items();
     631
     632    if ( !$table->has_items() )
    634633        die('1');
    635634
     
    638637
    639638    $x = new WP_Ajax_Response();
    640     foreach ( (array) $comments as $comment ) {
     639    foreach ( $table->items as $comment ) {
    641640        get_comment( $comment );
    642641        ob_start();
     
    661660    require_once( './includes/default-list-tables.php' );
    662661    $table = new WP_Comments_Table();
    663 
    664     global $comments;
    665 
    666     if ( !$comments )
     662    $table->prepare_items();
     663
     664    if ( !$table->has_items() )
    667665        die('1');
    668666
    669667    $comment_list_item = '';
    670668    $x = new WP_Ajax_Response();
    671     foreach ( (array) $comments as $comment ) {
     669    foreach ( $table->items as $comment ) {
    672670        get_comment( $comment );
    673671        ob_start();
Note: See TracChangeset for help on using the changeset viewer.