WordPress.org

Make WordPress Core

Changeset 17709


Ignore:
Timestamp:
04/26/11 17:15:44 (3 years ago)
Author:
ryan
Message:

Validate post status against capabilities in press this. Props nacin. for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/press-this.php

    r17697 r17709  
    5757    } 
    5858    // set the post_content and status 
    59     $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft'; 
     59    if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) ) 
     60        $quick['post_status'] = 'publish'; 
     61    elseif ( isset( $_POST['review'] ) ) 
     62        $quick['post_status'] = 'pending'; 
     63    else 
     64        $quick['post_status'] = 'draft'; 
    6065    $quick['post_content'] = $content; 
    6166    // error handling for media_sideload 
Note: See TracChangeset for help on using the changeset viewer.