From c8bb1f5cfd47d27c0b897488d4a8c6bc49c16f5e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 25 Jul 2020 12:29:13 +0000 Subject: [PATCH] Docs: Improve description for `wp_unique_filename()`. Props stevenlinx. Fixes #50762. git-svn-id: https://develop.svn.wordpress.org/trunk@48606 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 4ed285d405..63bc4bcb1d 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -2449,11 +2449,12 @@ function _wp_upload_dir( $time = null ) { * Get a filename that is sanitized and unique for the given directory. * * If the filename is not unique, then a number will be added to the filename - * before the extension, and will continue adding numbers until the filename is - * unique. + * before the extension, and will continue adding numbers until the filename + * is unique. * - * The callback is passed three parameters, the first one is the directory, the - * second is the filename, and the third is the extension. + * The callback function allows the caller to use their own method to create + * unique file names. If defined, the callback should take three arguments: + * - directory, base filename, and extension - and return a unique filename. * * @since 2.5.0 *