WordPress.org

Make WordPress Core

Changeset 17711


Ignore:
Timestamp:
04/26/2011 06:07:32 PM (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r15366 r17711  
    5353    }
    5454    // set the post_content and status
    55     $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft';
     55    if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) )
     56        $quick['post_status'] = 'publish';
     57    elseif ( isset( $_POST['review'] ) )
     58        $quick['post_status'] = 'pending';
     59    else
     60        $quick['post_status'] = 'draft';
    5661    $quick['post_content'] = $content;
    5762    // error handling for media_sideload
Note: See TracChangeset for help on using the changeset viewer.