mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
Add rest route for alt api check
This commit is contained in:
parent
52a5dab046
commit
bbbaa2ba56
|
|
@ -1397,7 +1397,7 @@ class WP_Site_Health {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests if the site can communicate with WordPress.org.
|
||||
* Tests if the site can communicate with a non-default update API endpoint.
|
||||
*
|
||||
* @since 6.8.0
|
||||
*
|
||||
|
|
|
|||
|
|
@ -124,6 +124,25 @@ class WP_REST_Site_Health_Controller extends WP_REST_Controller {
|
|||
)
|
||||
);
|
||||
|
||||
register_rest_route(
|
||||
$this->namespace,
|
||||
sprintf(
|
||||
'/%s/%s',
|
||||
$this->rest_base,
|
||||
'alt-update-api-communication'
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'methods' => 'GET',
|
||||
'callback' => array( $this, 'test_alt_update_api_communication' ),
|
||||
'permission_callback' => function() {
|
||||
return $this->validate_request_permission( 'dotorg_communication' );
|
||||
},
|
||||
),
|
||||
'schema' => array( $this, 'get_public_item_schema' ),
|
||||
)
|
||||
);
|
||||
|
||||
register_rest_route(
|
||||
$this->namespace,
|
||||
sprintf(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user