diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 87d182f5aad11..53fc23524936e 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -6005,9 +6005,11 @@ public function mw_editPost( $args ) { $post_date_gmt = $postdata['post_date_gmt']; } - // We've got all the data -- post it. - $newpost = compact( - 'post_id', + $newpost = array( + 'ID' => $post_id, + ); + + $newpost += compact( 'post_content', 'post_title', 'post_category', @@ -6028,6 +6030,7 @@ public function mw_editPost( $args ) { 'page_template' ); + // We've got all the data -- post it. $result = wp_update_post( $newpost, true ); if ( is_wp_error( $result ) ) { return new IXR_Error( 500, $result->get_error_message() );