Don't count drafts/etc against post count - http://mosquito.wordpress.org/view.php?id=1010
git-svn-id: http://svn.automattic.com/wordpress/trunk@2403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
735666f3c0
commit
ca90d6e32c
|
@ -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…
Reference in New Issue