apply_filters( 'wp_unique_filename', string $filename, string $ext, string $dir, callable|null $unique_filename_callback )
Filters the result when generating a unique file name.
Parameters
- $filename
-
(string) Unique file name.
- $ext
-
(string) File extension, eg. ".png".
- $dir
-
(string) Directory path.
- $unique_filename_callback
-
(callable|null) Callback function that generates the unique file name.
Source
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_unique_filename