Changeset 34158 for trunk/src/wp-includes/post-functions.php
- Timestamp:
- 09/15/2015 12:57:48 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-functions.php
r34102 r34158 1395 1395 $labels = array_merge( $defaults, $object->labels ); 1396 1396 $object->labels = (object) $object->labels; 1397 1397 1398 1398 return (object) $labels; 1399 1399 } … … 2371 2371 $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) ); 2372 2372 2373 wp_defer_comment_counting( true ); 2374 2373 2375 $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $postid )); 2374 foreach ( $comment_ids as $comment_id ) 2376 foreach ( $comment_ids as $comment_id ) { 2375 2377 wp_delete_comment( $comment_id, true ); 2378 } 2379 2380 wp_defer_comment_counting( false ); 2376 2381 2377 2382 $post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $postid )); … … 4638 4643 delete_metadata( 'post', null, '_thumbnail_id', $post_id, true ); 4639 4644 4645 wp_defer_comment_counting( true ); 4646 4640 4647 $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id )); 4641 foreach ( $comment_ids as $comment_id ) 4648 foreach ( $comment_ids as $comment_id ) { 4642 4649 wp_delete_comment( $comment_id, true ); 4650 } 4651 4652 wp_defer_comment_counting( false ); 4643 4653 4644 4654 $post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $post_id ));
Note: See TracChangeset
for help on using the changeset viewer.