Changeset 12148 for trunk/wp-includes/comment.php
- Timestamp:
- 11/05/2009 09:03:09 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r12122 r12148 774 774 775 775 $total = 0; 776 $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash' );776 $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed'); 777 777 $known_types = array_keys( $approved ); 778 778 foreach( (array) $count as $row_num => $row ) { 779 $total += $row['num_comments']; 779 // Don't count post-trashed toward totals 780 if ( 'post-trashed' != $row['comment_approved'] ) 781 $total += $row['num_comments']; 780 782 if ( in_array( $row['comment_approved'], $known_types ) ) 781 783 $stats[$approved[$row['comment_approved']]] = $row['num_comments']; … … 1179 1181 switch ( $comment_status ) { 1180 1182 case 'hold': 1183 case '0': 1184 case 0: 1181 1185 $status = '0'; 1182 1186 break; 1183 1187 case 'approve': 1188 case '1': 1189 case 1: 1184 1190 $status = '1'; 1185 1191 if ( get_option('comments_notify') ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)