diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index f5d5dae257..fa610c1b29 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -1,109 +1,117 @@ - - - - - - - - - - - -ID == $post->post_author ? 'self' : 'other' ); -?> - post_status ); ?>'> - -$column_display_name) { - - switch($column_name) { - - case 'id': - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
post_modified ) _e('Never'); else the_modified_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?>post_modified ) _e('Unpublished'); else the_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?> - post_status) _e(' - Private'); ?> - " . __('0') . '', "" . __('1') . '', "" . __('%') . '') ?> - ID) ) { echo "" . __('Edit') . ""; } ?>ID) ) { echo "ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . js_escape(sprintf(__("You are about to delete this post '%s'.\n'OK' to delete, 'Cancel' to stop."), get_the_title())) . "' );\">" . __('Delete') . ""; } ?>
+ + + + + + + + + + + +ID == $post->post_author ? 'self' : 'other' ); +?> + post_status ); ?>'> + +$column_display_name) { + + switch($column_name) { + + case 'id': + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
post_modified ) _e('Never'); else the_modified_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?>post_modified ) _e('Unpublished'); else the_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?> + post_status) _e(' - Private'); ?> + ID ); + $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); + if ( $left ) + echo ''; + comments_number("" . __('0') . '', "" . __('1') . '', "" . __('%') . ''); + if ( $left ) + echo ''; + ?> + ID) ) { echo "" . __('Edit') . ""; } ?>ID) ) { echo "ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . js_escape(sprintf(__("You are about to delete this post '%s'.\n'OK' to delete, 'Cancel' to stop."), get_the_title())) . "' );\">" . __('Delete') . ""; } ?>
diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index 7171d31b5a..ae0d1d9631 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -58,4 +58,11 @@ function get_comment_to_edit( $id ) { return $comment; } +function get_pending_comments_num( $post_id ) { + global $wpdb; + $post_id = (int) $post_id; + $pending = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '0'" ); + return $pending; +} + ?> \ No newline at end of file