Make WordPress Core


Ignore:
Timestamp:
08/22/2010 11:22:46 AM (14 years ago)
Author:
scribu
Message:

replace $table with $wp_list_table. See #14651

File:
1 edited

Legend:

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

    r15513 r15519  
    5959        global $current_screen;
    6060        $current_screen = (object) $_GET['list_args']['screen'];
    61         $table = new $class;
    62         $table->ajax_response();
     61        $wp_list_table = new $class;
     62        $wp_list_table->ajax_response();
    6363    }
    6464
     
    559559
    560560    require_once( './includes/default-list-tables.php' );
    561     $table = new WP_Terms_Table();
     561    $wp_list_table = new WP_Terms_Table();
    562562
    563563    $level = 0;
     
    571571            $level++;
    572572        }
    573         $noparents = $table->single_row( $tag, $level, $taxonomy );
     573        $noparents = $wp_list_table->single_row( $tag, $level, $taxonomy );
    574574    }
    575575    $tag->name = $tag_full_name;
    576     $parents = $table->single_row( $tag, 0, $taxonomy);
     576    $parents = $wp_list_table->single_row( $tag, 0, $taxonomy);
    577577
    578578    $x->add( array(
     
    627627
    628628    require_once( './includes/default-list-tables.php' );
    629     $table = new WP_Comments_Table();
    630     $table->prepare_items();
    631 
    632     if ( !$table->has_items() )
     629    $wp_list_table = new WP_Comments_Table();
     630    $wp_list_table->prepare_items();
     631
     632    if ( !$wp_list_table->has_items() )
    633633        die('1');
    634634
    635635    $x = new WP_Ajax_Response();
    636     foreach ( $table->items as $comment ) {
     636    foreach ( $wp_list_table->items as $comment ) {
    637637        get_comment( $comment );
    638638        ob_start();
    639             $table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
     639            $wp_list_table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
    640640            $comment_list_item = ob_get_contents();
    641641        ob_end_clean();
     
    656656
    657657    require_once( './includes/default-list-tables.php' );
    658     $table = new WP_Comments_Table();
    659     $table->prepare_items();
    660 
    661     if ( !$table->has_items() )
     658    $wp_list_table = new WP_Comments_Table();
     659    $wp_list_table->prepare_items();
     660
     661    if ( !$wp_list_table->has_items() )
    662662        die('1');
    663663
    664664    $comment_list_item = '';
    665665    $x = new WP_Ajax_Response();
    666     foreach ( $table->items as $comment ) {
     666    foreach ( $wp_list_table->items as $comment ) {
    667667        get_comment( $comment );
    668668        ob_start();
    669             $table->single_row( $comment->comment_ID, 'single', false, false );
     669            $wp_list_table->single_row( $comment->comment_ID, 'single', false, false );
    670670            $comment_list_item .= ob_get_contents();
    671671        ob_end_clean();
     
    681681
    682682    require_once( './includes/default-list-tables.php' );
    683     $table = new WP_Comments_Table();
     683    $wp_list_table = new WP_Comments_Table();
    684684
    685685    $comment_post_ID = (int) $_POST['comment_post_ID'];
     
    730730            _wp_dashboard_recent_comments_row( $comment, false );
    731731        } else {
    732             $table->single_row( $comment->comment_ID, $mode, false, $checkbox );
     732            $wp_list_table->single_row( $comment->comment_ID, $mode, false, $checkbox );
    733733        }
    734734        $comment_list_item = ob_get_contents();
     
    763763
    764764    require_once( './includes/default-list-tables.php' );
    765     $table = new WP_Comments_Table();
     765    $wp_list_table = new WP_Comments_Table();
    766766
    767767    ob_start();
    768         $table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
     768        $wp_list_table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
    769769        $comment_list_item = ob_get_contents();
    770770    ob_end_clean();
     
    912912
    913913    require_once( './includes/default-list-tables.php' );
    914     $table = new WP_Users_Table();
     914    $wp_list_table = new WP_Users_Table();
    915915
    916916    $x = new WP_Ajax_Response( array(
    917917        'what' => 'user',
    918918        'id' => $user_id,
    919         'data' => $table->single_row( $user_object, '', $user_object->roles[0] ),
     919        'data' => $wp_list_table->single_row( $user_object, '', $user_object->roles[0] ),
    920920        'supplemental' => array(
    921921            'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
     
    12051205
    12061206    require_once( './includes/default-list-tables.php' );
    1207     $table = new WP_Posts_Table();
     1207    $wp_list_table = new WP_Posts_Table();
    12081208
    12091209    $mode = $_POST['post_view'];
    1210     $table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
     1210    $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
    12111211
    12121212    exit;
     
    12161216
    12171217    require_once( './includes/default-list-tables.php' );
    1218     $table = new WP_Terms_Table();
    1219 
    1220     $table->check_permissions('edit');
     1218    $wp_list_table = new WP_Terms_Table();
     1219
     1220    $wp_list_table->check_permissions('edit');
    12211221
    12221222    if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
     
    12351235        }
    12361236
    1237         echo $table->single_row( $tag, 0, $taxonomy );
     1237        echo $wp_list_table->single_row( $tag, 0, $taxonomy );
    12381238    } else {
    12391239        if ( is_wp_error($updated) && $updated->get_error_message() )
Note: See TracChangeset for help on using the changeset viewer.