mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Validate post status against capabilities in press this. Props nacin. for 3.0
git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@17711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ecd36854f2
commit
3fd4cf12d1
@ -52,7 +52,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) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user