get_user_comments_approved example


function akismet_get_user_roles( $user_id ) {
    return Akismet::get_user_roles( $user_id );
}
function akismet_result_spam( $approved ) {
    return Akismet::comment_is_spam( $approved );
}
function akismet_result_hold( $approved ) {
    return Akismet::comment_needs_moderation( $approved );
}
function akismet_get_user_comments_approved( $user_id$comment_author_email$comment_author$comment_author_url ) {
    return Akismet::get_user_comments_approved( $user_id$comment_author_email$comment_author$comment_author_url );
}
function akismet_update_comment_history( $comment_id$message$event = null ) {
    return Akismet::update_comment_history( $comment_id$message$event );
}
function akismet_get_comment_history( $comment_id ) {
    return Akismet::get_comment_history( $comment_id );
}
function akismet_cmp_time( $a$b ) {
    return Akismet::_cmp_time( $a$b );
}
function akismet_auto_check_update_meta( $id$comment ) {
    
$show_user_comments_option = get_option( 'akismet_show_user_comments_approved' );
        
        if ( $show_user_comments_option === false ) {
            // Default to active if the user hasn't made a decision.             $show_user_comments_option = '1';
        }
        
        $show_user_comments = apply_filters( 'akismet_show_user_comments_approved', $show_user_comments_option );
        $show_user_comments = $show_user_comments === 'false' ? false : $show_user_comments; //option used to be saved as 'false' / 'true'         
        if ( $show_user_comments ) {
            $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url );
            $comment_count = intval( $comment_count );
            echo '<span class="akismet-user-comment-count" commentid="'.$comment->comment_ID.'" style="display:none;"><br><span class="akismet-user-comment-counts">'. sprintf( esc_html( _n( '%s approved', '%s approved', $comment_count , 'akismet') )number_format_i18n( $comment_count ) ) . '</span></span>';
        }

        return $a;
    }

    public static function comment_status_meta_box( $comment ) {
        $history = Akismet::get_comment_history( $comment->comment_ID );

        if ( $history ) {
            
Home | Imprint | This part of the site doesn't use cookies.