mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 21:39:50 +01:00
XML-RPC: Correctly pass the ID
value to wp_update_post()
in ::mw_editPost()
.
Follow-up to [59697]. Props johnbillion. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0f6707de30
commit
b88206a61f
@ -6005,9 +6005,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$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 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
'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() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user