Used By
Used By | Description |
---|---|
wp-includes/functions.php: wp_unique_filename() | Get a filename that is sanitized and unique for the given directory. |
Filters the file list used for calculating a unique filename for a newly added file.
Returning an array from the filter will effectively short-circuit retrieval from the filesystem and return the passed value instead.
(array|null) The list of files to use for filename comparisons. Default null (to retrieve the list from the filesystem).
(string) The directory for the new file.
(string) The proposed filename for the new file.
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_wp_unique_filename_file_list