Changeset 21914 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 09/19/2012 12:43:31 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/ajax-actions.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r21866 r21914 30 30 */ 31 31 function wp_ajax_fetch_list() { 32 global $ current_screen, $wp_list_table;32 global $wp_list_table; 33 33 34 34 $list_class = $_GET['list_args']['class']; 35 35 check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' ); 36 36 37 $current_screen = convert_to_screen( $_GET['list_args']['screen']['id'] ); 38 39 define( 'WP_NETWORK_ADMIN', $current_screen->is_network ); 40 define( 'WP_USER_ADMIN', $current_screen->is_user ); 41 42 $wp_list_table = _get_list_table( $list_class ); 37 $wp_list_table = _get_list_table( $list_class, array( 'screen' => $_GET['list_args']['screen']['id'] ) ); 43 38 if ( ! $wp_list_table ) 44 39 wp_die( 0 ); … … 616 611 } 617 612 618 set_current_screen( $_POST['screen'] ); 619 620 $wp_list_table = _get_list_table('WP_Terms_List_Table'); 613 $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) ); 621 614 622 615 $level = 0; … … 687 680 check_ajax_referer( $action ); 688 681 689 set_current_screen( 'edit-comments' ); 690 691 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); 682 $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); 692 683 693 684 if ( !current_user_can( 'edit_post', $post_id ) ) … … 723 714 724 715 check_ajax_referer( $action, '_ajax_nonce-replyto-comment' ); 725 726 set_current_screen( 'edit-comments' );727 716 728 717 $comment_post_ID = (int) $_POST['comment_post_ID']; … … 783 772 } else { 784 773 if ( 'single' == $_REQUEST['mode'] ) { 785 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table' );774 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); 786 775 } else { 787 $wp_list_table = _get_list_table('WP_Comments_List_Table' );776 $wp_list_table = _get_list_table('WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); 788 777 } 789 778 $wp_list_table->single_row( $comment ); … … 812 801 check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ); 813 802 814 set_current_screen( 'edit-comments' );815 816 803 $comment_id = (int) $_POST['comment_ID']; 817 804 if ( ! current_user_can( 'edit_comment', $comment_id ) ) … … 828 815 829 816 $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; 830 $wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table' );817 $wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); 831 818 832 819 $comment = get_comment( $comment_id ); … … 1331 1318 } 1332 1319 1333 set_current_screen( $_POST['screen'] );1334 1335 1320 if ( $last = wp_check_post_lock( $post_ID ) ) { 1336 1321 $last_user = get_userdata( $last ); … … 1368 1353 edit_post(); 1369 1354 1370 $wp_list_table = _get_list_table( 'WP_Posts_List_Table');1355 $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) ); 1371 1356 1372 1357 $mode = $_POST['post_view']; … … 1400 1385 wp_die( -1 ); 1401 1386 1402 set_current_screen( 'edit-' . $taxonomy ); 1403 1404 $wp_list_table = _get_list_table('WP_Terms_List_Table'); 1387 $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => 'edit-' . $taxonomy ) ); 1405 1388 1406 1389 if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)