[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
Fri Dec 26 11:42:40 UTC 2025
#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: 7.0
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: tested | Focuses: administration
-------------------------------+-----------------------------
Changes (by manishchopra):
* keywords: has-patch has-unit-tests needs-testing => tested
Comment:
== Test Report
=== Description
This report validates whether the indicated patch works as expected by
allowing
developers to explicitly control whether a custom post type appears in the
“At a Glance” dashboard widget using the `at_a_glance` argument.
Patch tested:
https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-
develop/pull/10647.diff
=== Environment
- WordPress: 7.0-alpha-20251226.164314
- PHP: 8.5.0
- Server: PHP/8.5.0 (Development Server)
- Database: mysqli (Server: 9.1.0 / Client: mysqlnd 8.5.0)
- Browser: Chrome 143.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.1
=== Actual Results
1. ✅ With the patch applied, a custom post type registered with
`at_a_glance => true` appears correctly in the “At a Glance” dashboard
widget
after publishing at least one post of that type.
2. ✅ Setting `at_a_glance => false` (or omitting the argument) prevents
the
custom post type from appearing in the widget.
3. ⚠️ Admin button icons (Dashicons) were not visible in the local
environment,
likely due to a Node.js / npm version mismatch during the build
process.
This did not affect the functionality or validation of the patch
itself.
=== Additional Notes
- This functionality is introduced via a patch and is not available in
core by
default. To test the change locally, the patch must be applied manually.
- Steps to apply the patch in a local WordPress core development
environment:
1. Download the patch:
https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-
develop/pull/10647.diff
2. Place the file in the root of the `wordpress-develop` repository.
3. Apply the patch using:
`git apply 10647.diff`
4. Rebuild WordPress assets (recommended):
`npm run build`
5. Run WordPress from the `build/` directory and verify the behavior via
Dashboard → At a Glance.
=== Supplemental Artifacts
[[Image(at_a_glance_testing.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45035#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list