Dashboard: use the create_posts cap on the post type object when determining if the Quick Press widget can be displayed.

Props jim912, ocean90, chriscct7.
Fixes #25681.


git-svn-id: https://develop.svn.wordpress.org/trunk@35282 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-10-20 05:48:11 +00:00
parent f07367d34c
commit eb6bdb59cd
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ case 'post-quickdraft-save':
if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
if ( ! current_user_can( 'edit_posts' ) ) {
if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
exit;
}