From d04b234f54f94bc92ff18e55e13f27888bd57f94 Mon Sep 17 00:00:00 2001 From: Sainath Poojary Date: Tue, 1 Jul 2025 16:46:34 +0530 Subject: [PATCH] HTTP API: Improve error message to include the blocked URL and enhance grammar --- src/wp-includes/class-wp-http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index 28df5d99e5272..34a6e022204c7 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -299,7 +299,8 @@ public function request( $url, $args = array() ) { } if ( $this->block_request( $url ) ) { - $response = new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.' ) ); + /* translators: %s: URL to which the HTTP request was blocked. */ + $response = new WP_Error( 'http_request_not_executed', sprintf( __( 'User has blocked requests through HTTP to the URL: %s.' ), $url ) ); /** This action is documented in wp-includes/class-wp-http.php */ do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url ); return $response;