Make WordPress Core


Ignore:
Timestamp:
12/16/2010 09:18:28 AM (14 years ago)
Author:
nacin
Message:

Replace check_permissions() with ajax_user_can(). New method returns true/false to current_user_can(), which we then handle in admin ajax. see #15326.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-terms-list-table.php

    r16900 r16992  
    3333    }
    3434
    35     function check_permissions( $type = '' ) {
     35    function ajax_user_can() {
    3636        global $tax;
    3737
    38         $cap = 'edit' == $type ? $tax->cap->edit_terms : $tax->cap->manage_terms;
    39         if ( !current_user_can( $cap ) )
    40             wp_die( __( 'Cheatin’ uh?' ) );
     38        return current_user_can( $tax->cap->manage_terms );
    4139    }
    4240
Note: See TracChangeset for help on using the changeset viewer.