Ticket #27792: 27792.3.diff
File 27792.3.diff, 1.2 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/post.php
433 433 } 434 434 435 435 $updated = $skipped = $locked = array(); 436 $shared_post_data = $post_data; 437 436 438 foreach ( $post_IDs as $post_ID ) { 439 // Start with fresh post data with each iteration. 440 $post_data = $shared_post_data; 441 437 442 $post_type_object = get_post_type_object( get_post_type( $post_ID ) ); 438 443 439 444 if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( 'edit_post', $post_ID ) ) { … … 482 487 $post_data['ID'] = $post_ID; 483 488 $post_data['post_ID'] = $post_ID; 484 489 485 $ translated_post_data = _wp_translate_postdata( true, $post_data );486 if ( is_wp_error( $ translated_post_data ) ) {490 $post_data = _wp_translate_postdata( true, $post_data ); 491 if ( is_wp_error( $post_data ) ) { 487 492 $skipped[] = $post_ID; 488 493 continue; 489 494 } 490 495 491 $updated[] = wp_update_post( $ translated_post_data );496 $updated[] = wp_update_post( $post_data ); 492 497 493 498 if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) { 494 499 if ( 'sticky' == $post_data['sticky'] )