Changeset 15519 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 08/22/2010 11:22:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r15513 r15519 59 59 global $current_screen; 60 60 $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(); 63 63 } 64 64 … … 559 559 560 560 require_once( './includes/default-list-tables.php' ); 561 $ table = new WP_Terms_Table();561 $wp_list_table = new WP_Terms_Table(); 562 562 563 563 $level = 0; … … 571 571 $level++; 572 572 } 573 $noparents = $ table->single_row( $tag, $level, $taxonomy );573 $noparents = $wp_list_table->single_row( $tag, $level, $taxonomy ); 574 574 } 575 575 $tag->name = $tag_full_name; 576 $parents = $ table->single_row( $tag, 0, $taxonomy);576 $parents = $wp_list_table->single_row( $tag, 0, $taxonomy); 577 577 578 578 $x->add( array( … … 627 627 628 628 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() ) 633 633 die('1'); 634 634 635 635 $x = new WP_Ajax_Response(); 636 foreach ( $ table->items as $comment ) {636 foreach ( $wp_list_table->items as $comment ) { 637 637 get_comment( $comment ); 638 638 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 ); 640 640 $comment_list_item = ob_get_contents(); 641 641 ob_end_clean(); … … 656 656 657 657 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() ) 662 662 die('1'); 663 663 664 664 $comment_list_item = ''; 665 665 $x = new WP_Ajax_Response(); 666 foreach ( $ table->items as $comment ) {666 foreach ( $wp_list_table->items as $comment ) { 667 667 get_comment( $comment ); 668 668 ob_start(); 669 $ table->single_row( $comment->comment_ID, 'single', false, false );669 $wp_list_table->single_row( $comment->comment_ID, 'single', false, false ); 670 670 $comment_list_item .= ob_get_contents(); 671 671 ob_end_clean(); … … 681 681 682 682 require_once( './includes/default-list-tables.php' ); 683 $ table = new WP_Comments_Table();683 $wp_list_table = new WP_Comments_Table(); 684 684 685 685 $comment_post_ID = (int) $_POST['comment_post_ID']; … … 730 730 _wp_dashboard_recent_comments_row( $comment, false ); 731 731 } else { 732 $ table->single_row( $comment->comment_ID, $mode, false, $checkbox );732 $wp_list_table->single_row( $comment->comment_ID, $mode, false, $checkbox ); 733 733 } 734 734 $comment_list_item = ob_get_contents(); … … 763 763 764 764 require_once( './includes/default-list-tables.php' ); 765 $ table = new WP_Comments_Table();765 $wp_list_table = new WP_Comments_Table(); 766 766 767 767 ob_start(); 768 $ table->single_row( $comment_id, $mode, $comments_listing, $checkbox );768 $wp_list_table->single_row( $comment_id, $mode, $comments_listing, $checkbox ); 769 769 $comment_list_item = ob_get_contents(); 770 770 ob_end_clean(); … … 912 912 913 913 require_once( './includes/default-list-tables.php' ); 914 $ table = new WP_Users_Table();914 $wp_list_table = new WP_Users_Table(); 915 915 916 916 $x = new WP_Ajax_Response( array( 917 917 'what' => 'user', 918 918 '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] ), 920 920 'supplemental' => array( 921 921 'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login), … … 1205 1205 1206 1206 require_once( './includes/default-list-tables.php' ); 1207 $ table = new WP_Posts_Table();1207 $wp_list_table = new WP_Posts_Table(); 1208 1208 1209 1209 $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'] ) ) ); 1211 1211 1212 1212 exit; … … 1216 1216 1217 1217 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'); 1221 1221 1222 1222 if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) … … 1235 1235 } 1236 1236 1237 echo $ table->single_row( $tag, 0, $taxonomy );1237 echo $wp_list_table->single_row( $tag, 0, $taxonomy ); 1238 1238 } else { 1239 1239 if ( is_wp_error($updated) && $updated->get_error_message() )
Note: See TracChangeset
for help on using the changeset viewer.