[wp-trac] [WordPress Trac] #57005: Allow "Persistent Object Cache" and other Site Health options to be dismissable with a checkbox (was: This "recommendation" badly needs a "dismiss" checkbox)
WordPress Trac
noreply at wordpress.org
Sat Nov 5 04:53:28 UTC 2022
#57005: Allow "Persistent Object Cache" and other Site Health options to be
dismissable with a checkbox
-----------------------------+------------------------------
Reporter: carlh04426 | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 6.1
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
-----------------------------+------------------------------
Changes (by brookedot):
* keywords: => 2nd-opinion
Comment:
Hi there, welcome to trac!
I'm not sure that Health Check was designed in such a way to add a
checkbox, instead items can be added/removed/or manipulated with filters.
For example, by filtering `site_status_tests` you can remove the
`page_cache` test:
https://developer.wordpress.org/reference/hooks/site_status_tests/
{{{
function wp_health_cache_57005_remove_test( $tests ) {
unset( $tests['async']['page_cache'] );
unset( $tests['direct']['persistent_object_cache'] );
return $tests;
}
add_filter( 'site_status_tests', 'wp_health_cache_57005_remove_test' );
}}}
You'll find a full lists of tests here:
https://github.com/WordPress/WordPress/blob/3596d1a534182173e0a723b8872290057918b825
/wp-admin/includes/class-wp-site-health.php#L2512-L2645
I think we should mark this as a "won't fix" but gonna CC:// @Clorith for
a second option as they are closer to the Site Health feature than I am.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57005#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list