diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
index cfc88314a5..4596f655d3 100644
a
|
b
|
class WP_Site_Health { |
2074 | 2074 | $headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) ); |
2075 | 2075 | } |
2076 | 2076 | |
2077 | | $url = rest_url( 'wp/v2/types/post' ); |
| 2077 | // By default, the route for this is the 'post' post type. |
| 2078 | $path = 'wp/v2/types/post'; |
| 2079 | |
| 2080 | $url = rest_url( $path ); |
2078 | 2081 | |
2079 | 2082 | // The context for this is editing with the new block editor. |
2080 | 2083 | $url = add_query_arg( |
… |
… |
class WP_Site_Health { |
2084 | 2087 | $url |
2085 | 2088 | ); |
2086 | 2089 | |
| 2090 | /** |
| 2091 | * Filters the REST API URL for the REST API availability health check. |
| 2092 | * |
| 2093 | * @param string $url REST URL. |
| 2094 | * @param string $path REST route. |
| 2095 | */ |
| 2096 | $url = apply_filters( 'site_status_test_rest_availability_url', $url, $path ); |
| 2097 | |
2087 | 2098 | $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); |
2088 | 2099 | |
2089 | 2100 | if ( is_wp_error( $r ) ) { |