WordPress.org

Make WordPress Core

Ticket #20475: wp.editpost.patch

File wp.editpost.patch, 978 bytes (added by nprasath002, 3 years ago)
  • class-wp-xmlrpc-server.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    10231023                if ( empty( $post["ID"] ) ) 
    10241024                        return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 
    10251025 
     1026                // Thwart attempt to change the post type. 
     1027                if ( ! empty( $content_struct[ 'post_type' ] ) && ( $content_struct['post_type'] != $post[ 'post_type' ] ) ) 
     1028                        return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); 
     1029 
    10261030                // convert the date field back to IXR form 
    10271031                $post['post_date'] = $this->_convert_date( $post['post_date'] ); 
    10281032