Make WordPress Core

Ticket #25681: 25681.patch

File 25681.patch, 1.2 KB (added by ocean90, 12 years ago)
  • src/wp-admin/includes/dashboard.php

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

     
    109109        if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
    110110                $error_msg = __( 'Unable to submit this form, please refresh and try again.' );
    111111
    112         if ( ! current_user_can( 'edit_posts' ) )
     112        if ( ! get_post_type_object( 'post' )->cap->create_posts )
    113113                $error_msg = __( 'Oops, you don&#8217;t have access to add new drafts.' );
    114114
    115115        if ( $error_msg )