Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_unspam_comment [ WordPress Function ]

wp_unspam_comment ( $comment_id )
Parameters:
Uses:
Returns:
  • (mixed) False on failure
Defined at:



Removes a comment from the Spam

Source


<?php
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;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics