Make WordPress Core

Opened 5 months ago

Last modified 5 months ago

#43084 new defect (bug)

dashboard confuses published posts count with all posts

Reported by: awardpress Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.7
Component: Administration Keywords: has-screenshots
Focuses: ui, administration Cc:


the following is a good first bug for new contributors, IMO! because it's very easy to fix https://core.trac.wordpress.org/tickets/good-first-bugs

in dashboard, in "at a glance" section there's a misleading link:

  1. its hyper reference uri leads to list of all existing posts

/wp-admin/edit.php?post_type=post there are currently 26 posts in my blog

  1. its label is "8 posts" where 8 -- is the number of currently published posts

/wp-admin/edit.php?post_status=publish&post_type=post there are currently 8 published posts in my blog

  1. its icon is the pushpin. and the pushpin usually means sticky posts

/wp-admin/edit.php?post_type=post&show_sticky=1 there are currently 1 sticky post in my blog

thus, as you can see, this link confuses "all posts (26)" with "published posts (8)" AND with "sticky posts (1)" I know, Wordpress uses pushpin icon to indicate any post, so, maybe, I'm wrong about sticky posts. But I'm definitely not mistaken in that you cannot label the link as "8 posts" and make it refer to the list of 26 posts -- it should be fixed. Either label should be "26 posts" or it should go to list of published posts. IMO, the latter choice (lead to published posts).

Attachments (3)

Selection_002.png (3.6 KB) - added by awardpress 5 months ago.
Selection_005.png (4.2 KB) - added by awardpress 5 months ago.
at-a-glance-in-dashboard.JPG (13.2 KB) - added by birgire 5 months ago.

Download all attachments as: .zip

Change History (5)

#1 @awardpress
5 months ago

I'd like to add a little words about pushpin. I said that pushpin usually indicates sticky posts. I'd like to correct myself: pushpin usually indicates pinned posts, therefore pushpin. but in Wordpress, 'pinned' posts are called 'sticky'.

#2 @birgire
5 months ago

  • Focuses administration added
  • Keywords has-screenshots added
  • Version changed from 4.9.1 to 2.7

@awardpress Welcome to WordPress core trac.

This seems like a valid concern, but let's see what others have to say about this.

Here's the 4.9.1 source of the relevant function: wp_dashboard_right_now(), introduced in [9265].

The screenshot at-a-glance-in-dashboard.JPG above shows that it contains info on pages and comments as well.

It also displays the number of published pages with:

$text = _n( '%s Page', '%s Pages', $num_posts->publish );

and links to edit.php?post_type=page but not edit.php?post_status=publish&post_type=page.

Similarly the number of approved comments is displayed with:

$text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );

and it links to edit-comments.php but not to edit-comments.php?comment_status=approved.

On the other hand the number of moderated comments links to edit-comments.php?comment_status=moderated.

Note: See TracTickets for help on using tickets.