Delete the trash metadata when untrashing a comment. See #4529 props caesarsgrunt.

git-svn-id: https://develop.svn.wordpress.org/trunk@11992 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-10-01 19:59:35 +00:00
parent 30e0d4173f
commit ef14722014
1 changed files with 4 additions and 1 deletions

View File

@ -890,8 +890,11 @@ function wp_untrash_comment($comment_id = 0) {
//Either set comment_approved to the value in comment_meta or worse case to false which will mean moderation
$comment['comment_approved'] = get_comment_meta($comment_id, '_wp_trash_meta_status', true);
delete_comment_meta($comment_id, '_wp_trash_meta_time');
delete_comment_meta($comment_id, '_wp_trash_meta_status');
wp_update_comment($comment);
do_action('untrashed_comment', $comment_id);
return true;