Changeset 5821
- Timestamp:
- 07/29/2007 07:56:55 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-post-rows.php
r5811 r5821 58 58 ?> 59 59 <td style="text-align: center"> 60 <?php comments_number("<a href='edit.php?p=$id&c=1'>" . __('0') . '</a>', "<a href='edit.php?p=$id&c=1'>" . __('1') . '</a>', "<a href='edit.php?p=$id&c=1'>" . __('%') . '</a>') ?> 61 </td> 60 <?php 61 $left = get_pending_comments_num( $post->ID ); 62 $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); 63 if ( $left ) 64 echo '<strong>'; 65 comments_number("<a href='edit.php?p=$id&c=1' title='$pending_phrase'>" . __('0') . '</a>', "<a href='edit.php?p=$id&c=1' title='$pending_phrase'>" . __('1') . '</a>', "<a href='edit.php?p=$id&c=1' title='$pending_phrase'>" . __('%') . '</a>'); 66 if ( $left ) 67 echo '</strong>'; 68 ?> 69 </td> 62 70 <?php 63 71 break; -
trunk/wp-admin/includes/comment.php
r5757 r5821 59 59 } 60 60 61 function get_pending_comments_num( $post_id ) { 62 global $wpdb; 63 $post_id = (int) $post_id; 64 $pending = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '0'" ); 65 return $pending; 66 } 67 61 68 ?>
Note: See TracChangeset
for help on using the changeset viewer.