From 7dcfefa424e846f7ce09b26bd2a4a254df4e2138 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 7 Apr 2014 19:36:01 +0000 Subject: [PATCH] Avoid stomping of bulk postdata inside the bulk_edit_posts() loop. Merges [27990] to the 3.7 branch. props kovshenin. see [27964], see #27452. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@27992 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 2fad9a5426..fea812e0cc 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -460,13 +460,13 @@ function bulk_edit_posts( $post_data = null ) { $post_data['ID'] = $post_ID; $post_data['post_ID'] = $post_ID; - $post_data = _wp_translate_postdata( true, $post_data ); - if ( is_wp_error( $post_data ) ) { + $translated_post_data = _wp_translate_postdata( true, $post_data ); + if ( is_wp_error( $translated_post_data ) ) { $skipped[] = $post_ID; continue; } - $updated[] = wp_update_post( $post_data ); + $updated[] = wp_update_post( $translated_post_data ); if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) { if ( 'sticky' == $post_data['sticky'] )