Make WordPress Core


Ignore:
Timestamp:
10/15/2020 01:58:28 AM (4 years ago)
Author:
TimothyBlynJacobs
Message:

Site Health, REST API: Move async tests to REST API endpoints.

This provides more flexibility when writing tests and benefits from running in a front-end context which is necessary for some tests like checking that updates are supported. Additionally, this provides a more robust interface for developers who want to integrate with Site Health tests.

Because the wp/v2 endpoint is reserved for modeling core entities, site health is registered in its own wp-site-health/v1 namespace.

The existing ajax actions have been maintained for backward compatibility.

Props Clorith, chrisvanpatten, afragen, pokhriyal, TimothyBlynJacobs.
Fixes #48105.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-ajax.php

    r47835 r49154  
    144144
    145145// Deprecated.
    146 $core_actions_post_deprecated = array( 'wp-fullscreen-save-post', 'press-this-save-post', 'press-this-add-category' );
     146$core_actions_post_deprecated = array(
     147    'wp-fullscreen-save-post',
     148    'press-this-save-post',
     149    'press-this-add-category',
     150    'health-check-dotorg-communication',
     151    'health-check-is-in-debug-mode',
     152    'health-check-background-updates',
     153    'health-check-loopback-requests',
     154);
    147155$core_actions_post            = array_merge( $core_actions_post, $core_actions_post_deprecated );
    148156
Note: See TracChangeset for help on using the changeset viewer.