Ticket #27795: 27795.patch
File 27795.patch, 769 bytes (added by , 7 years ago) |
---|
-
src/wp-admin/includes/post.php
112 112 if ( ! in_array( $previous_status, $published_statuses ) || !current_user_can( 'edit_post', $post_id ) ) 113 113 $post_data['post_status'] = 'pending'; 114 114 115 if ( ! isset($post_data['post_status']) ) 116 $post_data['post_status'] = $previous_status; 115 if ( ! isset( $post_data['post_status'] ) ) { 116 $post_data['post_status'] = 'auto-draft' === $previous_status ? 'draft' : $previous_status; 117 } 117 118 118 119 if ( isset( $post_data['post_password'] ) && ! current_user_can( $ptype->cap->publish_posts ) ) { 119 120 unset( $post_data['post_password'] );