Changeset 1185 for trunk/wp-includes/template-functions-comment.php
- Timestamp:
- 04/26/2004 11:54:52 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-comment.php
r1132 r1185 31 31 32 32 function comments_number($zero='No Comments', $one='1 Comment', $more='% Comments', $number='') { 33 global $id, $comment, $tablecomments, $wpdb; 34 if ('' == $number) $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1'"); 33 global $id, $comment, $tablecomments, $wpdb, $comment_count_cache; 34 if ('' == $comment_count_cache["$id"]) $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1'"); 35 else $number = $comment_count_cache["$id"]; 35 36 if ($number == 0) { 36 37 $blah = $zero;
Note: See TracChangeset
for help on using the changeset viewer.