Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong ID for Site Health Dashboard Widget #1845

Closed
cstmth opened this issue Feb 19, 2025 · 4 comments
Closed

Wrong ID for Site Health Dashboard Widget #1845

cstmth opened this issue Feb 19, 2025 · 4 comments
Labels
[Status] Done Issue is completed

Comments

@cstmth
Copy link

cstmth commented Feb 19, 2025

Issue Description

The id for the Site Health Status widget is wrong in the Dashboard widgets API section. Two code blocks use that wrong identifier and need to be fixed.

URL of the Page with the Issue

https://developer.wordpress.org/apis/dashboard-widgets/#removing-default-dashboard-widgets

Section of Page with the issue

https://developer.wordpress.org/apis/dashboard-widgets/#removing-default-dashboard-widgets

Why is this a problem?

The Site Health Status widget allegedly has the id health_check_status but that is not true. In fact, it has the id dashboard_site_health as can be verified here.

In consequence, code boxes 1 and 3 of the provided section use the incorrect id. When the correct id is used, the code works as expected.

Suggested Fix

Replace health_check_status with dashboard_site_health.

@cstmth cstmth added the [Status] To do Issue marked as Todo label Feb 19, 2025
Copy link

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

@cstmth
Copy link
Author

cstmth commented Feb 19, 2025

I also did a var_dump($wp_meta_boxes['dashboard']['normal']['core']['health_check_status']) and it returned NULL, i.e. there is no alternative Dashboard widget with that name that could be meant.

@zzap
Copy link
Member

zzap commented Feb 20, 2025

This is fixed. Thank you @cstmth for reporting it 🍪 ❤

@zzap zzap closed this as completed Feb 20, 2025
@github-actions github-actions bot added [Status] Done Issue is completed and removed [Status] To do Issue marked as Todo labels Feb 20, 2025
@cstmth
Copy link
Author

cstmth commented Feb 24, 2025

Hey @zzap, thank you! While code box 1 was fixed, code box 3 was not fixed and is still broken.

remove_meta_box( 'health_check_status', 'dashboard', 'normal' );

has to be

`remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal' );

Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Done Issue is completed
Projects
None yet
Development

No branches or pull requests

2 participants