Make WordPress Core

Changeset 15497


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

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

Location:
trunk/wp-admin
Files:
3 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();
  • trunk/wp-admin/includes/default-list-tables.php

    r15496 r15497  
    21122112
    21132113    function prepare_items() {
    2114         global $comments, $extra_comments, $total_comments, $post_id, $comment_status, $mode;
     2114        global $post_id, $comment_status, $mode;
    21152115
    21162116        $post_id = isset( $_REQUEST['post_ID'] ) ? absint( $_REQUEST['post_ID'] ) : 0;
  • trunk/wp-admin/includes/meta-boxes.php

    r15490 r15497  
    461461    wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
    462462    add_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead', 8, 1);
     463    add_filter('manage_edit-comments_sortable_columns', create_function('', 'return array();'), 8);
     464
     465    require_once( './includes/default-list-tables.php' );
     466    $table = new WP_Comments_Table;
    463467?>
    464468
    465469<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
    466470<thead><tr>
    467     <?php print_column_headers('edit-comments'); ?>
     471    <?php $table->print_column_headers(); ?>
    468472</tr></thead>
    469473<tbody id="the-comment-list" class="list:comment"></tbody>
Note: See TracChangeset for help on using the changeset viewer.