Ticket #16985: 16985.3.patch
File 16985.3.patch, 1.5 KB (added by , 11 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
4144 4144 $dateCreated = $content_struct['dateCreated']->getIso(); 4145 4145 4146 4146 if ( !empty( $dateCreated ) ) { 4147 $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); 4148 $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); 4147 $post_date = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) ); 4148 $post_date_gmt = iso8601_to_datetime( $dateCreated, 'GMT' ); 4149 $edit_date = true; 4149 4150 } else { 4150 4151 $post_date = $postdata['post_date']; 4151 4152 $post_date_gmt = $postdata['post_date_gmt']; 4153 $edit_date = false; 4152 4154 } 4153 4155 4154 4156 // We've got all the data -- post it: 4155 $newpost = compact( 'ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order', 'post_author', 'tags_input', 'page_template');4157 $newpost = compact( 'ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order', 'post_author', 'tags_input', 'page_template', 'edit_date' ); 4156 4158 4157 4159 $result = wp_update_post($newpost, true); 4158 4160 if ( is_wp_error( $result ) )