Use the create_posts post type cap in more places. Remove the janky create_posts meta cap. see #16714.

git-svn-id: https://develop.svn.wordpress.org/trunk@22908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-11-28 22:28:20 +00:00
parent 4e51b43ad3
commit 5aac5cb3de
6 changed files with 12 additions and 15 deletions

View File

@@ -1060,14 +1060,6 @@ function map_meta_cap( $cap, $user_id ) {
$caps[] = $post_type->cap->delete_private_posts;
}
break;
// current_user_can( 'create_posts', $post_type )
case 'create_posts':
$post_type = isset( $args[0] ) ? $args[0] : 'post';
$post_type_object = get_post_type_object( $post_type );
$caps[] = $post_type_object->cap->create_posts;
break;
// edit_post breaks down to edit_posts, edit_published_posts, or
// edit_others_posts
case 'edit_post':