WordPress 4.2.5
[autoinstalls/wordpress.git] / wp-admin / includes / ajax-actions.php
index 423a159f78874f7b2a14b17c51a15f874b802a35..696b4328c7ce97281747ea659dcee74738dc24c0 100644 (file)
@@ -1540,10 +1540,12 @@ function wp_ajax_inline_save() {
                $data['parent_id'] = $data['post_parent'];
 
        // Status.
-       if ( isset($data['keep_private']) && 'private' == $data['keep_private'] )
+       if ( isset( $data['keep_private'] ) && 'private' == $data['keep_private'] ) {
+               $data['visibility']  = 'private';
                $data['post_status'] = 'private';
-       else
+       } else {
                $data['post_status'] = $data['_status'];
+       }
 
        if ( empty($data['comment_status']) )
                $data['comment_status'] = 'closed';