From aae94227c6b0212db4ae65534be69a7a816be4ee Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 4 Mar 2018 19:49:54 +0000 Subject: [PATCH] Docs: Clarify `download_url()` return value, improve DocBlock formatting. See #42505. git-svn-id: https://develop.svn.wordpress.org/trunk@42775 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/file.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 2f90b74dbd..ee0536e647 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -958,14 +958,15 @@ function wp_handle_sideload( &$file, $overrides = false, $time = null ) { /** - * Downloads a URL to a local temporary file using the WordPress HTTP Class. - * Please note, That the calling function must unlink() the file. + * Downloads a URL to a local temporary file using the WordPress HTTP API. + * + * Please note that the calling function must unlink() the file. * * @since 2.5.0 * - * @param string $url the URL of the file to download - * @param int $timeout The timeout for the request to download the file default 300 seconds - * @return mixed WP_Error on failure, string Filename on success. + * @param string $url The URL of the file to download. + * @param int $timeout The timeout for the request to download the file. Default 300 seconds. + * @return string|WP_Error Filename on success, WP_Error on failure. */ function download_url( $url, $timeout = 300 ) { //WARNING: The file is not automatically deleted, The script must unlink() the file.