Skip to content

Commit ab92e55

Browse files
committed
dashboard confuses published posts count with all posts
1 parent 2740a8e commit ab92e55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-admin/includes/dashboard.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,17 @@ function wp_dashboard_right_now() {
309309
if ( $num_posts && $num_posts->publish ) {
310310
if ( 'post' === $post_type ) {
311311
/* translators: %s: Number of posts. */
312-
$text = _n( '%s Post', '%s Posts', $num_posts->publish );
312+
$text = _n( '%s Published post', '%s Published posts', $num_posts->publish );
313313
} else {
314314
/* translators: %s: Number of pages. */
315-
$text = _n( '%s Page', '%s Pages', $num_posts->publish );
315+
$text = _n( '%s Published page', '%s Published pages', $num_posts->publish );
316316
}
317317

318318
$text = sprintf( $text, number_format_i18n( $num_posts->publish ) );
319319
$post_type_object = get_post_type_object( $post_type );
320320

321321
if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) {
322-
printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text );
322+
printf( '<li class="%1$s-count"><a href="edit.php?post_status=publish&post_type=%1$s">%2$s</a></li>', $post_type, $text );
323323
} else {
324324
printf( '<li class="%1$s-count"><span>%2$s</span></li>', $post_type, $text );
325325
}

0 commit comments

Comments
 (0)