WordPress.org

Make WordPress Core

Ticket #22220: 22220.diff

File 22220.diff, 597 bytes (added by nacin, 17 months ago)
  • wp-includes/class-wp-xmlrpc-server.php

     
    12131213 
    12141214                $post_data = apply_filters( 'xmlrpc_wp_insert_post_data', $post_data, $content_struct ); 
    12151215 
    1216                 $post_ID = wp_insert_post( $post_data, true ); 
     1216                $post_ID = $update ? wp_update_post( $post_data, true ) : wp_insert_post( $post_data, true ); 
    12171217                if ( is_wp_error( $post_ID ) ) 
    12181218                        return new IXR_Error( 500, $post_ID->get_error_message() ); 
    12191219