mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
XML-RPC: Correctly pass the ID value to wp_update_post() in ::mw_editPost().
Follow-up to [59697]. Props johnbillion. See #62279. Built from https://develop.svn.wordpress.org/trunk@59699 git-svn-id: http://core.svn.wordpress.org/trunk@59041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4de28b054d
commit
e28810b49b
|
|
@ -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() );
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59698';
|
||||
$wp_version = '6.8-alpha-59699';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user