[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
Wed Oct 3 15:46:00 UTC 2018
#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: dev-feedback | Focuses: administration
-------------------------------+------------------------------
Comment (by swissspidy):
> Another "nice to have" would be to allow the param to take a string
value that would be interpreted as a post_status to show the count for,
e.g., show counts for custom post_status = mycustompoststatus instead of
publish.
What about two arguments:
* `at_a_glance`
* `at_a_glance_count_cb` (like `update_count_callback` or
`register_meta_box_cb`)
This way one can provide a custom callback that returns a count. Otherwise
it would fall back to `wp_count_posts`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45035#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list