Ticket #19715: edit_date.patch
File edit_date.patch, 1.5 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
old new 2481 2481 * @param array $args Method parameters. 2482 2482 * @return bool True on success. 2483 2483 */ 2484 function mw_editPost($args) { 2484 function mw_editPost($args) { 2485 $edit_date = 0; 2485 2486 2486 2487 $this->escape($args); 2487 2488 … … 2705 2706 2706 2707 if ( !empty( $dateCreated ) ) { 2707 2708 $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); 2708 $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); 2709 $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); 2710 $edit_date = 1; 2709 2711 } else { 2710 2712 $post_date = $postdata['post_date']; 2711 2713 $post_date_gmt = $postdata['post_date_gmt']; 2712 2714 } 2713 2715 2714 2716 // We've got all the data -- post it: 2715 $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' );2717 $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'); 2716 2718 2717 2719 $result = wp_update_post($newpost, true); 2718 2720 if ( is_wp_error( $result ) )