Handle manual saving of auto-drafts for Contributors without JavaScript. props jbsil. fixes #13133

git-svn-id: https://develop.svn.wordpress.org/trunk@14551 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2010-05-10 21:21:42 +00:00
parent e8c4ed229f
commit 9ccf5de9de
1 changed files with 2 additions and 0 deletions

View File

@ -156,6 +156,8 @@ function edit_post( $post_data = null ) {
}
$post_data = _wp_translate_postdata( true, $post_data );
if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] )
$post_data['post_status'] = 'draft';
if ( is_wp_error($post_data) )
wp_die( $post_data->get_error_message() );