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.

git-svn-id: https://develop.svn.wordpress.org/trunk@16992 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-12-16 09:18:28 +00:00
parent 8661cbc56e
commit 266cd3f5df
15 changed files with 47 additions and 51 deletions
@@ -78,11 +78,10 @@ class WP_Posts_List_Table extends WP_List_Table {
) );
}
function check_permissions() {
function ajax_user_can() {
global $post_type_object;
if ( !current_user_can( $post_type_object->cap->edit_posts ) )
wp_die( __( 'Cheatin’ uh?' ) );
return current_user_can( $post_type_object->cap->edit_posts );
}
function prepare_items() {