Changeset 12412
- Timestamp:
- 12/16/2009 01:35:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12405 r12412 3519 3519 3520 3520 foreach ( (array) $posts_to_delete as $post ) { 3521 wp_delete_post($post['post_id']); 3521 $post_id = (int) $post['post_id']; 3522 if ( !$post_id ) 3523 continue; 3524 3525 $del_post = get_post($post_id); 3526 3527 if ( !$del_post || 'trash' != $del_post->post_status ) { 3528 delete_post_meta($post_id, '_wp_trash_meta_status'); 3529 delete_post_meta($post_id, '_wp_trash_meta_time'); 3530 } else { 3531 wp_delete_post($post_id); 3532 } 3522 3533 } 3523 3534 … … 3525 3536 3526 3537 foreach ( (array) $comments_to_delete as $comment ) { 3527 wp_delete_comment($comment['comment_id']); 3538 $comment_id = (int) $comment['comment_id']; 3539 if ( !$comment_id ) 3540 continue; 3541 3542 $del_comment = get_comment($comment_id); 3543 3544 if ( !$del_comment || 'trash' != $del_comment->comment_approved ) { 3545 delete_comment_meta($comment_id, '_wp_trash_meta_time'); 3546 delete_comment_meta($comment_id, '_wp_trash_meta_status'); 3547 } else { 3548 wp_delete_comment($comment_id); 3549 } 3528 3550 } 3529 3551 }
Note: See TracChangeset
for help on using the changeset viewer.