Make WordPress Core

Changeset 59699


Ignore:
Timestamp:
01/24/2025 12:28:26 PM (22 months ago)
Author:
SergeyBiryukov
Message:

XML-RPC: Correctly pass the ID value to wp_update_post() in ::mw_editPost().

Follow-up to [59697].

Props johnbillion.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r59697 r59699  
    60066006                }
    60076007
    6008                 // We've got all the data -- post it.
    6009                 $newpost = compact(
    6010                         'post_id',
     6008                $newpost = array(
     6009                        'ID' => $post_id,
     6010                );
     6011
     6012                $newpost += compact(
    60116013                        'post_content',
    60126014                        'post_title',
    … …  
    60296031                );
    60306032
     6033                // We've got all the data -- post it.
    60316034                $result = wp_update_post( $newpost, true );
    60326035                if ( is_wp_error( $result ) ) {
Note: See TracChangeset for help on using the changeset viewer.