[wp-trac] [WordPress Trac] #27091: Timeout to WordPress API in update.php
WordPress Trac
noreply at wordpress.org
Tue Feb 11 16:44:55 UTC 2014
#27091: Timeout to WordPress API in update.php
--------------------------+------------------------------
Reporter: dsevillano | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version: 3.8.1
Severity: normal | Resolution:
Keywords: | Focuses: administration
--------------------------+------------------------------
Comment (by SergeyBiryukov):
> In the function request you can see the defaults params for the request
and the '''apply_filters''' but that configuration will be override from
the hardcode I have already talk before.
You can increase the timeout using `http_request_args` filter:
{{{
function increase_timeout_for_api_requests_27091( $r, $url ) {
if ( false !== strpos( $url, '//api.wordpress.org/' ) ) {
$r['timeout'] = 30;
}
return $r;
}
add_filter( 'http_request_args',
'increase_timeout_for_api_requests_27091', 10, 2 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27091#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list