Definition:
function wp_get_comment_status($comment_id) {}
The status of a comment by ID.
Parameters
- int $comment_id: Comment ID
Return values
returns:Status might be ‘trash’, ‘approved’, ‘unapproved’, ‘spam’. False on failure.
Source code
function wp_get_comment_status($comment_id) { $comment = get_comment($comment_id); if ( !$comment ) return false; $approved = $comment->comment_approved; if ( $approved == NULL ) return false; elseif ( $approved == '1' ) return 'approved'; elseif ( $approved == '0' ) return 'unapproved'; elseif ( $approved == 'spam' ) return 'spam'; elseif ( $approved == 'trash' ) return 'trash'; else return false; }
3695
No comments yet... Be the first to leave a reply!