Use the create_posts capability in more places.
In get_post_type_capabilities(), make sure create_posts reflects customizations to the edit_posts capability when create_posts is not specifically set. git-svn-id: http://core.svn.wordpress.org/trunk@22291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -36,7 +36,7 @@ $title = $post_type_object->labels->add_new_item;
|
||||
|
||||
$editing = true;
|
||||
|
||||
if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
|
||||
if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
|
||||
// Schedule auto-draft cleanup
|
||||
|
||||
Reference in New Issue
Block a user