Changeset 6994
- Timestamp:
- 02/23/2008 08:33:44 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
wp-admin/edit-comments.php (modified) (3 diffs)
-
wp-includes/comment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r6993 r6994 51 51 $comment_status = ''; 52 52 $status_links = array(); 53 $num_ posts = wp_count_posts('post');54 $stati = array('moderated' => __('Awaiting Moderation'), 'approved' => __('Approved'));53 $num_comments = wp_count_comments(); 54 $stati = array('moderated' => sprintf(__('Awaiting Moderation (%s)'), $num_comments->moderated), 'approved' => __('Approved')); 55 55 foreach ( $stati as $status => $label ) { 56 56 $class = ''; … … 75 75 <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 76 76 77 <p><a href="?mode=view"><?php _e(' View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p>77 <p><a href="?mode=view"><?php _e('Detail View') ?></a> | <a href="?mode=edit"><?php _e('List View') ?></a></p> 78 78 79 79 <?php … … 148 148 <td style="text-align: center; vertical-align: text-top"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> 149 149 <td style="vertical-align: text-top"> 150 < ?php comment_author_link(); ?><br />150 <p><strong class="comment-author"><?php comment_author(); ?></strong><br /> 151 151 <?php if ( !empty($author_url) ) : ?> 152 152 <a href="<?php echo $author_url ?>"><?php echo $author_url; ?></a> | -
trunk/wp-includes/comment.php
r6853 r6994 445 445 } 446 446 return false; 447 } 448 449 function wp_count_comments() { 450 global $wpdb; 451 452 $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} GROUP BY comment_approved", ARRAY_A ); 453 454 $stats = array( ); 455 $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam'); 456 foreach( (array) $count as $row_num => $row ) { 457 $stats[$approved[$row['comment_approved']]] = $row['num_comments']; 458 } 459 460 foreach ( $approved as $key ) { 461 if ( empty($stats[$key]) ) 462 $stats[$key] = 0; 463 } 464 465 return (object) $stats; 447 466 } 448 467
Note: See TracChangeset
for help on using the changeset viewer.