Make WordPress Core


Ignore:
Timestamp:
10/20/2015 05:48:11 AM (9 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r35004 r35282  
    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' );
Note: See TracChangeset for help on using the changeset viewer.