Make WordPress Core

Changeset 17710


Ignore:
Timestamp:
04/26/2011 06:06:50 PM (13 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r17254 r17710  
    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.