From 7e3b08c8aff8e3b7971e5b8f5ab78a630869ca2a Mon Sep 17 00:00:00 2001 From: audrasjb Date: Thu, 2 Feb 2023 09:14:17 +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. Built from https://develop.svn.wordpress.org/trunk@55188 git-svn-id: http://core.svn.wordpress.org/trunk@54721 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 043fe6ac31..03c12c8fe6 100644 --- a/wp-admin/includes/theme.php +++ b/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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 443bc97212..31ba8e04cb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.