Make WordPress Core


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

Introduce WP_List_Table::check_permissions() and WP_List_Table::prepare_items(). Fixes #14596; See #14579

File:
1 edited

Legend:

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

    r15493 r15496  
    559559
    560560    require_once( './includes/default-list-tables.php' );
    561     $table = new WP_Terms_Table( 'ajax' );
     561    $table = new WP_Terms_Table();
    562562
    563563    $level = 0;
     
    627627
    628628    require_once( './includes/default-list-tables.php' );
    629     $table = new WP_Comments_Table( 'ajax' );
     629    $table = new WP_Comments_Table();
    630630
    631631    global $comments;
     
    660660
    661661    require_once( './includes/default-list-tables.php' );
    662     $table = new WP_Comments_Table( 'ajax' );
     662    $table = new WP_Comments_Table();
    663663
    664664    global $comments;
     
    686686
    687687    require_once( './includes/default-list-tables.php' );
    688     $table = new WP_Comments_Table( 'ajax' );
     688    $table = new WP_Comments_Table();
    689689
    690690    $comment_post_ID = (int) $_POST['comment_post_ID'];
     
    777777
    778778    require_once( './includes/default-list-tables.php' );
    779     $table = new WP_Comments_Table( 'ajax' );
     779    $table = new WP_Comments_Table();
    780780
    781781    ob_start();
     
    926926
    927927    require_once( './includes/default-list-tables.php' );
    928     $table = new WP_Users_Table( 'ajax' );
     928    $table = new WP_Users_Table();
    929929
    930930    $x = new WP_Ajax_Response( array(
     
    12191219
    12201220    require_once( './includes/default-list-tables.php' );
    1221     $table = new WP_Posts_Table( 'ajax' );
     1221    $table = new WP_Posts_Table();
    12221222
    12231223    $mode = $_POST['post_view'];
     
    12291229    check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
    12301230
    1231     $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : false;
    1232     if ( ! $taxonomy )
    1233         die( __('Cheatin’ uh?') );
    1234     $tax = get_taxonomy($taxonomy);
    1235 
    1236     if ( ! current_user_can( $tax->cap->edit_terms ) )
    1237         die( __('Cheatin’ uh?') );
     1231    require_once( './includes/default-list-tables.php' );
     1232    $table = new WP_Terms_Table();
     1233
     1234    $table->check_permissions('edit');
    12381235
    12391236    if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
    12401237        die(-1);
    1241 
    1242     $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
    12431238
    12441239    $tag = get_term( $id, $taxonomy );
     
    12531248            die( __('Item not updated.') );
    12541249        }
    1255 
    1256         set_current_screen( 'edit-' . $taxonomy );
    1257 
    1258         require_once( './includes/default-list-tables.php' );
    1259         $table = new WP_Terms_Table( 'ajax' );
    12601250
    12611251        echo $table->single_row( $tag, 0, $taxonomy );
Note: See TracChangeset for help on using the changeset viewer.