Make WordPress Core

Ticket #25681: 25681.2.patch

File 25681.2.patch, 1.2 KB (added by chriscct7, 11 years ago)
  • src/wp-admin/includes/dashboard.php

     
    4747        }
    4848
    4949        // QuickPress Widget
    50         if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) {
     50        if ( is_blog_admin() && current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
    5151                $quick_draft_title = sprintf( '<span class="hide-if-no-js">%1$s</span> <span class="hide-if-js">%2$s</span>', __( 'Quick Draft' ), __( 'Drafts' ) );
    5252                wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' );
    5353        }
  • src/wp-admin/post.php

     
    7171        if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
    7272                $error_msg = __( 'Unable to submit this form, please refresh and try again.' );
    7373
    74         if ( ! current_user_can( 'edit_posts' ) ) {
     74        if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
    7575                exit;
    7676        }
    7777