[wp-trac] [WordPress Trac] #45035: allow register_post_type() arg to control whether a CPT's counts are added to the "At a Glance" Dashboard widget

WordPress Trac noreply at wordpress.org
Tue Jul 30 16:12:23 UTC 2019


#45035: allow register_post_type() arg to control whether a CPT's counts are added
to the "At a Glance" Dashboard widget
-------------------------------------+------------------------------
 Reporter:  pbiron                   |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Posts, Post Types        |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  administration
-------------------------------------+------------------------------
Changes (by gwelser):

 * keywords:  needs-patch => has-patch needs-testing


Comment:

 I've been thinking about the At a Glance functionality a bit after a
 recent project and liked the solution presented here. Here is my attempt
 at a patch (45035_patch.diff).

 * Added `at_a_glance` arg to `register_post_type` defaulting to
 `show_in_menu`.
 * Added `'at_a_glance'  => false` to `attachment` post type registration.
 * Updated `wp_dashboard_right_now` to pull post types by the new
 `at_a_glance` arg.

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


More information about the wp-trac mailing list