| | 21 | |
| | 22 | === Steps to Reproduce / Verify |
| | 23 | 1. Set up a local WordPress core development environment using the |
| | 24 | `wordpress-develop` repository and run WordPress from the `build/` directory. |
| | 25 | 2. Download and apply the patch: |
| | 26 | https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/10647.diff |
| | 27 | using `git apply`. |
| | 28 | 3. Rebuild WordPress assets using `npm run build`. |
| | 29 | 4. Register a custom post type with the `at_a_glance` argument set to `true`, for example: |
| | 30 | |
| | 31 | {{{ |
| | 32 | #!php |
| | 33 | register_post_type( |
| | 34 | 'mycpt', |
| | 35 | array( |
| | 36 | 'label' => 'My CPT', |
| | 37 | 'public' => true, |
| | 38 | 'show_ui' => true, |
| | 39 | 'at_a_glance' => true, |
| | 40 | ) |
| | 41 | ); |
| | 42 | }}} |
| | 43 | |
| | 44 | 5. Create and publish at least one post of the custom post type. |
| | 45 | 6. Navigate to Dashboard → At a Glance. |
| | 46 | 7. Verify that the custom post type appears in the widget with the correct count. |
| | 47 | 8. Update the custom post type registration by setting `at_a_glance` to `false` |
| | 48 | (or removing the argument), refresh the dashboard, and verify that the custom |
| | 49 | post type no longer appears. |