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
This commit is contained in:
Jb Audras 2023-02-02 09:12:12 +00:00
parent dfca88265e
commit d955c72056

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