[wp-trac] [WordPress Trac] #43084: dashboard confuses published posts count with all posts

WordPress Trac noreply at wordpress.org
Sun Jan 14 18:31:59 UTC 2018


#43084: dashboard confuses published posts count with all posts
-----------------------------+---------------------------------
 Reporter:  awardpress       |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Administration   |     Version:  2.7
 Severity:  normal           |  Resolution:
 Keywords:  has-screenshots  |     Focuses:  ui, administration
-----------------------------+---------------------------------
Changes (by birgire):

 * keywords:   => has-screenshots
 * focuses:  ui => ui, administration
 * version:  4.9.1 => 2.7


Comment:

 @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 [https://core.trac.wordpress.org/browser/tags/4.9.1/src/wp-
 admin/includes/dashboard.php#L248 4.9.1 source] of the relevant function:
 {{{wp_dashboard_right_now()}}}, introduced in [9265].

 The screenshot [attachment: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}}}.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43084#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list