wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php:188Validates if the current user can request this REST endpoint.
$checkstringboolOne hook fires while WP_REST_Site_Health_Controller::validate_request_permission() runs, in this order:
Filters the capability needed to run a given Site Health check.
protected function validate_request_permission( $check ) { $default_capability = 'view_site_health_checks'; /** * Filters the capability needed to run a given Site Health check. * * @since 5.6.0 * * @param string $default_capability The default capability required for this check. * @param string $check The Site Health check being performed. */ $capability = apply_filters( "site_health_test_rest_capability_{$check}", $default_capability, $check ); return current_user_can( $capability ); }Introduced in 5.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.