Ticket #6471: index.php.diff
| File index.php.diff, 1.8 kB (added by josephscott, 8 months ago) |
|---|
-
index.php
old new 64 64 65 65 $num_tags = wp_count_terms('post_tag'); 66 66 67 $num_comm = get_comment_count( ); 68 67 69 $post_type_texts = array(); 68 70 69 71 if ( !empty($num_posts->publish) ) { // with feeds, anyone can tell how many posts there are. Just unlink if !current_user_can … … 93 95 $tags_text = "<a href='edit-tags.php'>$tags_text</a>"; 94 96 } 95 97 98 $total_comments = sprintf( __( '%1$s total' ), $num_comm['total_comments'] ); 99 $approved_comments = sprintf( __( '%1$s approved' ), $num_comm['approved'] ); 100 $spam_comments = sprintf( __( '%1$s spam' ), $num_comm['spam'] ); 101 $moderated_comments = sprintf( __( '%1$s awaiting moderation' ), $num_comm['awaiting_moderation'] ); 102 103 if( current_user_can( 'moderate_comments' ) ) { 104 $total_comments = "<a href='edit-comments.php'>{$total_comments}</a>"; 105 $approved_comments = "<a href='edit-comments.php?comment_status=approved'>{$approved_comments}</a>"; 106 $moderated_comments = "<a href='edit-comments.php?comment_status=moderated'>{$moderated_comments}</a>"; 107 } 108 109 $comm_text = sprintf( __( 'Current comment break down: %1$s, %2$s, %3$s and %4$s.' ), $total_comments, $approved_comments, $spam_comments, $moderated_comments ); 110 96 111 $post_type_text = implode(', ', $post_type_texts); 97 112 98 113 // There is always a category 99 $sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s ' ), $post_type_text, $cats_text, $tags_text, $pending_text );114 $sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s %5$s' ), $post_type_text, $cats_text, $tags_text, $pending_text, $comm_text ); 100 115 $sentence = apply_filters( 'dashboard_count_sentence', $sentence, $post_type_text, $cats_text, $tags_text, $pending_text ); 101 116 102 117 ?>
