Is there any 'official' way to get the number of comments, awaiting moderation? I've taken a look at get_comments_status - is it what I need or are there other methods?
You need wp_count_comments().
$comments_count = wp_count_comments();
$comments_count->moderated; // (int) comments in moderation
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
By posting your answer, you agree to the
terms of service.
1 year ago