mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Delete the trash metadata when untrashing a comment. See #4529 props caesarsgrunt.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
966af43a1d
commit
606b6197b5
@ -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
|
//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);
|
$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);
|
wp_update_comment($comment);
|
||||||
|
|
||||||
do_action('untrashed_comment', $comment_id);
|
do_action('untrashed_comment', $comment_id);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user