#22: http_request_timeout

The http_request_timeout filter allows you to set the http request timeout duration in seconds.

It is evaluated in WP_http::request() method, which has a helper function, wp_remote_request() in the wp-includes/http.php file.

http_request_timeout accepts a single argument in the form of an integer that specifies the timeout duration in seconds.


The following example extends the timeout duration from 5 seconds to 30 seconds.

View the code example on Gist.