akismet_spam_totals

Definition:
function akismet_spam_totals() {}

Source code

function akismet_spam_totals() {

	global $wpdb;

	$totals = $wpdb->get_results( "SELECT comment_type, COUNT(*) AS cc FROM $wpdb->comments WHERE comment_approved = 'spam' GROUP BY comment_type" );

	$return = array();

	foreach ( $totals as $total )

		$return[$total->comment_type ? $total->comment_type : 'comment'] = $total->cc;

	return $return;

}

493

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: