| @@ -34,32 +34,5 @@ | ||
| 34 | 34 | ' . $post_status_where . ' |
| 35 | 35 | AND post_type = "' . $post_type . '"' |
| 36 | 36 | ); |
| 37 | 37 | return $count; |
| 38 | -} | |
| 39 | - | |
| 40 | -/** | |
| 41 | - * Gets the comment count. | |
| 42 | - * | |
| 43 | - * @since 1.0.0 | |
| 44 | - * @package userswp | |
| 45 | - * @param int $user_id User ID. | |
| 46 | - * @return int Comment count. | |
| 47 | - */ | |
| 48 | -function uwp_comment_count($user_id) { | |
| 49 | - global $wpdb; | |
| 50 | - | |
| 51 | - $count = $wpdb->get_var( | |
| 52 | - "SELECT COUNT(comment_ID) | |
| 53 | - FROM ".$wpdb->comments." | |
| 54 | - WHERE comment_post_ID in ( | |
| 55 | - SELECT ID | |
| 56 | - FROM ".$wpdb->posts." | |
| 57 | - WHERE post_type = 'post' | |
| 58 | - AND post_status = 'publish') | |
| 59 | - AND user_id = " . $user_id . " | |
| 60 | - AND comment_approved = '1' | |
| 61 | - AND comment_type NOT IN ('pingback', 'trackback' )" | |
| 62 | - ); | |
| 63 | - | |
| 64 | - return $count; | |
| 65 | 38 | } |