From d955c72056dd98e0f0a176c06a8b147ccd8ccaee Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 2 Feb 2023 09:12:12 +0000 Subject: [PATCH] Themes: Increase HTTP timeout for Theme API requests. This changeset modifies the HTTP request in `themes_api()` to use the same HTTP request timeout as in `plugins_api()`, which is 15 seconds, instead of a default value of 5 seconds. Props ahortin, peterwilsoncc, dd32, costdev. Fixes #57315. git-svn-id: https://develop.svn.wordpress.org/trunk@55188 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index 043fe6ac31..03c12c8fe6 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -555,6 +555,7 @@ function themes_api( $action, $args = array() ) { } $http_args = array( + 'timeout' => 15, 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), ); $request = wp_remote_get( $url, $http_args );