WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/22/2015 04:01:53 AM (5 years ago)
Author:
pento
Message:

Capabilities: When creating an auto-draft, ensure that the current user still has permission to do so.

File:
1 edited

Legend:

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

    r33192 r33357  
    442442function wp_dashboard_quick_press( $error_msg = false ) {
    443443    global $post_ID;
     444
     445    if ( ! current_user_can( 'edit_posts' ) ) {
     446        return;
     447    }
    444448
    445449    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
Note: See TracChangeset for help on using the changeset viewer.