Make WordPress Core


Ignore:
Timestamp:
07/22/2015 04:01:53 AM (8 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/post.php

    r33054 r33357  
    121121        $error_msg = __( 'Unable to submit this form, please refresh and try again.' );
    122122
    123     if ( ! current_user_can( 'edit_posts' ) )
    124         $error_msg = __( 'Oops, you don’t have access to add new drafts.' );
     123    if ( ! current_user_can( 'edit_posts' ) ) {
     124        exit;
     125    }
    125126
    126127    if ( $error_msg )
Note: See TracChangeset for help on using the changeset viewer.