WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/22/2015 04:05:17 AM (5 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.2 branch.

File:
1 edited

Legend:

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

    r31633 r33358  
    116116        $error_msg = __( 'Unable to submit this form, please refresh and try again.' );
    117117
    118     if ( ! current_user_can( 'edit_posts' ) )
    119         $error_msg = __( 'Oops, you don’t have access to add new drafts.' );
     118    if ( ! current_user_can( 'edit_posts' ) ) {
     119        exit;
     120    }
    120121
    121122    if ( $error_msg )
Note: See TracChangeset for help on using the changeset viewer.