[wp-trac] [WordPress Trac] #48105: Move Site Health async checks to a REST API endpoint

WordPress Trac noreply at wordpress.org
Thu Jun 25 21:47:34 UTC 2020


#48105: Move Site Health async checks to a REST API endpoint
-------------------------+-----------------------
 Reporter:  Clorith      |       Owner:  Clorith
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  5.5
Component:  Site Health  |     Version:  5.2
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  rest-api
-------------------------+-----------------------
Changes (by Clorith):

 * keywords:  has-patch needs-refresh => has-patch


Comment:

 [attachment:"48105.3.patch"] is what I hope is the final iteration here.

 It removes the now redundant REST API test, as the asynchronous tests use
 the REST endpoint and will display a warning if they fail (see comment:2
 and [attachment:"test-unavailable.PNG"]), this makes the original test no
 longer useful in this scenario (although I know there's a ticket to
 introduce JavaScript-only tests to account for edge cases here, but that's
 out of scope for the upcoming release).

 A new field is introduces to the `site_status_tests` filter, named
 `$has_rest`, if this is a truthy value, then the `$test` check is fired
 off as a REST call instead of passing it as an action to `admin-ajax`.

 The space-calculation from the Info screen has also been moved to use
 this, to remove _all_ Site Health dependencies on `admin-ajax` for
 consistency.

 A new filter also comes along with this named
 `site_health_test_rest_capability_{$check}`, this will allow developers to
 change what capability is needed to access the various tests, using the
 existing `view_site_health_checks` as a default.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48105#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list