diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 302d1d112b..0db19027a0 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -2052,7 +2052,7 @@ class WP_Site_Health { ), 'description' => sprintf( '

%s

', - __( 'The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.' ) + __( 'The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.' ) ), 'actions' => '', 'test' => 'rest_availability', @@ -2090,16 +2090,18 @@ class WP_Site_Health { $result['label'] = __( 'The REST API encountered an error' ); $result['description'] .= sprintf( - '

%s

', + '

%s

%s
%s

', + __( 'When testing the REST API, an error was encountered:' ), sprintf( - '%s
%s', - __( 'The REST API request failed due to an error.' ), - sprintf( - /* translators: 1: The WordPress error message. 2: The WordPress error code. */ - __( 'Error: %1$s (%2$s)' ), - $r->get_error_message(), - $r->get_error_code() - ) + // translators: %s: The REST API URL. + __( 'REST API Endpoint: %s' ), + $url + ), + sprintf( + // translators: 1: The WordPress error code. 2: The WordPress error message. + __( 'REST API Response: (%1$s) %2$s' ), + $r->get_error_code(), + $r->get_error_message() ) ); } elseif ( 200 !== wp_remote_retrieve_response_code( $r ) ) { @@ -2108,12 +2110,18 @@ class WP_Site_Health { $result['label'] = __( 'The REST API encountered an unexpected result' ); $result['description'] .= sprintf( - '

%s

', + '

%s

%s
%s

', + __( 'When testing the REST API, an unexpected result was returned:' ), sprintf( - /* translators: 1: The HTTP error code. 2: The HTTP error message. */ - __( 'The REST API call gave the following unexpected result: (%1$d) %2$s.' ), + // translators: %s: The REST API URL. + __( 'REST API Endpoint: %s' ), + $url + ), + sprintf( + // translators: 1: The WordPress error code. 2: The HTTP status code error message. + __( 'REST API Response: (%1$s) %2$s' ), wp_remote_retrieve_response_code( $r ), - esc_html( wp_remote_retrieve_body( $r ) ) + wp_remote_retrieve_response_message( $r ) ) ); } else { diff --git a/wp-includes/version.php b/wp-includes/version.php index e66883dd6c..e4199e3d57 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54204'; +$wp_version = '6.1-alpha-54205'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.