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
This commit is contained in:
parent
48b52b3aa9
commit
2bacf5606e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user