Ticket #26066: 26066.patch
File 26066.patch, 1.5 KB (added by , 12 years ago) |
---|
-
src/wp-admin/includes/dashboard.php
179 179 <ul> 180 180 <?php 181 181 do_action( 'rightnow_list_start' ); 182 // Using show_in_nav_menus as my arg for grabbing what post types should show, is there better? 183 $post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' ); 184 $post_types = (array) apply_filters( 'rightnow_post_types', $post_types ); 185 foreach ( $post_types as $post_type => $post_type_obj ){ 182 // Posts and Pages 183 foreach ( array( 'post', 'page' ) as $post_type ) { 186 184 $num_posts = wp_count_posts( $post_type ); 187 185 if ( $num_posts && $num_posts->publish ) { 186 if ( 'post' == $post_type ) 187 $text = _n( 'Post', 'Posts', $num_posts->publish ); 188 else 189 $text = _n( 'Page', 'Pages', $num_posts->publish ); 188 190 printf( 189 191 '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s %3$s</a></li>', 190 192 $post_type, 191 193 number_format_i18n( $num_posts->publish ), 192 $ post_type_obj->label194 $text 193 195 ); 194 196 } 195 197 } … … 203 205 $text 204 206 ); 205 207 if ( $num_comm->moderated ) { 206 $text = _n( 'in moderation', 'in moderation', $num_comm-> total_comments);208 $text = _n( 'in moderation', 'in moderation', $num_comm->moderated ); 207 209 printf( 208 210 '<li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated">%1$s %2$s</a></li>', 209 211 number_format_i18n( $num_comm->moderated ),