Changeset 16763
- Timestamp:
- 12/07/2010 12:45:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r16717 r16763 508 508 * 509 509 * @param string $url the URL of the file to download 510 * @param int $timeout The timeout for the request to download the file default 300 seconds 510 511 * @return mixed WP_Error on failure, string Filename on success. 511 512 */ 512 function download_url( $url ) {513 function download_url( $url, $timeout = 300 ) { 513 514 //WARNING: The file is not automatically deleted, The script must unlink() the file. 514 515 if ( ! $url ) … … 523 524 return new WP_Error('http_no_file', __('Could not create Temporary file.')); 524 525 525 $response = wp_remote_get($url, array('timeout' => 300));526 $response = wp_remote_get($url, array('timeout' => $timeout)); 526 527 527 528 if ( is_wp_error($response) ) {
Note: See TracChangeset
for help on using the changeset viewer.