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.

Built from https://develop.svn.wordpress.org/trunk@55188


git-svn-id: http://core.svn.wordpress.org/trunk@54721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-02-02 09:14:17 +00:00
parent 01236f5948
commit 7e3b08c8af
2 changed files with 2 additions and 1 deletions

View File

@ -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 );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55187';
$wp_version = '6.2-alpha-55188';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.