Ticket #27792: 27792.diff
File 27792.diff, 1.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/post.php
450 450 $post_data['post_type'] = $post->post_type; 451 451 $post_data['post_mime_type'] = $post->post_mime_type; 452 452 $post_data['guid'] = $post->guid; 453 $post_data['ID'] = $post_ID; 454 $post_data['post_ID'] = $post_ID; 453 455 456 $translated_post_data = $post_data; 457 454 458 foreach ( array( 'comment_status', 'ping_status', 'post_author' ) as $field ) { 455 459 if ( ! isset( $post_data[ $field ] ) ) { 456 $ post_data[ $field ] = $post->$field;460 $translated_post_data[ $field ] = $post->$field; 457 461 } 458 462 } 459 463 460 $post_data['ID'] = $post_ID; 461 $post_data['post_ID'] = $post_ID; 462 463 $translated_post_data = _wp_translate_postdata( true, $post_data ); 464 $translated_post_data = _wp_translate_postdata( true, $translated_post_data ); 464 465 if ( is_wp_error( $translated_post_data ) ) { 465 466 $skipped[] = $post_ID; 466 467 continue;