Definition:
function wp_unspam_comment($comment_id) {}
Removes a comment from the Spam
Parameters
- int $comment_id: Comment ID.
Return values
returns:False on failure
Defined actions
- unspam_comment
do_action('unspam_comment', $comment_id); - unspammed_comment
do_action('unspammed_comment', $comment_id);
Source code
function wp_unspam_comment($comment_id) {
if ( ! (int)$comment_id )
return false;
do_action('unspam_comment', $comment_id);
$status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true);
if ( empty($status) )
$status = '0';
if ( wp_set_comment_status($comment_id, $status) ) {
delete_comment_meta($comment_id, '_wp_trash_meta_status');
do_action('unspammed_comment', $comment_id);
return true;
}
return false;
}
4203

February 12, 2011 


No comments yet... Be the first to leave a reply!