From 2bacf5606e0bd4955d9974300f240849b50395ad Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Wed, 2 Mar 2005 17:59:19 +0000 Subject: [PATCH] Don't count drafts/etc against post count - http://mosquito.wordpress.org/view.php?id=1010 git-svn-id: https://develop.svn.wordpress.org/trunk@2403 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a6faec1f02..8eaa2c62ac 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -209,7 +209,7 @@ function get_userdatabylogin($user_login) { function get_usernumposts($userid) { global $wpdb; - return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid'"); + return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_status = 'publish'"); } // examine a url (supposedly from this blog) and try to