Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

All unapproved comments

Return the unapproved comments in the site.

// WP_Comment_Query arguments
$args = array (
	'status'         => 'hold',
	'type'           => 'comment',
);

// The Comment Query
$comment_query = new WP_Comment_Query;
$comments = $comment_query->query( $args );