Make WordPress Core


Ignore:
Timestamp:
07/23/2015 04:00:31 AM (10 years ago)
Author:
pento
Message:

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

Merge of [33357] to the 4.0 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0/src/wp-admin/post.php

    r29572 r33376  
    114114        $error_msg = __( 'Unable to submit this form, please refresh and try again.' );
    115115
    116     if ( ! current_user_can( 'edit_posts' ) )
    117         $error_msg = __( 'Oops, you don’t have access to add new drafts.' );
     116    if ( ! current_user_can( 'edit_posts' ) ) {
     117        exit;
     118    }
    118119
    119120    if ( $error_msg )
Note: See TracChangeset for help on using the changeset viewer.