From 78e15233b2dcf86a59017cabf80597b65245b563 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Apr 2011 17:15:44 +0000 Subject: [PATCH] Validate post status against capabilities in press this. Props nacin. for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@17709 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/press-this.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 6eccf6290..089838524 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -56,7 +56,12 @@ function press_it() { } } // set the post_content and status - $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft'; + if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) ) + $quick['post_status'] = 'publish'; + elseif ( isset( $_POST['review'] ) ) + $quick['post_status'] = 'pending'; + else + $quick['post_status'] = 'draft'; $quick['post_content'] = $content; // error handling for media_sideload if ( is_wp_error($upload) ) {