Variable Cleanup, Unused variables, Typo'd variables, unused code blocks. Fixes #12299

git-svn-id: https://develop.svn.wordpress.org/trunk@13242 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-02-20 02:01:46 +00:00
parent 8be48fe96a
commit 468d0d7cff
21 changed files with 19 additions and 44 deletions

View File

@@ -828,7 +828,7 @@ function wp_count_comments( $post_id = 0 ) {
$total = 0;
$approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed');
$known_types = array_keys( $approved );
foreach( (array) $count as $row_num => $row ) {
foreach ( (array) $count as $row ) {
// Don't count post-trashed toward totals
if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] )
$total += $row['num_comments'];